Help: Id's can be completly unreliable

Monte Goulding monte at sweattechnologies.com
Wed Nov 10 20:50:40 EST 2010


>> Setting the stack ID to a number below it's current ID is a risk and
>> you are right it's bad practice (I was just trying to work out how
>> you end up with an id of 0 and I still couldn't replicate it) but
>> going the other way is the only way we have to manage icon libraries.
> 
> The docs say you aren't supposed to be able to set a stack ID to anything lower than its current one. I'm surprised you could set it to a negative number, you aren't supposed to be able to do that either.

Ok, that's probably why I got the execution error with all but the negative numbers.
> 
> "A stack's ID is equal to the ID that will be assigned to the next object created within that stack, so the stack ID is subject to change."
> 
> Maybe when you set it to zero, the engine pushed it back up again?

I never said I set it to 0. I was trying to because the original poster said they were getting 0 ids. Any number between 0 and the current stack id will cause an execution error. I was trying to replicate it but I couldn't. But I did find the negative number thing which is weird although probably not worth fixing considering you would have to be an idiot to set the stack id to a negative number and expect everything to work right. 

Cheers

Monte


More information about the use-livecode mailing list