• 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
object specifier question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

object specifier question


  • Subject: object specifier question
  • From: Olivier Destrebecq <email@hidden>
  • Date: Thu, 23 May 2002 10:45:02 -0500

i'm trying to implement scripting support in my app. I have a one to many relation ship for one of my object and so i implemented the - (NSScriptObjectSpecifier *)objectSpecifier method for that.

Everything seems to work fine except that if i run the script:
get device 1
the result window show that i got an object, but apparently the object specifier does not include the class information. It only include the index of the object. Apparently the four character code that is suppose to give the class is missing.

where is that info supposed to be supplied.

Is it a problem in my dictionary, in my implementation?
Here is the objectSpecifier method:

- (NSScriptObjectSpecifier *)objectSpecifier
{
// Set 'containerRef' to your 'container'.
//
NSScriptObjectSpecifier *containerRef = [[self container] objectSpecifier];

// Calculate 'index'.
//
unsigned index = [[self container] indexOfItem: self ofClass:[self class]];

//create and return the specifier
//
return [[[NSIndexSpecifier alloc]
initWithContainerClassDescription: [containerRef keyClassDescription]
containerSpecifier: containerRef
key: fileKey//@"files"
index: index] autorelease];
}

any help appreciated.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: TIFFs and Resolution
  • Next by Date: Re: Flame retardant
  • Previous by thread: Re: TIFFs and Resolution
  • Next by thread: Dynamically Updating NSToolbarItem
  • Index(es):
    • Date
    • Thread