Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jpd00964 From: jpd00964@uxa.cso.uiuc.edu Newsgroups: comp.sys.next Subject: Re: "owner" of IB Module files Message-ID: <246300052@uxa.cso.uiuc.edu> Date: 8 Sep 89 09:01:00 GMT References: <24051@labrea.Stanford.EDU> Lines: 24 Nf-ID: #R:labrea.Stanford.EDU:24051:uxa.cso.uiuc.edu:246300052:000:1346 Nf-From: uxa.cso.uiuc.edu!jpd00964 Sep 8 04:01:00 1989 /* Written 5:23 pm Sep 6, 1989 by combs@sumex-aim.stanford.edu in uxa.cso.uiuc.edu:comp.sys.next */ /* ---------- ""owner" of IB Module files" ---------- */ >Is there some reason that the "owner" of an Interface Builder module file >must be either Object or a direct subclass of Object? I'm interested in >having an interface file read in where the "owner" would be a View subclass. >I realize I can do this myself by specifying the View as the owner in >loadNibSection:owner:, but I can't set the owner in IB itself to anything >that isn't an Object or immediate subclass. This makes automatic >initialization of instance variables in the owner impossible. Well, I can give you a simple work around. Call your view object that you want to make the owner <>View. Create a subclass of Object called <>. Have <> be the owner, with a customview in it set to <>View. <> has one instance varaible, myView, which goes to your <>View. It also repeats all of <>View's methods and sends them to <>View. Real simple, and it will work. Most likely, as you start to do this, you will realize that there are more efficeint ways. Namely, let <> handle everything but the actual image, and have it send <>View all the information it needs. Michael Rutman Softmed