On >7.7
Scripting namespace appears to vary depending on which event triggers. In this case from a button.
eg actionPerformed event performs as expected:
[code]
if “_RETARGET_FROM_PROJECT” in globals():
global _RETARGET_FROM_PROJECT,_RETARGET_FROM_GATEWAY
system.util.retarget(_RETARGET_FROM_PROJECT,_RETARGET_FROM_GATEWAY[7:])
else:
system.util.exit()[/code]
will work.
If however you try and use the propertyChange event then globals contains.
{‘app’: <app package app at 14>, ‘shared’: <app package shared at 15>, ‘system’: <app package system at 16>, ‘event’: java.beans.PropertyChangeEvent[propertyName=font; oldValue=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]; newValue=java.awt.Font[family=Dialog,name=Dialog,style=plain,size=21]; propagationId=null; source=PMIButton: Button], ‘fpmi’: <app package system at 16>}
Question is how do you gain access _RETARGET_FROM_PROJECT from outside the actionPerformed event?