Re: Working around SBObject limitations
Re: Working around SBObject limitations
- Subject: Re: Working around SBObject limitations
- From: Fritz Anderson <email@hidden>
- Date: Wed, 4 Nov 2009 14:39:29 -0600
On 4 Nov 2009, at 1:15 PM, Kyle Sluder wrote:
On Wed, Nov 4, 2009 at 11:11 AM, Fritz Anderson <email@hidden
> 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@hidden)
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:
This email sent to email@hidden