J-Link, UIShowMessageDialog, MessageDialogOptions. Simple code does not work.
Hello all!
Trying to change the name of the dialog box. To display the window I use the UIShowMessageDialog method. If its second parameter is null, then the window name is "Info". I use MessageDialogOptions.SetDialogLabel to set my value. Implemented the interface, and its void method is SetDialogLabel.
The IDE throws the following error:
The method UIShowMessageDialog (String, MessageDialogOptions) in the type Session is not applicable for the arguments (String, void).
My code:
import com.ptc.cipjava.jxthrowable;
import com.ptc.pfc.pfcSession.Session;
import com.ptc.pfc.pfcSession.CreoCompatibility;
import com.ptc.pfc.pfcSession.pfcSession;
import com.ptc.pfc.pfcUI.MessageButton;
import com.ptc.pfc.pfcUI.MessageButtons;
import com.ptc.pfc.pfcUI.MessageDialogOptions;
import com.ptc.pfc.pfcUI.MessageDialogType;
public class TestApp {
public static void start() throws jxthrowable{
Session curSession = pfcSession.GetCurrentSessionWithCompatibility(CreoCompatibility.C4Compatible);
MessageDialogOptions h = new SetDL();
curSession.UIShowMessageDialog("Hello!", h.SetDialogLabel("my title"));
}
public static void stop() throws jxthrowable{
Session curSession = pfcSession.GetCurrentSessionWithCompatibility(CreoCompatibility.C4Compatible);
curSession.UIShowMessageDialog("Goodbye!", null);
}
class SetDL implements MessageDialogOptions{
@Override
public void xdelete() throws jxthrowable {
// TODO Auto-generated method stub
}
@Override
public long getptr() {
// TODO Auto-generated method stub
return 0;
}
@Override
public MessageButtons GetButtons() throws jxthrowable {
// TODO Auto-generated method stub
return null;
}
@Override
public MessageButton GetDefaultButton() throws jxthrowable {
// TODO Auto-generated method stub
return null;
}
@Override
public MessageDialogType GetMessageDialogType() throws jxthrowable {
// TODO Auto-generated method stub
return null;
}
@Override
public void SetButtons(MessageButtons arg0) throws jxthrowable {
// TODO Auto-generated method stub
}
@Override
public void SetDefaultButton(MessageButton arg0) throws jxthrowable {
// TODO Auto-generated method stub
}
@Override
public void SetDialogLabel(String arg0) throws jxthrowable {
// TODO Auto-generated method stub
System.out.println(arg0);
}
@Override
public void SetMessageDialogType(MessageDialogType arg0) throws jxthrowable {
// TODO Auto-generated method stub
}
@Override
public String GetDialogLabel() throws jxthrowable {
// TODO Auto-generated method stub
return null;
}
}
Help me please to solve this problem.
Best Regards!

