Skip to main content

Getting the value of an attribute of an instance in thr trigger.

1 reply [Last post]
mitesh51
Offline
Joined: 2008-04-14
Points: 0

How to get the value of an attribute of an instance of a class in the trigger of the same class if the trigger is being invoked by another instance of the same class ?

e.g.,
trigger on ComboSliderItem.currentValue = value {
//
var rangeVal =value;
var granVal=otherInstance.granCurrentValue;
this.numberOfRows =rangeVal/granVal;
System.out.println("Current value inside trigger is....{rangeVal}....{granVal}.....{numberOfRows}");

}

in the above example, I have to get the value of attribute named "granCurrentValue "of object named "otherInstance" , if the trigger is being invoked by the object other than "otherInstance".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tskale
Offline
Joined: 2005-08-17
Points: 0

I don't think you can!

All code executing in the body of the trigger executes within the scope of THE CURRENT INSTANCE THE TRIGGER fired on.