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.
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
Please log in to your LassoSoft account to comment
Comments
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 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.