Negative numbers in Pulldown Menu causing problems

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Negative numbers in Pulldown Menu causing problems

Post by jpottsx1 »

Hi,

I have a Pulldown menu on a card that is used to display numbers between "-5" and "+5", however the negative values don't show up in the list, I only get as best I can describe them as "lines" where the numbers should be. How can I fix this?
Jeff G potts
bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Negative numbers in Pulldown Menu causing problems

Post by bangkok »

jpottsx1 wrote: I have a Pulldown menu on a card that is used to display numbers between "-5" and "+5", however the negative values don't show up in the list, I only get as best I can describe them as "lines" where the numbers should be. How can I fix this?
That's a nice one (bug ?).

Solution : add a space before, on each line.
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by FourthWorld »

I just made a pulldown button with that range and it seems to display okay.

How did you create that menu?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by Klaus »

Richard,

this is a bug and I already reported this a couple of years ago :?

The only workaround is to add a SPACE before each MINUS sign as bangkok already mentioned!


Best

Klaus
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by FourthWorld »

I don't doubt your bug report, but yet I was able to create a pulldown menu with the items described so it seems that either I misunderstood the request or the problem may be limited to the LC IDE and not necessarily the engine (I built my functional test menu in MC).

I'll be happy to review the details in the report - what is the RQCC number?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by Klaus »

Hi Richard,

I just did a quick check in MetaCard, no way, see screenshot.
I put this into the "pulldown" menu button:
1
2
3
4
5
-1
-2
-3
-4
-5

I saw that this was an enhacement request so I changed this to "normal bug":
http://quality.runrev.com/show_bug.cgi?id=5822


Best

Klaus
Attachments
pulldown_negative_numbers.jpg
pulldown_negative_numbers.jpg (7.21 KiB) Viewed 11289 times
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by FourthWorld »

Thanks for the screen shot - that was the key: I had thought this affected all platforms, but it doesn't seem a problem on Mac OS X (updated the RQCC report accordingly).
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by Klaus »

Richard,

the screenshot IS from OS X!

But this only affects "pulldown" menu buttons, "popup" etc. work fine!


Best

Klaus
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Negative numbers in Pulldown Menu causing problems

Post by bn »

Hi,
Bildschirmfoto 2011-08-24 um 22.33.07.png
Bildschirmfoto 2011-08-24 um 22.33.07.png (10.01 KiB) Viewed 11268 times
and
Bildschirmfoto 2011-08-24 um 22.33.30.png
Bildschirmfoto 2011-08-24 um 22.33.30.png (7.62 KiB) Viewed 11268 times
no spaces, just what it shows. MacOSX 10.6.8, LC 4.6.3

???

Kind regards

Bernd
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by FourthWorld »

Klaus wrote:Richard,

the screenshot IS from OS X!
I've found the difference: when left to the engine's defaults, the menu button's border property is set to 2, and the button will use the OS routines to draw the menu, which draws them appropriately. But if you set the button's border to 0, the internal engine routines are used to draw the menus as they are for all menus on Win and Linux, which exhibits the erroneous behavior reported.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by jpottsx1 »

I'm running Windows 7 and have updated to the latest LC release and I still get the erroneous lines in my menu whether I have my border set to zero or not, and enabling the the border or not still produces the same results.

My assumption is that this error is caused by the menu system's default programming that allows a "-" to produce a menu divider when creating a menu based resource. When using the menu builder a dash/"-" inserts a menu item divider. The code must be shared with the button menu items.
Jeff G potts
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by FourthWorld »

That the issue is consistent on Windows in spite of the borderwidth setting is to be expected; the "fix" of setting the borderwidth to 2 invokes correct behaviors only by relying on OS X's menu routines when running on that OS.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by Klaus »

Hi Richard,

could you please add some comments to the Qualtiy Center?
I think this NEEDS some explanation, due to the different results here on OS X, thanks!


Best

Klaus
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by FourthWorld »

Good idea - done.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Negative numbers in Pulldown Menu causing problems

Post by jacque »

Did anyone try escaping the hyphen? I.e.: \-
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply