Re: Is it possible to pass an object to a NIB
Re: Is it possible to pass an object to a NIB
- Subject: Re: Is it possible to pass an object to a NIB
- From: DeNigris Sean <email@hidden>
- Date: Sun, 6 Dec 2009 13:35:22 -0500
I tightened up the code a bit:
#Obj-C version: - (id)initWithContentsOfURL:(NSURL *)nibFileURL
nib_file = NSNib.alloc.initWithContentsOfURL NSURL::fileURLWithPath(@@NibPath)
#Obj-C version: - (BOOL)instantiateNibWithOwner:(id)ownertopLevelObjects:(NSArray **)topLevelObjects
#The Ruby bridge puts the top level objects in the second return value because the 2nd param takes a pointer
# and Ruby does not have pointers
result, top_level_objects = nib_file.instantiateNibWithOwner_topLevelObjects NSApplication.sharedApplication
view = top_level_objects.find { |obj| obj.class == object_type }
- Sean_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden