has anybody ever set a reference to 'unset_reference'

Doug Easterbrook doug at artsman.com
Mon Mar 22 17:55:45 UTC 2021


hi Nick, 

I can’t do that in a locked library or if there are other variables referring to it.

you can set booleans to null, integers to zero (or null)… dates to null or empty.

there is just no way to set an item ref to be ‘unset’.


I’ve reported to omnis and raised an enhancement to allow it.    




Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On March 22, 2021, at 8:55 AM, Nick Renders <omnis1 at arcict.com> wrote:
> 
> Hi Doug,
> 
> Have you tried deleting the variable and recreating it?
> It's a convoluted way, but in theory it should result in an unset reference.
> 
> Nick
> 
> 
> On 20 Mar 2021, at 21:54, Doug Easterbrook wrote:
> 
>> hi all.
>> 
>> if you declare a variable and an itemref an never set it to anything, it has a nice value of being an 'unset reference’
>> 
>> 
>> if, in your code, you actually set the itemref to anything like ($cobj, $cwind, $cfield, anything) using
>> 
>> set reference MyItemRef to $cfield
>> 
>> then it is nicely set.
>> 
>> 
>> 
>> the question is … has anybody figured out how to make it an unset_reference again?
>> 
>> 
>> you can set the reference to ‘’ or #null, but that does not leave the item reference as unset.
>> 
>> eg
>> 
>> set reference MyItemRef to ‘’    or
>> set reference MyItemRef to #NULL or
>> do myItemRef.$assign()
>> 
>> your reference cannot be made ‘unset’
>> 
>> 
>> anybody done this?? or have a hint?
>> 
>> 
>> Doug Easterbrook
>> Arts Management Systems Ltd.
>> mailto:doug at artsman.com
>> http://www.artsman.com
>> Phone (403) 650-1978
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list