i can refer to it in code
Code: Select all
x:=oThread:getvar("userid")
Code: Select all
x:=[oThread:getvar("userid")]
? &x
Code: Select all
x:=oThread:getvar("userid")
Code: Select all
x:=[oThread:getvar("userid")]
? &x
Code: Select all
x:='{|o| o:getvar("userid")}'
bBlock := &(x)
? eval(bBlock,oThread)
Code: Select all
x:='userid'
bBlock := &('{|o| o:getvar("'+x+'")}')
? eval(bBlock,oThread)
skiman wrote:Brian,
Code: Select all
x:='userid' bBlock := &('{|o| o:getvar("'+x+'")}') ? eval(bBlock,oThread)
Code: Select all
bBlock := {|o,x| o:getvar(x)}
x:="userid"
? eval(bBlock,oThread,x)
Code: Select all
bBlock := {|o,cVar,oProfile| oProfile:=o:profile, oProfile:getvar(cVar) }
x := 'userid'
cUserid := eval(bBlock,oSession,x)
Chris,skiman wrote:Hi Brian,
Can you explain this? It should work without any problem.
Also the previous posted code can be optimized this way:
For your oSession sample:Code: Select all
bBlock := {|o,x| o:getvar(x)} x:="userid" ? eval(bBlock,oThread,x)
Code: Select all
bBlock := {|o,cVar,oProfile| oProfile:=o:profile, oProfile:getvar(cVar) } x := 'userid' cUserid := eval(bBlock,oSession,x)
what about using oProfile:Cargo Slot ?bwolfsohn wrote: The oThread example works perfectly...
the oProfile example does not...
getvar is not a method in osession
Code: Select all
bBlock := {|o,cVar,oProfile| oProfile:=o:profile, oProfile:&(cVar) }
x := 'userid'
cUserid := eval(bBlock,oSession,x)