Lasso Soft Inc. > Home

RhinoTrac

LassoSoft Ticket Tracking System

NOTE: If you are using Lasso Server 9.3 please Log your ticket directly via the LUX admin as this will give us more information about your issue.

Lasso 9 Issues



Ticket #7739: Accessing Properties in a Thread Object's Method

Reported by:
smiller
Date:
25 Mar, 2014
Priority:
minor
Component:
Lasso 9
Version:
9.2.7
Keywords:
Platform:
Linux
Some code I've written in some MailBeaver thread-objects uses the form threadName->property instead of .property

I've just discovered that this doesn't yield the expected result. Is the output of the following test-case expected?

Program:

define foo => thread {
data public bar::boolean

public wtf => {
stdoutnl("foo->bar->type: " + foo->bar->type);
stdoutnl("foo->bar: " + foo->bar);
stdoutnl(".bar->type: " + .bar->type);
stdoutnl(".bar: " + .bar);
}
}

foo->bar = true;
foo->wtf;

Output:

foo->bar->type: null
foo->bar:
.bar->type: boolean
.bar: true

Comments

11 Jun, 2014 by Paul Higgins
This does seem strange.
23 Sep, 2015 by Eric Knibbe
This code:
define foo => thread {
data public bar::boolean = false
public wtf => {
stdoutnl(".bar->type: " + .bar->type);
stdoutnl(".bar value: " + .bar);
stdoutnl("foo->bar->type: " + foo->bar->type);
stdoutnl("foo->bar value: " + foo->bar);

}
}
foo->bar = true;
foo->wtf;
stdoutnl("foo->bar->type: " + foo->bar->type);
stdoutnl("foo->bar value: " + foo->bar);

returns:
.bar->type: boolean
.bar value: true
foo->bar->type: null
foo->bar value:
foo->bar->type: boolean
foo->bar value: true

indicating that threadname->property syntax only seems to work properly if called outside the thread object's methods.
Please log in to your LassoSoft account to comment

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft