• tschloss
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies

Hi, 

 

I am using the Beatbox py library. Using the examples a script creates a new client with a new login every time the skript is called.

My usage pattern will cause a skript to be called every 5 Minutes in average (maybe 2-5 times per minute in rare peaks).

 

Is this behaviour ok (for SFDC's watchdogs and for the client's performance)?

Are there other patterns to use (e.g. oauth like key retrieval once and no new logins with every call)?

 

Thanks for comments!

 

Thomas

 

 

Hi,

I assume that manual memory counting will go away very quickly. 

The most recent zkSforce library is still in MRC mode.

 

Does anybody have converted it (and tested)?

 

Here is what I did so far: I have converted it (i.e. Xcode 4.3 converted it automatically [I created a small OSX dummy project with MRC and refactored it to ARC]).

Xcode did find only 3-4 problems, all of them were unresolveable [myZKobject autorelease]. I just commented them away (thinking that the worst thing to happen would be a mem leak) and the app compiled and ran without further warnings.

But I don't feel well with it.

 

Any comments on this?

Anybody interested in this ARC version?

 

@Simon: any plans for an official port?

 

Thanks

Thomas 

Hi,

under OSX I had no problems with wrong login credentials - no program termination.

Now programming against iOS (iPhone Simulator 3.1.3) my App wants to do this

 

ZKSforceClient *client = [[ZKSforceClient alloc] init];

[client login:userid password:password];

 

and terminates with this log:

 

[Session started at 2010-12-02 09:48:57 +0100.]

2010-12-02 09:49:00.487 iOppBrwsr[9241:207] sendRequest - before THROW

2010-12-02 09:49:00.489 iOppBrwsr[9241:207] *** Terminating app due to uncaught exception 'INVALID_LOGIN', reason: 'INVALID_LOGIN: Invalid username, password, security token; or user locked out.'

2010-12-02 09:49:00.489 iOppBrwsr[9241:207] Stack: (

    30590043,

    2553984265,

    14504,

    30409,

    29873,

    11044,

    2819463,

    2857398,

    2845492,

    2827903,

    2855009,

    37481817,

    30374784,

    30370888,

    2821653,

    2858927,

    10708,

    10562

)

In BaseClient "sendRequest" it falls down to the very last error handling statement

@throw [ZKSoapException exceptionWithFaultCode:fc faultString:fm];


I admit that I am not very experienced with that, so probably it should be clear what to do. But honestly a little hint how I should handle this common situation would be great!
Any volunteers?

Thanks!
Thomas


Hi,

 

probably again my fault, but "sometimes" I receive a kind of type mismatch warning because "hash" is defined to return unsigned in zkDescribeField and NSUint in NSObject.

 

Strange because I am not getting this warning(s) in every case.

 

Screenshot: http://skitch.com/tschloss/dse7i/zkdescribefield.m-oppbrwsr-build-results

 

Thanks and cheers

Thomas

Hi,

 

while learning Objective-C and the zkSforce library in parallel I came across two questions:

 

1.) The query result is sent an autorelease before returned to the caller.

This may be ok and my caller has to deal with it, but I had a problem when I tried to run a query in one method and work on it in another method (both using a common instance variable where I saved the zkQueryResult object pointer. The object was deallocated somewhere in the middle of my program. After sending an retain to it once, it persisted, but I am not sure if this is the intended way.

 

2.) NSTableView protocol implemented in the category to zkQueryResult

Both the return value of the row-count method and the row index parameter of the value query method are documented as NSInteger but the library uses int. No warnings, no problems - but I just wanted to mention it not knowing if it can produce trouble in a certain situation.

 

Cheers

Thomas

Hi, maybe I am using the methods not in the intended way - a very basic example app would be soooo great!!!!

 

I have a little learning app on a free developper instance of SFDC.

What I achieved:

- I send out a "queryAll" and got reading access to all of the fields in the result (select Id,Name From Opportunity)

 

What does not work:

- update

 

What did I do and how does it go wrong:

- I took one of the 31 objects of the query result and put it into a new NSArray

- I sent an "update" with this one element array

- The runtime says

INVALID_TYPE: sObject type '' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

What confuses me.
- the property "Id" of all the zkSObjects in the query result is (null). I would have expected that this is set to the SFDC-id of the respective record. Is this needed for update and do I have to care for setting it?
- the property "type": same with all 31 records in the result: all (null). Maybe I have to put in something too (but don't know appropriate values).
- maybe I have to clear the id from the collection because it can't be updated (related to first point above)
I am really looking forward to a little more help ;)
Simon, pls. consider to add a donate or Flattr button to your website!
Thanks
Thomas
EDIT: 
I found some answers by trying:
- for a successful update the "type" property of the object to update has to be set. After setting it to @"Opportunity"  it worked.
- the update methods with either the Id in the header property of the objects or in the fields collection (or both; did not try if one has a higher priority if they are different from each other)
I still get some compiler warnings because the compiler does not know the type of my objects. This probably are due to my lack of Objective-C experience. Here is the screenshot: (oppsA ist the records NSArray from the zkQueryResult).
EDIT2:  by using some typecasts for the object references I could remove all of the warnings!

