home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!portal!cup.portal.com!Lee_Robert_Willis
- From: Lee_Robert_Willis@cup.portal.com
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Amiga Application Framework
- Message-ID: <69254@cup.portal.com>
- Date: Tue, 10 Nov 92 16:13:50 PST
- Organization: The Portal System (TM)
- Distribution: world
- References: <68764@cup.portal.com> <heinz.04d0@edohwg.adsp.sub.org>
- Lines: 40
-
- >In article <68764@cup.portal.com> Lee_Robert_Willis@cup.portal.com writes:
- >>Now if you want to add support for multiple windows, this event loop
- >>gets really ugly.
- >
- >Why? Each window has a UserData field which you can use to point to your
- >window-specific project data. With each IntuiMessage you get the window
- >ptr. So there's not really a problem.
- ...
- >>If you want to add support for multiple projects, you can't have all
- >>those global gadgets. (You need new copies for each project)
-
- >Global gadgets? What do you mean? global gadget structures? You can't add
- >that to multiple windows anyway.
-
- *Exactly*. Yet that is what you see in RKM examples (esp. 1.3) and the 3rd
- party Amiga Programmer books. All the gadgets are global data.
-
- >If you use gadtools or some small wrapper
- >functions around gadtools, you get copies of your gadgets for free ;^)
- >
- >>If you want to add support for multiple screens, you need some
- >>way of keeping track of the screens.
- >
- >True. I keep an exec list for each _used_ screen including the DrawInfo and
- >the font sizes I typically need.
-
- These are all good techniques. I use variations on all of them myself.
-
- But I had to figure each of them out myself, because they're not in the RKMs
- this way. I took me a-while to catch on to putting all my gadgets into one
- big structure and having the Window->UserData point there. How many other
- 'better-than-the-RKM-example' technicques are out there? If these aren't
- collected somewhere in some "How to build a full-scale Amiga Application"
- document, then we're all re-inventing these wheels.
-
- My original post was motivated by my intention to start such a document
- (and utility library), but I didn't want to do it if such a beast exists
- already.
-
- Lee Lee_Robert_Willis@cup.portal.com
-