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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to