home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!apple!apple!dlyons
- From: dlyons@Apple.COM (David A Lyons)
- Newsgroups: comp.sys.apple2
- Subject: Re: Menu caching, monitors
- Message-ID: <71208@apple.Apple.COM>
- Date: 14 Aug 92 06:23:25 GMT
- References: <1992Aug5.001912.18836@rice.edu>
- Organization: Apple Computer Inc., Cupertino, CA
- Lines: 25
-
- In article <1992Aug5.001912.18836@rice.edu> jimwong@owlnet.rice.edu (Jim Wong) writes:
- >1) For fun, I've been working on a little desktop application with TML
- > Pascal II. I've noticed, however, that my menus are behaving oddly.
- > The Apple menu works fine: the first time I pull it down, it draws
- > each item, and thereafter when I select the Apple menu it pulls down
- > quickly. My other menus, however, don't seem to be being cached-- it
- > looks like each item is being redrawn every time I pull down the menu.
-
- You shouldn't have to do anything special to have your menus cached. (If
- you're creating them with NewMenu2, you might not have set the cacheable
- flag bit...if you're using NewMenu and passing a string, you should be
- fine already.)
-
- My bet is you're repeatedly enabling or disabling some items while the
- program is idling. This nukes the cache all the time. You can use
- GetMItemFlag to check the current state of an item, and then use EnableMItem
- or DisableMItem only if the item is not already in the correct state.
- That way you don't cause the Menu Manager to throw out the cached copy
- of your menu unnecessarily.
- --
- David A. Lyons, Apple Computer, Inc. | DAL Systems
- Apple II System Software Engineer | P.O. Box 875
- Internet:dlyons@apple.com | Cupertino, CA 95015-0875
-
- My opinions are my own, not Apple's.
-