---------- Forwarded message ----------
From: Andrea Chiumenti <[email protected]>
Date: 2010/2/25
Subject: Help with implementing a java OXT component
To: [email protected]
Hello I've used netbeans to create an OXT component.
The component task will be to save the document and send a notification
message to another application.
The problem is that I've something worng on dispatch method the makes OO to
show an alert saying that capability is not supported by the current os.
the dispatch method is:
-----------------------------------------------------------------------------------------------------------------------------------
public void dispatch(com.sun.star.util.URL aURL,
com.sun.star.beans.PropertyValue[] aArguments)
{
if (aURL.Protocol.compareTo("it.wingstech.gam.saver:") == 0)
{
if (aURL.Path.compareTo("GamSave") == 0)
{
XTextDocument xDoc = (XTextDocument)
UnoRuntime.queryInterface(
XTextDocument.class,
m_xFrame.getController().getModel());
xDoc.getText().setString("Hello World " +
Calendar.getInstance().getTime().toString()); // only for test purposes
try
{
XStorable xStorable = (XStorable)
UnoRuntime.queryInterface(
XStorable.class, xDoc);
xStorable.store();
//will send notification message here
return;
}
catch (IOException ex)
{
xDoc.getText().setString(ex.getMessage());
}
}
}
}
-----------------------------------------------------------------------------------------------------------------------------------
Could you tell me please where I am wrong ?
Thanks in advance,
kiuma