Path: IIGS Toolbox/CheckMItem prob Subj: CheckMItem in popup menu ctrls 91-09-02 18:00:03 EST From: Lalanovich Posted on: America Online I'm having trouble getting _CheckMItem to work with popup menu controls. I'm using assembly, and I've successfully put check marks into regular menu items in the system menus, but simply doing the same thing using the menu item # of a popup menu item doesn't seem to work. I have tried setting the port to my window's port: that seems to make no difference. Basically, no matter what I do, it seems like I can get no response at all to my toolcall. I've also tried the toolcall _SetMItemMark. Same result: no effect. Now I know that this can be done because I've seen programs that do this. One other note: my popup menu control is defined in the resource fork - can this make a difference? Any help would be appreciated. Thanks, -Ray Path: IIGS Toolbox/CheckMItem prob Subj: PopUps 91-09-02 19:34:16 EST From: ChamlnSoft Posted on: America Online On page 37-14 of TB III, it says that all of the menu routines listed (a whole mess of them) work on the current menu bar. Try doing a _SetMenuBar using the control handle of your popup before doing the _CheckMItem call Jeff Path: IIGS Toolbox/CheckMItem prob Subj: Not only that, but also.... 91-09-03 20:59:34 EST From: Matt DTS Posted on: America Online 1) Check marks in pop-ups won't show up until the menu is popped-up. 2) The only time resources should make a difference to menus is when you call GetMTitle or another call which is documented as returning a P-string pointer; if you used a handle or a resource for the string, you'll get back a handle or a resource ID. See Volume 3. 3) Check marks in pop-ups are, generally, a human interface nightmare. Pop-ups are supposed to be for picking one of several items -- an alternative to radio buttons that only takes a fixed amount of screen space no matter how many choices you have. You're also supposed to be able to click on a pop-up and release with no ill-effects; you've just rechosen the current item. Check marks interfere with this in two ways: a) You can't see them checked until you pop-up the menu, and b) Clicking and releasing the menu changes the checked state of the current item. Not good. Please, try to avoid doing this if you can. --Matt Path: IIGS Toolbox/CheckMItem prob Subj: Popup checkmarks 91-09-04 00:25:36 EST From: Lalanovich Posted on: America Online ChamlnSoft, Thanks for the info. I don't know how I missed it! Dagnab it. I just did what you said and "Presto": check marks. Matt, My checkmarks don't get put in unless somebody actually selects something from the menu. The only reason that I'm using them is to show the user what is the current selection while he's looking at the other choices. If he has forgotten what it was, then he can look at the checkmark to find out. Also, he can then tell what the selection will be left at should he decide not to change it. Sure, he can just not select anything and then look in the popup window, but I kind of like it this way. Is there anything wrong with that? Maybe I missed something in your message. BTW, Matt, thanks for the great support here. I, and many others, really appreciate your continuing presence (and Tech Notes etc.) -Ray Path: IIGS Toolbox/CheckMItem prob Subj: I suppose it's OK... 91-09-06 20:01:53 EST From: Matt DTS Posted on: America Online ...but it still seems kind of weird to me. Check marks are just out of place in pop-ups to me, for most of the reasons previously mentioned. I don't expect to see them, so when I do it confuses me. If I select the item, does it uncheck (like a checked item in a regular menu does)? What does that mean if it does? What happens either way? I just find it confusing and think other people might as well. Sure, they'd get "used to it", but that's not the point, is it? --Matt Path: IIGS Toolbox/CheckMItem prob Subj: my checkmarks 91-09-07 15:05:40 EST From: Lalanovich Posted on: America Online My popup menu simply lets a user choose between 10 levels of difficulty in a game:1 2 3 4 etc. So it seemed to me that there would be little confusion of the type you specify, Matt. One level _has_ to be selected and selecting it again wouldn't wouldn't make much sense (as far as the uncheckmarking possiblity is concerned). Although, I can see now why you were concerned. Definitely, I would expect a regular menu to use checkmarks the way you say - to turn options on or off. To tell the truth, I was gratified to learn that the intended use for popup menus was basically what I'm using them for: something like a long list of radio buttons, only one of which can be selected. -Ray