Page 1 of 1

Component and Property Source Order

Posted: Fri Jun 30, 2017 8:00 am
by jyoung
I stumbled into this today and I never realized or noticed it before, so I just wanted to know if this is the normal behavior.

When defining a property the that has a dynamic reference, does the location of the define_com (in the source) for the component matter?

For example:
When the component is defined before the property
before.png
before.png (5.67 KiB) Viewed 4201 times
but when the component is defined after the property
after.png
after.png (7.06 KiB) Viewed 4201 times
I get an error.

Is this normal? Like I said I've never seen it before.

Re: Component and Property Source Order

Posted: Fri Jun 30, 2017 6:12 pm
by Stewart Marshall
Hi Joe

The Get portion of the Property definition seems to be OK, but as soon as the Set is added the sequence of the declarations becomes important.

This is perfectly normal, albeit a little strange.

LANSA is quite flexible in where it lets you define certain things, but best practice is always to put declarations above the place where the variable is used.

Regards