From: Hunter K. <re...@gm...> - 2006-02-20 09:53:25
|
Yah, I figured as much over the weekend. Thanks for the reply though... Does Interface Builder have some kind of hook that we could modify to make it recognize .rb files? Even cooler would be a way to tell it that it would be a ruby file, and have it generate the skeleton .rb file... H On 2/17/06, Jonathan Paisley <jp...@dc...> wrote: > On 17 Feb 2006, at 14:53, Hunter Kelly wrote: > > > For example, I opened up the simpleapp example. Interface Builder can > > "see" AppController and MyView. However, in XCode, if I create a new > > Ruby subclass of NSObject, I can't figure out how to tell Interface > > Builder about this new class. If it were Obj-C, I'd just drag the .h > > file onto Interface Builder, but when I try that with the .rb file > > Interface Builder flicks over to the sounds tab or something. > > > > What do I need to be able to do to make Interface Builder aware of my > > Ruby classes? > > You can do it manually in Interface Builder. You need to create a > subclass of NSObject with the appropriate name, and then instantiate > it. This is described in the Interface Builder help. I've pasted a > fragment of it below. You'll have to add the actions and outlet names > manually too. > > Hope that helps, > Jonathan > > > Creating a Class > > To create a class that inherits from a Coca class, follow the steps > in each of these sections, in order: > > "Subclass an existing class." > "Add actions and outlets to the new class." > "Create an instance of the new class." > "Connect the class's actions and outlets." > "Generate the class's source code files." > > Subclass an existing class. > > In the Classes pane of the nib file window, Control-click the class > you want your class to inherit from, and choose Subclass from the > menu that appears. A new subclass is added with a default name. Type > in a new name for the subclass. > > ... > > > > |