mobileControlDelete doesn't work

Rick Harrison harrison at all-auctions.com
Tue Jul 17 16:08:18 EDT 2012


Hi Dixie, Jacque, etc.

Here is the fix!

Since scroller IDs are not deleted even though the
scroller itself is deleted what needs to be done is to:

1. First check for the existence of a scroller ID control.

2. If it doesn't yet exist - then create it.

3. When you closeCard do not delete the scroller (you'll need it again when you come back.)

4. Go to your next card and come back to the original card with the scrollers.
    (This time when the check for existence happens we don't create any new scrollers so they still work fine!)

5. When exiting the stack - Now delete the scroller controls and clean up after things.

I tried it, and it works!

Thank you for your help!

Rick

On Jul 17, 2012, at 1:29 PM, John Dixon wrote:

> 
> Jacque...
> 
> 2 cards in a stack
> Each card has a list field using a scroller
> 
> The scroller will work on card 1
> Go to the second card
> The scroller will work on card 2
> Go back to the first card
> The Scroller will not scroll
> Go to the second card
> The scroller will not scroll
> 
> This has been the case for an awful long time... This is not a problem when scrolling groups on multiple cards using scrollers, only it seems when an LC list field is involved.
> 
> be well
> 
> Dixie
> 
>> Date: Tue, 17 Jul 2012 12:13:37 -0500
>> From: jacque at hyperactivesw.com
>> To: use-livecode at lists.runrev.com
>> Subject: Re: mobileControlDelete doesn't work
>> 
>> On 7/17/12 11:16 AM, Rick Harrison wrote:
>> 
>>> On one card, I created a scroller field which works just fine.
>>> When I use the closeCard to execute the mobileControlDelete
>>> the result content reports empty.
>> 
>> That's correct and it means the deletion was successful. If there was a 
>> problem, the result would contain an error message.
>> 
>>> The control stops working
>>> as one would expect, however when proceeding to the next card
>>> which also creates a new scroller, the id of the new scroller field
>>> reports as being 2, which indicates that the first scroller was never
>>> deleted.  Of course as one goes from card to card the id keeps
>>> increasing because none of the controls are really getting deleted.
>> 
>> Not exactly. ID numbers are never reused, they increase throughout the 
>> session. The ID number doesn't mean anything per se, it just identifies 
>> the object.
>> 
>> It sounds like your scroller is working properly.
>> 
>> -- 
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>> 
>> 
>> 
>> _______________________________________________
>> 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
> 		 	   		  
> _______________________________________________
> 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






More information about the use-livecode mailing list