AW: has anybody ever set a reference to 'unset_reference'

Udo Sonnabend | WigaSoft AG U.Sonnabend at wigasoft.ch
Mon Mar 22 20:48:38 UTC 2021


Hi Doug

How do you test procedural for that value ?

I was'nt successfulwith:

If lRef='Unset reference'
or
If lRef.$name='Unset reference'
....

If you have a successful if-command which evaluate to 'Unset reference', you could try:
Set reference lRef to 'Unset reference'

Regards, u.



WigaSoft AG
Udo Sonnabend
Entwickler

Oberstrasse 222 | Postfach 51 | CH-9014 St. Gallen
Telefon +41 71 274 51 31 | www.wigasoft.ch<http://www.wigasoft.ch/> | U.Sonnabend at wigasoft.ch<mailto:U.Sonnabend at wigasoft.ch>


Diese Mitteilung kann persönliche, vertrauliche oder rechtlich geschützte Informationen enthalten und ist nur für die Verwendung durch den beabsichtigten Empfänger bestimmt. Auf Vertraulichkeit oder Rechte wird aufgrund von Fehlübertragungen nicht verzichtet. Wenn Sie nicht der beabsichtigte Empfänger dieser Mitteilung sind, dürfen Sie diese in keiner Form verwenden, verbreiten oder kopieren. Haben Sie diese Mitteilung irrtümlich erhalten, dann löschen Sie diese und allfällige Kopien und benachrichtigen Sie bitte unverzüglich den Absender – besten Dank.

P Bitte denken Sie an die Umwelt, bevor Sie dieses Mail drucken. Think before print!

________________________________
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> im Auftrag von Doug Easterbrook <doug at artsman.com>
Gesendet: Montag, 22. März 2021 18:55
An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Betreff: Re: has anybody ever set a reference to 'unset_reference'

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

_____________________________________________________________
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