cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

JLink SessionActionListener not working

Highlighted
Newbie

JLink SessionActionListener not working

I am having problems with getting the 'OnAfterWindowChange' event to be triggered in a SessionActionListener for a synchronous JLink application under Wildfire 3.0. My Jlink application is running fine, and my sessionActionLister (called MySessionActionListener) is initialized and executing properly for the 'OnAfterModelDisplay' trigger. However, the 'OnAfterWindowChange' trigger never seems to be executed. Since the 'OnAfterModelDisplay' trigger is working properly I assume that my code is correct.

I am assuming that the 'OnAfterWindowChange' event is triggered whenever a user clicks on a different ProE window containing a different model.
Are there any known issues with 'OnAfterWindowChange' trigger in JLink for Wildfire 3.0?

Thank you in advance for any insight on this issue.

// THIS IS HOW I AM INSTALLING THE ACTION LISTENER

public static void start() {

try {

Session curSession = pfcGlobal.GetProESession( );

curSession.AddActionListener(new MySessionActionListener());

} catch (com.ptc.cipjava.jxthrowable e){

printMsg("ERROR:StartMcadMetricsTracker:start:Could not establish current ProE session"+e);

}

}

// THIS IS MY ACTION LISTENER

// THE OnAfterModelDisplay TRIGGER WORKS AS EXPECTED,

// BUT I GET NO OUTPUT FROM THE OnAfterWindowChanged TRIGGER

class MySessionActionListener extends DefaultSessionActionListener

{

public void OnAfterWindowChange(Window newWindow) throws jxthrowable {

printMsg("OnAfterWindowChange event occurred"); // THIS ACTION LISTENER IS NEVER EXECUTED

}

public void OnAfterModelDisplay() throws jxthrowable {

printMsg("OnAfterModelDisplay event occurred"); // THIS ACTION LISTENER WORKS AS EXPECTED

}

}

1 REPLY 1

Re: JLink SessionActionListener not working

I upgraded to a newer version of Wildfire and things seem to be working now