Hi Nic,

Thanks for your answer.

I should have phrased my question more precisely. Is it possible to not
instantiate all Elements and add them to the RootElement before the view
does appear, but rather create them as needed within a kind of
GetElement method?

Guido

On 4 September 2012 13:08, Nic Wise <[email protected]> wrote:
> Absolutely :)
>
> The default ones already do this
>
> https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/MonoTouch.Dialog/Elements.cs#L271
>
> (and it's in other places too)
>
> IF you have made your own element, you are responsible for doing it,
> but you can, easily, do it.
>
> I suggest you split your GetCell into 2 parts:
>
> https://gist.github.com/3620212
>
> If you set colors, dont forget to reset it for each one - otherwise
> you end up with red bits where you want green etc :)
>
>
>
>
> On Tue, Sep 4, 2012 at 11:53 AM, Guido Van Hoecke <[email protected]> wrote:
>> Hi,
>>
>> My app happily uses the Monotouch.Dialog framework.
>>
>> Some of its dialogs list values from a database. Basically my approach
>> is to create a new DialogViewController and wait for the
>> ViewWillAppear event.
>>
>> The corresponding event handler creates a new RootElement and fully
>> populates it with an Element for each of the retrieved database rows.
>>
>> I realise that this would e.g. build 1k cells for 1k rows, so I
>> probably should dequeue reusable cells and only build the Elements as
>> requested by the GetCell method.
>>
>> Is this possible within the MT.D framework using RootElement, Section
>> and Element objects?
>>
>> Thanks in advance
>>
>> Guido
>>
>> --
>> It is the nature of extreme self-lovers, as they will
>> set a house on fire, and it were but to roast their eggs.
>>                 -- Francis Bacon
>>
>> http://vanhoecke.org ... and go2 places!
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> 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/
>
> 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
> Earnest: Self-employed? Track your business expenses and income.
> http://earnestapp.com
> Nearest Bus: find when the next bus is coming to your stop. 
> http://goo.gl/Vcz1p
> London Bike App: Find the nearest Boris Bike, and get riding! 
> http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to