Object or Object Ref

John Boehme john at integralservices.biz
Sat Jan 20 07:33:54 UTC 2024


Hi Udo,

A method that is available to an object is $validref. If Kellys suggestion
below doesn't work, this I think would:

If $cinst.$validref()
      # getting objref from $newref()
Else
       # getting itemref from $new()
End if


John Boehme
940-597-3046

-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf
Of Kelly Burgess
Sent: Thursday, December 28, 2023 5:37 AM
To: OmnisList
Subject: Re: Object or Object Ref

Hi Udo,

>Is there a way to detect INSIDE the RUNNING $construct of the class whether
it is instanciated as normal kobject or as kobjectref ?

See if this will work for you.

If isnull($cinst.$objref())
	# getting itemref from $new()
	Breakpoint
Else
	# getting objref from $newref()
	Breakpoint
End If

Kelly
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com Start a new
message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list