CompuServe Thread

Forum unknown · Programming

#Programming Questions

5 messages in this thread
#68511From: Vic WagnerMay 20, 1987 11:40 AM
RE: DPAINT and the ASTERISK….maybe they redefined the "checkmark" to asterisk. There's a field somewhere in the menu stuff to point to the "check" image. If you REALLY need to know where, I can look it up. (just did, for the excersize…it's in the Intuition manual). The NewWindow structure allows you to specify the CheckMark imagery (pointer to it after FirstGadget and before Title (hope this helps). BTW straight out of the Intuition Manual (orignal from CBM page 6-9) I find the following: "The foloowing code fragment dhows the correct way to process a menu event:" while (MenuNumber != MENUNULL) { Item = ItemAddress(MenuStrip, MenuNumber); /* process this item / MenuNumber = Item->NextSelect; } Hope this clears things up. PS, MetaScope does menus correctly too (but maybe only on 1.2 (haven't used 1.1 since beta copies started showing up around last May).
#68622From: Mike CowperthwaiteMay 20, 1987 11:26 PM
Yeah, I knew about the alternate checkmark specification; I even tried that for a while before I found a better solution to that problem. I based my guess on DPaint just from looking at it: it doesn't LOOK like an alternate image, don't ask me to give a reason — it's instinct. Besides which, the actual result of ignoring the possibility of multiple selects is only that items are checked but the program doesn't know this; conceivably dangerous, but probably not. When I go back to tackle the problem (I'm sidetracked on other matters right now), I'll either do what I think EA did with DPAINT, or I'll be grungy and sleazy and, if I see that there has been at least one multiple select (by looking at the NextSelect field of the first item), I'll just step through the menu structure and look at all the items which are check-able, and set variables according to the items' CHECKED flags. (ho, ho — CHECKED FLAGS — ho, ho). Other, non-checkable items, which won't display anything contrary to what my program knows, don't have to be examined; they'll just be ignored. This happens in almost every program I've seen with menus. So, as I thought I explained, the actual BUG is the incorrect address from ItemAddress. I have checked and double-checked, and the menunum value being passed has the correct info and is correctly formatted, but I get NULL for the address of the pointed-to item. I don't know how Notepad goes about it (or InfoMinder). / Mike
#68730From: Bob RakoskyMay 21, 1987 7:11 PM
I have used the 'prescribed' technique in the program I am currently working on and have had no problems in that section of the code. Haven't banged away at it terribly hard yet (other sections are GRABBING my attention a little too much up to this point) but will try to get it to 'break' in the manner you've hinted at and will report back in a couple of days.
#68730From: Bob RakoskyMay 21, 1987 7:11 PM
I have used the 'prescribed' technique in the program I am currently working on and have had no problems in that section of the code. Haven't banged away at it terribly hard yet (other sections are GRABBING my attention a little too much up to this point) but will try to get it to 'break' in the manner you've hinted at and will report back in a couple of days.
#68622From: Mike CowperthwaiteMay 20, 1987 11:26 PM
Yeah, I knew about the alternate checkmark specification; I even tried that for a while before I found a better solution to that problem. I based my guess on DPaint just from looking at it: it doesn't LOOK like an alternate image, don't ask me to give a reason — it's instinct. Besides which, the actual result of ignoring the possibility of multiple selects is only that items are checked but the program doesn't know this; conceivably dangerous, but probably not. When I go back to tackle the problem (I'm sidetracked on other matters right now), I'll either do what I think EA did with DPAINT, or I'll be grungy and sleazy and, if I see that there has been at least one multiple select (by looking at the NextSelect field of the first item), I'll just step through the menu structure and look at all the items which are check-able, and set variables according to the items' CHECKED flags. (ho, ho — CHECKED FLAGS — ho, ho). Other, non-checkable items, which won't display anything contrary to what my program knows, don't have to be examined; they'll just be ignored. This happens in almost every program I've seen with menus. So, as I thought I explained, the actual BUG is the incorrect address from ItemAddress. I have checked and double-checked, and the menunum value being passed has the correct info and is correctly formatted, but I get NULL for the address of the pointed-to item. I don't know how Notepad goes about it (or InfoMinder). / Mike