[MonoTouch] Monotouch dialog help needed.
Nic Wise
nicw at fastchicken.co.nz
Mon Oct 31 11:40:19 EDT 2011
Keep a reference to the FloatElement :)
outside the method:
FloatElement floatElement;
in the method you build the root with:
floatElement = new FloatElement(null, null, 0.5f);
> new RootElement ("Brightness"){
>
> new Section (){
>
> floatElement <---- not the new FloatElement(etc)
>
> }
>
> }
then, somewhere else:
float foo = floatElement.Value;
(might be .FloatValue, and you MIGHT need to call .FetchValue first! not sure)
I sometimes keep sections around, too, if I need to change them at
runtime (hide, show, add items etc). Seldom keep Root's around, as I
can usually get them easily.
On Mon, Oct 31, 2011 at 15:14, Mittchel Van Vliet <mittchel at gmail.com> wrote:
> Hello everyone,
> Currently I am checking out MonoTouch Dialog and found some interesting
> things.. Though there is one problem that keeps persisting with me.
> How am I able to extract the value of a specific item? For example I got a
> FloatElement:
>
> RootElement root = new RootElement ("Settings") {
>
> new Section (){
>
> new RootElement ("Brightness"){
>
> new Section (){
>
> new FloatElement (null, null, 0.5f)
>
> }
>
> }
>
> }
>
> } ;
>
> My initial idea was to make it a slider for a kilometer range.. but how am I
> able to extract the selected data from the slider?
> I hope someone can help me with this :)
> Thanks!
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
--
Nic Wise
t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
More information about the MonoTouch
mailing list