Class: ObjC::NSObject

This is the Ruby wrapper for *instance*s of the Objective-C NSObject class. It is a child of the ObjC::Object class. Like every class descended from ObjC::Object, the method table for this class contains entries for the class and instance methods of the corresponding Objective-C class (NSObject).


Public Instance methods

all (attributes)

Return all of the objects in the object hierarchy rooted at the current object that match criteria in the provided hash. For example, to return all the NSButton objects in a specified view, use:

   buttons = myView.all(:class => ObjC::NSButton)

Requires the nibtools extension.

bind (args)

Convenience method for establishing a binding. Pass arguments in a hash with keys :attribute, :object, :keyPath, and :options.

only (attributes)

Return the one object in the object hierarchy rooted at the current object that matches criteria in the provided hash. Raise an exception if there is not exactly one match. For example, to return the NSButton object in a specified view with tag of ‘2’, use:

   buttons = myView.only(:class => ObjC::NSButton, :tag => 2)

Requires the nibtools extension.

set (args)

Convenience method to set multiple attributes in a single command. Pass attributes in a hash with the attribute names as keys.