SYS(2015)is guaranteed to be unique
within the same PC. AFAIK, nobody proved otherwise yet.
>Does SYS(2015) have a more discrete resolution than 1/1000 seconds? If not, is there not a possibility that the same handle could be assigned to more than one object or property?
>
>
>>Counterexamples:
>>
>>
= createobject("custom")
>>with createobject("custom")
>> * ...
>>endwith
>>return createobject("custom")
>>
>>What are the names of the created objects?
>>
>>
local o1, o2, a[1]
>>o1 = createobject("custom")
>>o2 = m.o1
>>a[1] = m.o1
>>
>>What is 'the' name of the created object?
>>
>>As I said, if you need a global name then you need a global anchor of sorts. Fernando's suggestion is the easy to implement and should be fairly robust, especially if you make good use of SYS(2015) where appropriate. If you want to keep the number of global names used to a minimum then a CUSTOM object could serve as a collection (.AddObject your objects to it with a SYS(2015)-enhanced name so that you can access them by name or via the .Controls collection). This registry object would consume only one global name but it could provide any number of globally reachable names for your objects. If you .AddObject the registry object - or your objects themselves - to the global _SCREEN object then they will survive a CLOS ALL and a RELE ALL EXTE. *g*
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison