download the General Interface™ documentation and make sure that it is installed in the doc/ directory.");
}
};
objJSX.openAPIDoc = function() {
var p = jsx3.ide.getPlugIn("jsx3.ide.apidoc");
if (p && p.isInstalled())
p.openDoc();
else
this.getServer().alert("API Documentation Not Installed",
"It appears that the API documentation is not installed correctly in the api/xml directory.");
};
objJSX.onNewProject = function() {
jsx3.ide.newProject();
};
objJSX.onJoin = function() {
var url = this.getServer().getDynamicProperty("signup_url");
jsx3.ide.openConsoleWindow(url,
'jsxide_devsignup',null,null,'yes','yes','yes','yes','yes');
};
objJSX.initTool = function() {
var settings = jsx3.ide.getIDESettings();
// set checked state of "show dialog" check box
var bOpen = settings.get('prefs', 'builder', 'welcome_v', jsx3.getVersion());
chk_open.setChecked(bOpen || bOpen == null);
// give context-sensitive help hint
var helpKey = this.getServer().getDynamicProperty("jsx3.app.Server.help." + jsx3.app.Browser.getSystem()) ||
this.getServer().getDynamicProperty("jsx3.app.Server.help");
if (helpKey) {
var key = jsx3.gui.HotKey.valueOf(helpKey);
ctxHelpTip.setText("Type " + key.getFormatted() + " anywhere in General Interface Builder for context-sensitive help.", true);
}
// set close button icon (resolve URI)
var closeBtn = btn_close;
closeBtn.setText('' + closeBtn.getText(), true);
// set version string
var v = jsx3.getVersion().split(/\./g);
v = v.slice(0, v[2] == 0 ? 2 : 3).join(".");
version.setText("Version " + v);
// set recent projects
var recentHTML = "";
var doOpenProject = "doOpenProject";
var iconURI = this.getServer().resolveURI("images/icon_82.gif");
var projects = jsx3.ide.getRecentProjects();
for (var i = 0; i < 6 && i < projects.length; i++) {
var path = projects[i];
var label = String(path);
if (label && label.indexOf(jsx3.APP_DIR_NAME) == 0)
label = label.substring(jsx3.APP_DIR_NAME.length + 1);
label = jsx3.util.strTruncate(label, 24, null, 0);
recentHTML += '' +
'' + label + '
';
}
recentProjects.setText(recentHTML, true);
updatesRSS.subscribe("xmlbind", this, "_onUpdatesBind");
forumRSS.subscribe("xmlbind", this, "_onForumBind");
this._mm = new jsx3.amp.util.MenuManager();
this._mm.addMenuBar("/", menuContainer);
var menu = new jsx3.ide.ui.UserProjMenu(this.getPlugIn(),
new jsx3.amp.XML({"@id":"jsx3.ide.welcome.userMenus", "@path": "/"}));
this._mm.addMenu(menu);
this._mm.finishInit();
};
objJSX._onUpdatesBind = function(objEvent) {
if (objEvent.xml.getNamespaceURI() == jsx3.app.Cache.XSDNS &&
(objEvent.xml.getNodeName() == "error" || objEvent.xml.getNodeName() == "timeout")) {
objEvent.target.unsubscribe("xmlbind", this);
objEvent.target.resetXmlCacheData();
objEvent.target.setXMLURL(null);
objEvent.target.setXMLString(
'' +
'- ' +
' Got the latest?' +
' http://developer.tibco.com/gi' +
' Visit the General Interface Developer Center for the latest updates, news, articles, tutorials, how-to videos, discussions, downloads, development utilities, and more.' +
'
' +
'- ' +
' Where\'s the source code?' +
' http://gi.tibco.com' +
' The General Interface open source project home page connects you with the source code for GI, bug tracking, enhancement requests, specialized GI builds, and more useful tools.' +
'
' +
''
);
}
};
objJSX._onForumBind = function(objEvent) {
if (objEvent.xml.getNamespaceURI() == jsx3.app.Cache.XSDNS &&
(objEvent.xml.getNodeName() == "error" || objEvent.xml.getNodeName() == "timeout")) {
var dev_url = this.getServer().getDynamicProperty("dev_url").replace("&", "&");
var sample_url = this.getServer().getDynamicProperty("sample_url").replace("&", "&");
var feedback_url = this.getServer().getDynamicProperty("feedback_url").replace("&", "&");
objEvent.target.unsubscribe("xmlbind", this);
objEvent.target.resetXmlCacheData();
objEvent.target.setXMLURL(null);
objEvent.target.setXMLString(
'' +
'- ' +
' GI Development' +
' '+ dev_url +'' +
'
' +
'- ' +
' GI Sample Applications' +
' '+ sample_url +'' +
'
' +
'- ' +
' GI Feedback' +
' '+ feedback_url +'' +
'
' +
''
);
}
};
]]>