Problem deleting element of array

Phil Davis revdev at pdslabs.net
Thu Oct 17 15:30:14 EDT 2013


Just FYI - If you say "if myArray is empty" in pre-6.0 versions of LC 
you will get true, even when it has elements. Try "if myArray is an array"

Phil


On 10/17/13 11:39 AM, Timothy Bleiler wrote:
> I have a script that deletes an element from an array.
>
> Delete variable MyArray [ "MyElement" ]
>
> Instead of deleting just "MyElement", "MyArray" is being set to empty.
>
> I can not duplicate the problem in any other script. The problematic line behaves correctly in other simple scripts. Is there some setting that I'm missing that could cause this? If not is there any way to get the "bad" script to behave properly?
>
>
> Thanks,
> Tim Bleiler, Ph.D.
> Instructional Designer, HSIT
> University at Buffalo
>
>
> _______________________________________________
> 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
>

-- 
Phil Davis





More information about the Use-livecode mailing list