• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Working around SBObject limitations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Working around SBObject limitations (From: Fritz Anderson <email@hidden>)
 >Re: Working around SBObject limitations (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSPopUpButton, Bindings & separator items
  • Next by Date: Re: NSPopUpButton, Bindings & separator items
  • Previous by thread: Re: Working around SBObject limitations
  • Next by thread: Don't highlight button's text when clicked
  • Index(es):
    • Date
    • Thread