Hi,

when "Build and Run" of an "empty" Cocoa-app I receive a linker error: "Symbol not found "_objc_msgSendSuper2".

See screenshot: http://skitch.com/tschloss/d1y77/cocoa-app-build-results

 

What have I done :

 

  1. In Xcode3.2 (under 10.6) I generated a new project of template "Cocoa Application"
  2. I added all the -h/-m files of the zkSforce package ("via project add...")
  3. In the project properties I added "/Developer/SDKs/MacOSX10.6.sdk/usr/include/libxml2" to the "Header Search Paths"
  4. In the "Targets" section of the project explorer I added "libxml2.dylib" to the "Link Binary With Libraries" (screenshot http://skitch.com/tschloss/d1nf4/vorschau)

 

Update and another situation:

When changing the project to work against 10.5/Debug/X86_64 instead of 10.6/../.. the above error went away!

I then got a different error in the auto created appDelegate, where the compiler misses the @protocol specification in this line:

@interface cocoa_appAppDelegate : NSObject <NSApplicationDelegate> {


But this happened equally in an brand new project after changing the target SDK to 10.5

For sake of a little test I deleted the <protocol> requirement and the build finished without issues. So this is not a problem related to zkSforce.


But why does zkSforce show issues when working against 10.6 SDK? (this missing symbol from the top of my post).

 

 

Any ideas?

Thanks in advance

Thomas

 

Hi, 

 

I am using the Beatbox py library. Using the examples a script creates a new client with a new login every time the skript is called.

My usage pattern will cause a skript to be called every 5 Minutes in average (maybe 2-5 times per minute in rare peaks).

 

Is this behaviour ok (for SFDC's watchdogs and for the client's performance)?

Are there other patterns to use (e.g. oauth like key retrieval once and no new logins with every call)?

 

Thanks for comments!

 

Thomas

 

 

Hi,

under OSX I had no problems with wrong login credentials - no program termination.

Now programming against iOS (iPhone Simulator 3.1.3) my App wants to do this

 

ZKSforceClient *client = [[ZKSforceClient alloc] init];

[client login:userid password:password];

 

and terminates with this log:

 

[Session started at 2010-12-02 09:48:57 +0100.]

2010-12-02 09:49:00.487 iOppBrwsr[9241:207] sendRequest - before THROW

2010-12-02 09:49:00.489 iOppBrwsr[9241:207] *** Terminating app due to uncaught exception 'INVALID_LOGIN', reason: 'INVALID_LOGIN: Invalid username, password, security token; or user locked out.'

2010-12-02 09:49:00.489 iOppBrwsr[9241:207] Stack: (

    30590043,

    2553984265,

    14504,

    30409,

    29873,

    11044,

    2819463,

    2857398,

    2845492,

    2827903,

    2855009,

    37481817,

    30374784,

    30370888,

    2821653,

    2858927,

    10708,

    10562

)

In BaseClient "sendRequest" it falls down to the very last error handling statement

@throw [ZKSoapException exceptionWithFaultCode:fc faultString:fm];


I admit that I am not very experienced with that, so probably it should be clear what to do. But honestly a little hint how I should handle this common situation would be great!
Any volunteers?

Thanks!
Thomas


Hi, maybe I am using the methods not in the intended way - a very basic example app would be soooo great!!!!

 

I have a little learning app on a free developper instance of SFDC.

What I achieved:

- I send out a "queryAll" and got reading access to all of the fields in the result (select Id,Name From Opportunity)

 

What does not work:

- update

 

What did I do and how does it go wrong:

- I took one of the 31 objects of the query result and put it into a new NSArray

- I sent an "update" with this one element array

- The runtime says

INVALID_TYPE: sObject type '' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

What confuses me.
- the property "Id" of all the zkSObjects in the query result is (null). I would have expected that this is set to the SFDC-id of the respective record. Is this needed for update and do I have to care for setting it?
- the property "type": same with all 31 records in the result: all (null). Maybe I have to put in something too (but don't know appropriate values).
- maybe I have to clear the id from the collection because it can't be updated (related to first point above)
I am really looking forward to a little more help ;)
Simon, pls. consider to add a donate or Flattr button to your website!
Thanks
Thomas
EDIT: 
I found some answers by trying:
- for a successful update the "type" property of the object to update has to be set. After setting it to @"Opportunity"  it worked.
- the update methods with either the Id in the header property of the objects or in the fields collection (or both; did not try if one has a higher priority if they are different from each other)
I still get some compiler warnings because the compiler does not know the type of my objects. This probably are due to my lack of Objective-C experience. Here is the screenshot: (oppsA ist the records NSArray from the zkQueryResult).
EDIT2:  by using some typecasts for the object references I could remove all of the warnings!

Hello everyone,

 

After following the instructions on http://www.pocketsoap.com/osx/zksforce/ to download the latest version and configure the XML library and build path, I am still getting 6 errors, as shown in the following picture.

 

 

 

Error picture

 

 

 

I have not edited a single line of code for the library, and have not written a single line of code for my project yet.

 

Any help will be greatly appreciated, and thanks in advance!

 

 

Cheers,

John