Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bbn!mit-eddie!mit-amt!adam From: adam@mit-amt.MEDIA.MIT.EDU (Adam Glass) Newsgroups: comp.sys.next Subject: Re: HELP! Yet more problems with making new windows... Message-ID: <496@mit-amt.MEDIA.MIT.EDU> Date: 16 Aug 89 17:05:20 GMT References: <24022@labrea.Stanford.EDU> Organization: MIT Media Lab, Cambridge, MA Lines: 42 combs@sumex-aim.stanford.edu (Dave Combs) writes: > Concerning the newContent::::: call, the compiler error is correct. > Since you are not supplying values to the various arguments to the call > (even if NULL), it assumes that the tokens "style", "type" and "mask" > are actual values, instead of parameter names. Also, is "myRect" a pointer > to an NXRect, or an NXRect itself? Final note: the argument name is > "buttonMask", not "mask." > > The call probably should be: > [Window newContent:&myRect > style:(some_integer_style) > backing:(some_integer_buffering_type) > buttonMask:(some_integer_buttonMask) > defer:(some_BOOL_flag)] For the sake of brevity and netload, I didn't include the stuff above, where I define those variables, but I'll do it here to show you that I am doing the right thing (so far as I can tell). Code: - MakeWindowAndDrawText:(int) storynum:(int) priority { int fd, style, type, mask; NXRect myRect; id windowid, scrollid; /* set style, mask, myRect and type to the desired settings */ windowid = [Window newContent:myRect:style:type:mask:YES]; [windowid makeKeyAndOrderFront]; scrollid = [ScrollView newFrame:&myRect]; [[windowid contentView] setAutoresizeSubviews:YES]; [[windowid contentView] addSubview:scrollid]; /* etc... */ } Sigh... any more suggestions? Adam -- "Offer me anything I ask for..." (mail address in message header) "Anything you want." "I want my father back, you son of a bitch." - The Princess Bride