iOS pickWheel woes....

BNig niggemann at uni-wh.de
Tue Dec 7 17:26:26 CST 2010


Jim,

I think it is just a question of a short time for Runrev to fix this. The
pick is a much cleaner object than the slotmachine. 
I dont have problems showing/hiding things. At least not in the Simulator.

make a button and set its script to:
----------------
  set the visible of field "myField" to not the visible of field "myField"
-----------------------

and see how it works.

Livecode mobile is really up to something in my opinion. The scroller and
the pick wheel are very welcome objects that behave very nicely even on my
slow iPhone 3G running iOS 4.1. Once the quirks are ironed out they will
make coding life easier.

And I think this was no small feat to implement them. Congratulations to the
Team.

Kind regards

Bernd


Jim MacConnell wrote:
> 
> Bernd,
> Thanks for the advice. 
> 
> I'll play with work arounds for a bit and appreciate your input. I was
> also thinking of using your SlotMachine approach though I have to admit I
> haven't had much luck showing and hiding things on iOs and will have to
> see how I can do that. You are way ahead of me in terms of coding
> expertise. I hope it is simply that I haven't been playing enough.
> 
> The ideal outcome would be for the result of the pick to be available
> without any workarounds which I'm sure is both the intent and where this
> will ultimately end up. It would be nice to know how long that will take
> though.
> 
> Thanks again,
> Jim
> 
> 
> 
> James H. MacConnell
> 
> Consensus Technology, LLC
> 2200 N. 77th St.
> Seattle, WA  98103-4928
> www.consensustech.com
> Tel: 206.524.8555
> Fax: 206.524.3034
> 
> 
> 
> 
> On Dec 7, 2010, at 10:53 AM, BNig wrote:
> 
>> 
>> Hi Jim,
>> 
>> I did not get the  iphonePick listOfData, curIndex to work.
>> 
>> Instead I used a workaround that may or may not suit your needs.
>> 
>> Make a list field (you already have that) and overlay that with a option
>> menu button in front of it.
>> set the blendlevel of the option menu button to 100 to make it
>> transparent.
>> Set the script of the option menu button to 
>> --------------------------
>> on mouseDown
>>   put field "List of Data" into tData
>>   put the hilitedLine of field "List of Data" into tHilite
>>   set the text of me to  tData
>>   if tHilite is  not "" then set the menuHistory of me to tHilite
>> end mouseDown
>> 
>> on mouseUp
>>   put field "List of Data" into tData
>>   put the label of me into tLabel
>>   put lineOffset (tLabel,tData) into tNewSelection
>>   set the hilitedLine of field  "List of Data" to tNewSelection
>> end mouseUp
>> ----------------------------------------
>> 
>> now if you seem to click into the list field you actually trigger the
>> option
>> menu button
>> This button is populated by the content of the list field and its
>> hilitedLine on the fly. The hilitedLine becomes the default of the pick
>> wheel. Now if you make a choice on the click wheel this will hilite the
>> appropriate line in the list field. (or do with the label whatever you
>> want)
>> 
>> This is an ugly hack and whether it works for you depends on what exactly
>> you are trying to do.
>> 
>> Apparently in this lesson:
>> http://lessons.runrev.com/spaces/lessons/buckets/1004/lessons/22980-How-do-I-use-the-Picker-View-on-an-iPhone-
>> they could not either figure it out how it returns a value. They did not
>> even attempt to do it.
>> That may be the reason why they spelled:
>> 
>> England
>> Sctoland
>> Taiwan
>> ...
>> 
>> I hope Richmond does not find out about this. :)
>> 
>> kind regards
>> 
>> Bernd
>> 
>> -- 
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/iOS-pickWheel-woes-tp3075810p3076990.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/iOS-pickWheel-woes-tp3075810p3077436.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list