Session Refs

Das Goravani goravanis at gmail.com
Tue Feb 1 14:07:27 UTC 2022



> On Jan 31, 2022, at 10:09 PM, Kelly Burgess <kellyb at montana.com> wrote:
> 
> Hi Das,
> 
>> Here is my method line that makes my REF to the session object:
>> 
>> Calculate tSessObjPGRef as $extobjects.PGSQLDAM.$objects.PGSQLSESS.$newref()
>> 
>> It makes a REF OK, but it’s not the one that is logged on?
> 
> $newref() always creates a new instance of something and gives you back an object reference to it.  You should be doing this, and THEN logging on with that reference.  Any previous logon had to happen in a different session instance.
> 
> To get to an existing session, look in $root.$sessions, and maybe you can
> 
>  Calculate tSessObjPGRef as $root.$sessions.1.$sessionobjref
> 
> or substitute a known session name for the '1' above that simply references the first session.
> 
> Kelly

I did this as you say:

> Calculate tSessObjPGRef as $root.$sessions.1.$sessionobjref

I did it and it worked. I am surprised. I wonder where you got "$sessionobjref" from.. as it’s not listed as a method under Sessions in the notation inspector. I wouldn’t have known about it, wouldn’t know to use that.. but it does assign an object to tSessObjPGRef.. I can’t tell if it’s the right object just looking at the mouse over value, but it is an object.. and I assume it’s the right one since it is being generated from my logged on session..

I’ll take your point made above that.. about using the $newref I made from PGSQLSESS.. use that to log on.. seems I have things going on in the wrong order of events.. now I understand.. what to do.. how to do it. 

Session objects and refs are confusing to me, I must admit.. probably because I don’t get what is in a session, where it comes from, how it’s generated.. but it is slowly becoming more clear.. 


More information about the omnisdev-en mailing list