menu checkmark on linux
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
menu checkmark on linux
Docs/tutorial indicate a menu item can be checked by prefacing menu text with "!c" text.
Placing "!c" before menu items just gives me, well, "!c" before menu items. No checkmark. see here for overview on what should happen: http://lessons.livecode.com/m/2592/l/12 ... menu-item
Anyone else seeing this checkmark issue under Linux?
[update: nothing to do with Linux, see below for details]
Placing "!c" before menu items just gives me, well, "!c" before menu items. No checkmark. see here for overview on what should happen: http://lessons.livecode.com/m/2592/l/12 ... menu-item
Anyone else seeing this checkmark issue under Linux?
[update: nothing to do with Linux, see below for details]
Last edited by slowmaker on Mon Dec 09, 2019 2:51 am, edited 2 times in total.
The important thing is not to stop questioning. Curiosity has its own reason for existence. - Albert Einstein (LIFE Magazine (1955 may 2), p64)
-
- VIP Livecode Opensource Backer
- Posts: 9850
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: menu checkmark on linux
I'm my experience menu checkmarks work well on all platforms. It may be helpful to see an example to determine why you're getting what you see.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: menu checkmark on linux
Hmmm, I seem to remember this coming up previously somewhere before....
Re: menu checkmark on linux
Howdy, bogs! Nope, this is a separate issue, see below...(but that thread does have some nifty code I intend to appropriate)
FourthWorld, I have (part of) an answer now. I observed while putting together a sample stack that not all menu buttons appear to support the checkmark.
The option menu is the one I was originally using, and it gives the "!c" behavior from my first post (using community version on MS Windows this time, my linux box not available at the moment).
Pulldown and popup menus do appear to support check as per docs.
I have not had time yet to dig into option menu specific docs and see if there is a note about this difference.
I will note that I did not see anything in the tutorial about any particular type of menu button being required.
so...not sure if this is buggy behavior, buggy docs, or insufficient reading on my part yet.
FourthWorld, I have (part of) an answer now. I observed while putting together a sample stack that not all menu buttons appear to support the checkmark.
The option menu is the one I was originally using, and it gives the "!c" behavior from my first post (using community version on MS Windows this time, my linux box not available at the moment).
Pulldown and popup menus do appear to support check as per docs.
I have not had time yet to dig into option menu specific docs and see if there is a note about this difference.
I will note that I did not see anything in the tutorial about any particular type of menu button being required.
so...not sure if this is buggy behavior, buggy docs, or insufficient reading on my part yet.
The important thing is not to stop questioning. Curiosity has its own reason for existence. - Albert Einstein (LIFE Magazine (1955 may 2), p64)
-
- VIP Livecode Opensource Backer
- Posts: 9850
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: menu checkmark on linux
Option menu? What items beyond the current selection would you like checked, and for what purpose?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: menu checkmark on linux
Option menus are not the same as other menus, literally what you pick is 'the option', and the label reflects the choice.
That would not be an optimal choice for what your testing, putting a check or other mark, or graying out an entry. It is kind of like how a radio button (in a group) works as opposed to a check box. With radio buttons, ideally you would only have one ticked at a time, where as the checkbox is for when you want to offer multiple choices.
That would not be an optimal choice for what your testing, putting a check or other mark, or graying out an entry. It is kind of like how a radio button (in a group) works as opposed to a check box. With radio buttons, ideally you would only have one ticked at a time, where as the checkbox is for when you want to offer multiple choices.
Re: menu checkmark on linux
Guys...
Perhaps a bit of clarification is needed here: I'm not actually advocating for this to be supported, I just want to be sure it isn't accidental (i.e. a bug) before finishing off my notes, saving the sample code illustrating the things I've learned from this that were not clear in the lesson text (like the subject of this thread), and moving on to the next lesson (currently on page 146 of volume one of those monstrous livecode lessons books; this will make program 57 in my code-every-lesson-and-every-quirk-encountered push).
I appreciate your comments; however,
I know what option menus are.
It shouldn't matter what else I may or may not want checked; I don't actually want an option menu for anything, this isn't a snag in some design I'm putting together, it just happened to be the type of menu button I grabbed while following the lesson.
But just to play along: I can imagine scenarios where one might want to indicate some small bit of extra state which applies to some of the items in the list but not others, regardless of whether they are the currently chosen item.
so in review, we have:
I'm not through researching, there may well be some bit of text in the real docs that simply says "!c only supported for popup or pulldown menus."
Hrrm. Sleepier than I thought; the above seems grumpy to me, so it probably seems even worse to others. Just take my word for it: not actually as grumpy or over-react-y as the above may appear, just sleepiness combined with strong desire to document this clearly in my notes, no aggression intended, imagine as many 's as you need to feel in the company of friends-or-at-least-friendly-strangers, etc.
Perhaps a bit of clarification is needed here: I'm not actually advocating for this to be supported, I just want to be sure it isn't accidental (i.e. a bug) before finishing off my notes, saving the sample code illustrating the things I've learned from this that were not clear in the lesson text (like the subject of this thread), and moving on to the next lesson (currently on page 146 of volume one of those monstrous livecode lessons books; this will make program 57 in my code-every-lesson-and-every-quirk-encountered push).
I appreciate your comments; however,
I know what option menus are.
It shouldn't matter what else I may or may not want checked; I don't actually want an option menu for anything, this isn't a snag in some design I'm putting together, it just happened to be the type of menu button I grabbed while following the lesson.
But just to play along: I can imagine scenarios where one might want to indicate some small bit of extra state which applies to some of the items in the list but not others, regardless of whether they are the currently chosen item.
so in review, we have:
- A lesson which simply calls out "menu", with no qualifiers that I've noticed (yet, will re-read later) that would be relevant to this discussion.
- An available set of controls which are called:
- option menu
- popup menu
- pulldown menu
- combo box menu
- And a flat statement that prefacing menu items with "!c" will cause a checkmark to display.
I'm not through researching, there may well be some bit of text in the real docs that simply says "!c only supported for popup or pulldown menus."
Hrrm. Sleepier than I thought; the above seems grumpy to me, so it probably seems even worse to others. Just take my word for it: not actually as grumpy or over-react-y as the above may appear, just sleepiness combined with strong desire to document this clearly in my notes, no aggression intended, imagine as many 's as you need to feel in the company of friends-or-at-least-friendly-strangers, etc.
The important thing is not to stop questioning. Curiosity has its own reason for existence. - Albert Einstein (LIFE Magazine (1955 may 2), p64)
Re: menu checkmark on linux
Doesn't look grumpy to me, but hope you had a good rest
Sounds like a very big project, I certainly wish you the best in producing it
Sounds like a very big project, I certainly wish you the best in producing it
-
- VIP Livecode Opensource Backer
- Posts: 7257
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: menu checkmark on linux
I think in general "menu" refers to the menu bar (which uses pulldown menu buttons exclusively.) Other menu button types are used in the stack content and are usually referred to by the full descriptive name.
I can see how this could be confusing to a new user and I agree more clarification in the lesson would help.
I can see how this could be confusing to a new user and I agree more clarification in the lesson would help.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: menu checkmark on linux
I'm actually going to (seemingly) switch direction on you now; I don't think the lesson needs changing, because the first thing you said above puts the lesson's use of the word into the tribal knowledge category for me, and I don't see anything wrong with that. Tribal knowledge/standard language usage inside a particular group is valid, and trying to explain every use of it to every possible new-to-that-usage reader, every time, would be impossible.jacque wrote: ↑Fri Dec 06, 2019 5:50 pmI think in general "menu" refers to the menu bar (which uses pulldown menu buttons exclusively.) Other menu button types are used in the stack content and are usually referred to by the full descriptive name.
I can see how this could be confusing to a new user and I agree more clarification in the lesson would help.
At most, if someone ever bothered to edit it, they might change the first usage of the word menu to be "menu bar" instead, and then they are covered from outsiders assuming a broader usage. But I doubt it's worth the trouble.
I mean, realistically, you've only got a single (mildly) negative data point here:
One moderately experienced dev (me, believe it or not ) from outside the LC camp, who happened to trip over a piece of tribal language usage.
It happens. It will almost certainly happen again, more than once, as I fumble around exploring this delightful language which is so very different from others I have worked with.
I never found any 'official' commentary stating where the "!c" is or isn't supported, but I think what you guys have told me so far gives me enough to tie off my notes and move on; I'll put up a sample stack in this thread later this weekend showing the variations, in case someday another overly-literal goof trips over the same thing.
The important thing is not to stop questioning. Curiosity has its own reason for existence. - Albert Einstein (LIFE Magazine (1955 may 2), p64)
Re: menu checkmark on linux
summary for my notes:
"!c" text preceding a menu item will cause that item to display a checkmark if the menu is pulldown or popup.
"!c" will be treated as ordinary menu item text in option menus and comboBox menus.
when tutorial(s) just say menu, probably referring to "menu bar", which is implemented by pulldown menus
attachment shows on example of each kind of button
did not do a menu bar since its behavior is covered by the pulldown.
"!c" text preceding a menu item will cause that item to display a checkmark if the menu is pulldown or popup.
"!c" will be treated as ordinary menu item text in option menus and comboBox menus.
when tutorial(s) just say menu, probably referring to "menu bar", which is implemented by pulldown menus
attachment shows on example of each kind of button
did not do a menu bar since its behavior is covered by the pulldown.
- Attachments
-
- 57-menuCheckMarks.livecode.zip
- (1.85 KiB) Downloaded 317 times
The important thing is not to stop questioning. Curiosity has its own reason for existence. - Albert Einstein (LIFE Magazine (1955 may 2), p64)
-
- VIP Livecode Opensource Backer
- Posts: 4016
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: menu checkmark on linux
Hi slowmaker,
I think an optionMenu is not a good place to have checkMarks. The menu choice is already apparent in the label of the option menu. So no use to actually put a check mark in front of it. Especially if you allow for multiple checkmarks the use would have to click on it to see the currently active marks.
But I agree it should have been documented somewhere
But if you want to hack an option menu to have marks (which I still think is bad user interface which you can see and decide for yourself) then here is a script for an optionMenu
Kind regards
Bernd
I think an optionMenu is not a good place to have checkMarks. The menu choice is already apparent in the label of the option menu. So no use to actually put a check mark in front of it. Especially if you allow for multiple checkmarks the use would have to click on it to see the currently active marks.
But I agree it should have been documented somewhere
But if you want to hack an option menu to have marks (which I still think is bad user interface which you can see and decide for yourself) then here is a script for an optionMenu
Code: Select all
on menuPick pChoice
put cheatCheckMarks ("singleMark") into tCurrChoice -- without parameter "singleMark" it uses multiple marks
switch tCurrChoice
case "Choice 1"
-- code
break
case "√ Choice 1"
beep
-- code
break
-- more code
end switch
end menuPick
function cheatCheckMarks pMode
lock screen
put the menuHistory of me into tHisto
put line tHisto of me into tCurrLine
put the text of me into tText
-- single checkMark
if pMode is "singleMark" then
replace "√ " with empty in tText -- block this line to allow multiple checkmarks
end if
-- end single checkmark
if tCurrLine contains "√ " then
replace "√ " with empty in tCurrLine
else
put "√ " before tCurrLine
end if
put tCurrLine into line tHisto of tText
set the text of me to tText
set the label of me to tCurrLine
-- important to lock messages otherwise an infinite loop might occur
-- because setting the menuHistory triggers a "menuPick"
lock messages
set the menuHistory of me to tHisto
unlock messages
unlock screen
return tCurrLine
end cheatCheckMarks
Bernd
Re: menu checkmark on linux
Bernd, that is a very slick way to tackle it