MultiChoice Combo Boxes..?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: MultiChoice Combo Boxes..?

Post by sturgis » Mon Jan 04, 2010 6:24 pm

oh duh. Just realized. Its openStack not stackOpen

Attached is a commented stack that should do what you want. The changed code is in the group with the combo boxes, the comment block at the top explains what was changed.
combobox.zip
Commented Stack
(2.12 KiB) Downloaded 222 times

topcat888
Posts: 44
Joined: Sat Jan 02, 2010 8:10 pm

Re: MultiChoice Combo Boxes..?

Post by topcat888 » Mon Jan 04, 2010 8:39 pm

Still won't do the time but hey don't worry about it, I am more than happy.

I have to thank you once again for your support, this company, software and the forum are amazing.!

Right onto the next project.!

:~)

topcat888
Posts: 44
Joined: Sat Jan 02, 2010 8:10 pm

Re: MultiChoice Combo Boxes..?

Post by topcat888 » Tue Jan 05, 2010 1:38 pm

Hi sturgis

Yep its me again, I have set up my next code and it will not bring back an answer, could cast your eye over for me..?

There are three combo's with exactly the same choices as before... 1,2 or 3

Code: Select all

local theArray
on menuPick pThePick
   if theArray is empty then 
      setupArray
   end if
   
   put the menuHistory of button "combo1" & comma & the menuHistory of button "combo2" & the menuHistory of button "combo3" into theIndex
   put theArray[theIndex] into field "outField"
end menuPick

command setupArray
   put "H,M,L,M" into theArray["1,1,1"]
   put "M,L,H,M" into theArray["1,2,3"]
   put "L,H,M,H" into theArray["1,2,2"]
   put "L,M,M,H" into theArray["1,3,3"]
   put "H,L,M,H" into theArray["1,3,2"]
   put "H,M,M,L" into theArray["1,1,2"]
   put "M,L,H,L" into theArray["1,2,1"]
   put "M,H,L,H" into theArray["1,3,1"]
   put "L,M,L,H" into theArray["1,1,3"]
   
   put "L,H,L,M" into theArray["2,2,2"]
   put "M,L,H,H" into theArray["2,3,2"]
   put "L,M,H,M" into theArray["2,1,2"]
   put "L,L,M,H" into theArray["2,1,1"]
   put "M,H,M,L" into theArray["2,3,3"]
   put "L,H,M,H" into theArray["2,2,3"]
   put "H,L,H,M" into theArray["2,2,1"]
   put "H,M,M,L" into theArray["2,3,1"]
   put "H,L,L,M" into theArray["2,1,3"]
   
   put "M,H,L,M" into theArray["3,3,3"]
   put "L,L,H,M" into theArray["3,2,3"]
   put "L,L,M,H" into theArray["3,1,3"]
   put "H,M,M,L" into theArray["3,3,2"]
   put "L,H,H,M" into theArray["3,2,2"]
   put "L,M,H,M" into theArray["3,1,2"]
   put "H,M,L,M" into theArray["3,1,1"]
   put "H,L,L,M" into theArray["3,2,1"]
   put "M,M,H,L" into theArray["3,3,1"]
end setupArray

Is it because the entry is digits and the answer is letters..? If so do need write a little handler to tranlate between the two..??

Thanks

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

Re: MultiChoice Combo Boxes..?

Post by bn » Tue Jan 05, 2010 5:10 pm

Hi topcat888,
you just forgot the second comma, then it works:

Code: Select all

put the menuHistory of button "combo1" & comma & the menuHistory of button "combo2" & comma & the menuHistory of button "combo3" into theIndex
regards
Bernd

topcat888
Posts: 44
Joined: Sat Jan 02, 2010 8:10 pm

Re: MultiChoice Combo Boxes..?

Post by topcat888 » Tue Jan 05, 2010 5:33 pm

Now why didn't I see that.! Thanks...

Post Reply