Copy link to clipboard
Copied
Hi All,
We have used the setExtensionPersistent function to make our panel persistent in windows platforms.
So even when a new project is opened there is no onload events happening for the HTML5 page inside the panel.
Is there any events that can be used to identify that a new project is opened? so that in the event handler
we can do the changes for the panel when loading a new project.
Does any of the sample panel examples use any of these features?
Thanks and Regards,
Anoop NR
Since we haven´t found such an event, we´re polling every 5 secs for the app.project.documentID using setInterval. If the ID has changed, we know that a new project has been opened.
I wish there was a more elegant solution.
Thomas
Copy link to clipboard
Copied
Since we haven´t found such an event, we´re polling every 5 secs for the app.project.documentID using setInterval. If the ID has changed, we know that a new project has been opened.
I wish there was a more elegant solution.
Thomas
Copy link to clipboard
Copied
Hi Thomas,
That should work for us too..
So when the new project tab is opened from the File>New>Project, there will not be any active project/document,
and app.project.documentID
will not be having proper value in it, So how is it handled?
Thanks and Regards,
Anoop NR
Copy link to clipboard
Copied
Not sure if that´s what you mean:
try{
$.writeln(app.project.documentID);
}
catch(err) {
$.writeln("nothing");
}
Wrap it in a try/catch!!