Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!ogicse!milton!sumax!nwnexus!adonis1 From: adonis1@nwnexus.WA.COM (Adonis Corporation ) Newsgroups: comp.sys.next Subject: Re: Help, please, on making connections in IB Message-ID: <492@nwnexus.WA.COM> Date: 20 Apr 91 17:04:40 GMT References: <2524@fornax.UUCP> Reply-To: adonis1@nwnexus.UUCP (Adonis Corporation (Doug Kent)) Distribution: na Organization: Northwest Nexus Inc.; Seattle, WA Lines: 60 In article <2524@fornax.UUCP> mcdonald@fornax.UUCP (Ken Mcdonald) writes: [stuff deleted so I can mail this] >First, I'd like to use a subclass of the "TextField" class, which I call >"EntryField"; an EntryField object is defined to respond to one additional >action message (besides those defined by a standard text field), called [stuff deleted] >"update". The idea is that the user enters data into this text field, >informing it of the presence of new data in the field. This may be a bit >klugey, but that's OK--this is just a prototype. You could have the button send a message to the application telling it that there is new data in the TextField. Then you have no need to subclass the TextField object. > >The first problem is that I can't even create an object of class EntryField >in Interface Builder. The class definition is no problem, but I can find [stuff deleted] >how do I create an object of this class in Interface Builder, so as to >make connections to and from it? If you really want to subclass it you do it by dragging a CustomView object from the IB pallete to where your TextField goes. In the attributes section of the Inspector (Command-1), select EntryField as the class you wish you CustomView to have (press OK). Do a File.TestInterface to see what it'll look like when you run. > >My other question is very similar. The application itself will be an >object of type "MyApp", which is a subclass of the Application class, with >some extra action messages and so forth. Again, I can find no way to create >or refer to this object in Interface Builder; so there is no way, for >example, that I can tell my EntryField object that it should send a >"newData:" message to the application, in response to the "update:" message >it just received. > You could try this: Click on File's Owner in your suitcase panel and do command-1. Select MyApp for its class (press OK). Now you can create connections between the owner (subclass MyAPP) and your interface objects by dragging around in IB. in your appname_main.m file you might have to replace NXApp = [Application new]; with NXApp = [MyApp new]; (I think this'll get wiped out when you resave in IB)(?). The above steps may not work. I don't really understand the relation between the File Owner (of class Application) and NXApp, also of class Application. Anybody have a contribution to this? Doug Kent Independent NeXT Developer adonis1@nwnexus.wa.com