Pull Down Menu button error?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Re: Pull Down Menu button error?

Post by bn » Tue Dec 17, 2013 2:51 pm

Marek,
Using Jacque's solution with the "/|" trick if there is no unicode in the list but the label of button is unicode
this one I can not reproduce.

attached is a stack that has all the relevant combinations, as far as I see. Could you please check.

From what I gather regarding pullDownMenus (on a Mac)

Label ASCII/Text ASCII -> works

Label Unicode/Text ASCII -> does not work (the original problem)

workarounds are
Label Unicode/ Text ASCII with "/|" -> works
Label Unicode/ Text ASCII with MenuHistory -> works
Label Unicode/ Text ASCII with conversion of pItem via templateField -> works


Label Unicode/Text Unicode with "/|" -> works

Label ASCII/Text Unicode with "/|" -> works


KInd regards
Bernd
Attachments
pullDownMenu & Unicode.livecode.zip
(2.49 KiB) Downloaded 238 times

snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am

Re: Pull Down Menu button error?

Post by snm » Tue Dec 17, 2013 4:10 pm

Bernd,
Using Jacque's solution with the "/|" trick if there is no unicode in the list but the label of button is unicode
now I can't reproduce it also. Maybe when I was changing unicode <-> ascii content of the list I made some mistake or lost some invisible "rubbish" from previous unicode content.

I can confirm that any workaround is working in my stack also.

By the way, could you suggest the best method to use unicode with "Option Menu"? There is not working "/|" trick.

Marek

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

Re: Pull Down Menu button error?

Post by bn » Tue Dec 17, 2013 7:37 pm

Marek,
By the way, could you suggest the best method to use unicode with "Option Menu"? There is not working "/|" trick.
couldn't you use the menuHistory? Probably the easiest.

For a slightly more involved solution see attached option menu.

Kind regards
Bernd
Attachments
optionMenu Unicode.livecode.zip
(1.06 KiB) Downloaded 225 times

snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am

Re: Pull Down Menu button error?

Post by snm » Tue Dec 17, 2013 7:48 pm

Thnks Bernd for stack. Simple and works great.

Marek

robm80
Posts: 161
Joined: Sat May 03, 2014 7:15 am

Re: Pull Down Menu button error?

Post by robm80 » Wed May 07, 2014 6:29 am

How can I add a new line to the menuitems of a combobox by script?

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

Re: Pull Down Menu button error?

Post by bn » Wed May 07, 2014 8:04 am

Hi Rob,
How can I add a new line to the menuitems of a combobox by script?
many ways to do this:

Code: Select all

on mouseUp
   put return &  "abc" after button "myCombobox"
end mouseUp
or

Code: Select all

on mouseUp
   put the number of lines of button "myComboBox" into tSoManyLines
   put "new" into line tSoManyLInes + 1 of button "myComboBox"
end mouseUp
Kind regards
Bernd

Post Reply