object specifier question
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.