Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!ibmpa!dayglow From: dayglow@ibmpa.UUCP (Eric Ly) Newsgroups: comp.sys.next Subject: Re: HELP! Yet more problems with making new windows... Keywords: frustrating,window,code,objective,c,... Message-ID: <1796@ibmpa.UUCP> Date: 21 Aug 89 15:54:09 GMT References: <491@mit-amt.MEDIA.MIT.EDU> Reply-To: dayglow@ibmpa.UUCP (Eric Ly) Organization: IBM AWD, Palo Alto Lines: 40 writes: > Sigh... just when I thought it was all over, and I had finally gotten these > darn windows working, I turn out to be wrong. Groan... > > This is basically what I've got: > > Pre-read notes: variables windowid and scrollid are defined as 'id'. Window.h > and lots of other nice things are #included -- I don't think that's the > problem. "Without further ado", here's the code: > > windowid = [Window newContent:myRect:style:type:mask:YES]; // line 574 > [windowid makeKeyAndOrderFront]; // line 575 > scrollid = [ScrollView newFrame:&myRect]; // line 576 > > Post-read notes: cc complains (at compile time) that it can't find the method > "newContent", the method on the first line of code. It also complains that it > can't find "newFrame", but it crashes before it gets to that point on a run. > Sigh... The problem is that you're using one too many colons. For line 574, try something like: windowid = [Window newContent:&myRect style:myStyle backing:NX_BUFFERED buttonMask:NX_ALLBUTTONS defer:YES]; For line 575, it's: [windowid makeKeyAndOrderFront:self]; If you look at the specs for the Window class, this method requires an unused but required argument to conform to the target/action paradigm. Line 576 is fine syntactically. The compiler complains because you haven't declared the prototype method by including . For each class that you use, make sure you include the header file for that class. Hope this helps. Eric Ly IBM Palo Alto