combobox
Kee Nethery
kee at kagi.com
Mon Mar 21 00:04:04 EDT 2011
On Mar 20, 2011, at 7:46 PM, Terry Judd wrote:
>
>
>
> On 21/03/11 12:38 PM, "Kee Nethery" <kee at kagi.com> wrote:
>
>> Thanks Terry,
>>
>> Actually I'm at the point of one step forward two steps back.
>>
>> I appear to be unable to put the return delimited list into the combobox more
>> than a couple of times. I've tried all of these variations of the script to
>> alter the combobox text:
>>
>> put theList into me
>> put theList into button "myComboBox"
>> put theList into field "myComboBox" of button "myComboBox"
>> put theList into field "myComboBox"
>
> I think you should be setting the text of the button.
set the text of button "myComboBox" to theList
Good suggestion, but it crashed.
>>
>> I can get one or two inserts (I type different things into the combobox)
>> before the whole stack crashes and the apple "Problem Report for LiveCode"
>> appears.
>>
>> ----
>>
>> When I can get the combobox data to get updated, the following scripts don't
>> leave the text selected (the data in the combobox is for these examples always
>> more than 5 characters in length):
>>
>> select char 2 to 5 of me
>> select char 2 to 5 of button "myComboBox"
>> select char 2 to 5 of field "myComboBox"
>> select char 2 to 5 of field "myComboBox" of button "myComboBox"
>> select char 2 to 5 of the label of me
>> select char 2 to 5 of fld 0 of me <-- not sure what "fld 0" is in a button
>> but tried it anyway
>
> So in a keyUp handler you get line 1 of the text of the control (or the
> label of the control) and based on it you create your list of options. You
> then set the text of the control to this list and then select the characters
> as suggested. As in...
To get the data that has been typed the code I use is:
put word 1 of the label of me into theSearchText
No problems with that.
>
> Select char length(<original label>)+1 to -1 of fld 0 of me
That's one of the variations I've been trying and it causes a crash.
>
> Based on my limited testing this works as advertised (it didn't fail on
> repeated testing) on Mac OSX but I can't vouch for it on Windows.
I'm running LiveCode 4.5.1 perhaps this got fixed in one of the later versions? I'll submit a question to Runrev. If I ever get comboboxes to work, I'll post the magic here.
Thanks everyone,
Kee
>
> HTH,
>
> Terry...
>
>>
>> Thank you for your suggestions.
>>
>> The only example I'd seen of changing a combobox contents is in the font
>> portion of the inspector but I'm not sure how to access that code to see what
>> they are doing, how exactly they are referring to that content.
>>
>> The documentation has almost nothing about combo boxes. There is something
>> different about them.
>>
>> Kee
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> --
> Dr Terry Judd | Senior Lecturer in Medical Education
> Medical Education Unit
> Melbourne Medical School
> The University of Melbourne
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
-------------------------------------------------
I check email roughly 2 to 3 times per day.
Kagi main office: +1 (510) 550-1336
More information about the use-livecode
mailing list