groups

name language licence
Find all subviews with matching resize mask Objective-C Other
Random integer between two specific values Objective-C Other
Custom Two-View Predicate Editor keypath=BOOL Template Objective-C Other
Examine View/Subview Bindings Objective-C Other
Get Class Name for Object Javascript Other

< 1 2 3 4 >



language: Objective-C
licence: Other

Examine View/Subview Bindings

options: view full snippetsend to code collector
// Pass in a view and it'll report on all of its bindings as well as any subview's bindings (and their subviews, etc)
// Not terribly complicated
-(void) examineViewBindingsForView:(NSView *)aView
{
	NSLog( @"aView: %@", aView );
	for( NSString *exposedBinding in [aView exposedBindings] )
		NSLog( @"Binding: %@    infoDict: %@", exposedBinding, [aView infoForBinding:exposedBinding] );

	if( [aView subviews] )
	{
		for( NSView *subView in [aView subviews] )
			[self examineViewBindingsForView:subView];
	}
}

	
(Continues...)