Path: utzoo!attcan!uunet!munnari!murtoa.cs.mu.oz.au!ditmela!diemen!tasis!luke From: luke@tasis.utas.oz (Luke Visser) Newsgroups: comp.sys.mac.programmer Subject: MacApp multiple views in a window problem Keywords: macapp mac views Message-ID: <1002@tasis.utas.oz> Date: 27 Apr 89 05:56:23 GMT Organization: Elec Eng & Comp Sci, Uni of Tasmania, Australia Lines: 71 Ok I've tried just about everything to fix this and can't work it out. The situation is that I want to put multiple frames into one window. That's ok the problem comes when the event is processed. The target view gets it first but the other view never gets a look in. I've tried setting the nexthandler so that the other view should get checked but nothing seems to work. Anyway here's the code, can anyone spot the solution: procedure TXDocument.DoMakeViews(forPrinting: boolean); override; var aTEView : TTEView; begin New(aTEView); FailNIL(aTEView); aTEView.ITEView(nil, self, fListText, Point(0), cTyping, 5, 4, 30, 100, applFont, 12, [], sizeFixed, sizeFixed, kUnlimited); fListTEView := aTEView; New(aTEView); FailNIL(aTEView); aTEView.ITEView(nil, self, fpersonText, Point(0), cTyping, 5, 4, 400, 500, applFont, 12, [], sizeFixed, sizeFixed, kUnlimited); fpersonTEView := aTEView; end; procedure TXDocument.DoMakeWindows; override; var aWmgrWindow : WindowPtr; aWindow : TWindow; canResize, canClose : boolean; r : Rect; listFrame, personFrame : TFrame; begin aWmgrWindow := gApplication.GetRsrcWindow(nil, kWindowRsrc, not kDialogWindow, canResize, canClose); FailNIL(aWmgrWindow); New(aWindow); FailNIL(aWindow); aWindow.IWindow(self, aWmgrWindow, not KDialogWindow, canResize, canClose, true); SetRect(r, 0, 0, 100, 100); New(listFrame); FailNIL(listFrame); listFrame.IFrame(aWindow, aWindow, r, not kWantHScrollBar, kWantVScrollBar, not kHFrResize, kVFrResize); listFrame.HaveView(fListTEView); SetRect(r, 116, 0, 300, 100); New(personFrame); FailNIL(personFrame); personFrame.IFrame(fListTEView, aWindow, r, not kWantHScrollBar, kWantVScrollBar, kHFrResize, kVFrResize); personFrame.HaveView(fpersonTEView); aWindow.fTarget := fpersonTEView; SimpleStagger(aWindow, kStaggerAmount, kStaggerAmount, gStaggerCount); end; Thank's muchly Luke Visser --------------------------------------------------------------------------- "I'm a Tasmanian" - Albert Einstein Snail: Uni of Tasmania, Box 252C GPO, Hobart 7001, Tasmania, Australia. ACSnet: luke@tasis.utas.oz ARPA: luke%tasis.utas.oz@uunet.uu.net UUCP: {enea,hplabs,mcvax,uunet,ukc}!munnari!tasis.utas.oz!luke