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

Object specifier function


  • Subject: Object specifier function
  • From: Olivier Destrebecq <email@hidden>
  • Date: Wed, 15 May 2002 19:27:13 -0500

i have a hierarchy of object for which when i try to get an object specifier for i always got the result "+class ;1" instead of "hub 1".

Here is my Objectspecifier function, it gets called, but apparently i did something wrong.
If anybody knows about this, please let me know.

Olivier


@implementation DeviceHub (ObjectSpecifying)
- (NSScriptObjectSpecifier *)objectSpecifier
{
// Set 'containerRef' to your 'container'.
//
NSScriptObjectSpecifier *containerRef;
unsigned index;

if ([self container] != nil)
{
containerRef = [[self container] objectSpecifier];
index = [[self container] indexOfItem: self ofClass:[self class]]; // Fix this!
}
else
{
containerRef = [[NSApplication sharedApplication] objectSpecifier];
index = 0;
}
// Calculate 'index'.
//

//create and return the specifier
//
return [[[NSIndexSpecifier allocWithZone:[self zone]]
initWithContainerClassDescription: [containerRef keyClassDescription]
containerSpecifier: containerRef
key: @"hubs"
index: index] autorelease];
}
@end
_______________________________________________
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: Customize toolbar item
  • Next by Date: Toolbar questions
  • Previous by thread: Customize toolbar item
  • Next by thread: Toolbar questions
  • Index(es):
    • Date
    • Thread