groups

name language licence
NSTreeNode indexPathOfNodeWithRepresentedObject Objective-C MIT
Convert a number to text Perl MIT
Exact Table Cell Value Double-Clicked (through Bindings) Objective-C Other
Animating Progress Indicator in Menu Objective-C Other
NSDate Additions for Time Intervals since System Startup Objective-C Other
Pop Contextual Menu on standard button mouseDown: Objective-C Other
watchpoint for properties Other Other
NSObject executeAfterDelay:handler: Objective-C MIT

< 1 2 3 4 >



language: Objective-C
licence: MIT

NSTreeNode indexPathOfNodeWithRepresentedObject

options: view full snippetsend to code collector
// Note, using the index path returned by this method with NSTreeNode's descendantNodeAtIndexPath: will not match
// the receiver (hence the method name 'descendant...')

@interface NSTreeNode (NSTreeNode_Additions)
-(NSIndexPath *) indexPathOfNodeWithRepresentedObject:(id)obj;
@end


@implementation NSTreeNode (NSTreeNode_Additions)

-(NSIndexPath *) indexPathOfNodeWithRepresentedObject:(id)obj
{
	int x;
	for( x=0; x<[[self childNodes] count]; x++ )
	{
	
(Continues...)