On 4 Nov 2009, at 1:15 PM, Kyle Sluder wrote:

On Wed, Nov 4, 2009 at 11:11 AM, Fritz Anderson <[email protected] > wrote:
1. The test in this for statement doesn't link, because the AppFolder's class doesn't appear in my object code. Is there a workaround for this?

Use +[SBApplication classForScriptingClass:].  So something like:

for (id curr = [self parent]; [curr isKindOfClass: [AppApplication
classForScriptingClass:@"folder"]]; curr = [curr parent]) {
      [returnedMutableArray insertObject: curr atIndex: 0];
}

2. It would be nice to put the above code into a -folderPath method in my own category of the SBObject subclass AppFolder. Again, the absence of the dynamic class from my object code prevents my implementing a category (am I right?). Is there a workaround for this? (I imagine it could be done by monkeying with the runtime, but I'd rather not if there's an easier way.)

You could use the runtime methods, or you could add a category to SBObject.

All very useful, and very straightforward. Thank you very much.

        — F

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to