slylabs13 at me.com
Mon Jan 14 13:39:47 CST 2013
The dictionary shows delete array tArray[x] as the correct syntax. Not sure if this matters though. Also, if the array is stored in a global variable, you may need to use delete global instead. Again, not sure. Worth testing though.
On Jan 13, 2013, at 3:53 PM, Kay C Lan wrote:
> Have your modified your delete handler in the last couple of days?
> Have you modified the handler the Debugger points to in the last couple of days?
> If you were to create a new button (or in the msg box) put:
> repeat with x = 2 to 22
> delete local tArray[x]
> end repeat
> does it still hang? If not, does hard wiring the numbers in your script fix it?
> Does it hang at the very first delete command? If not is it always the
> 2nd (3rd, 4th.. last) delete in the repeat loop or is it always when x
> = a specific number.
> If you replaced delete with put local tArray[x} & cr after msg, does
> it print out as expected?
> What happens if you enclose the delete in a 'try' structure?
> On Mon, Jan 14, 2013 at 4:04 AM, Peter Haworth <pete at lcsql.com> wrote:
>> I have a command that deletes keys from an array, given a start and end key
>> value (the keys are numeric). This has been working fine for months and is
>> simply a repeat loop with a "delete local tArray[key]" command.
>> Suddenly, this has started to cause LC to hang. In debug, as soon as the
>> delete command is executed, I get a runtime error message on a line in a
>> completely different handler and LC hangs hard, needing a force quit to get
>> out of it.
>> The array looks is correctly structured and the start and end key values
>> exist in the array, as do all the key values between them.
>> Any ideas about how to figure out what's going on would be most welcome.
>> lcSQL Software <http://www.lcsql.com>
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode