XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Mar 28日 07:49

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2013年 Aug 3日 16:22 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 421
Is it possible to include any other file containing javascript code?

include("vitality.js");
include("volume.js");
include("functions.js");


Last edited by yereverluvinuncleber on 2013年 Aug 8日 08:00, edited 2 times in total.

Top
 Profile  
 
PostPosted: 2013年 Aug 6日 06:33 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 421
It would be nice to get an answer to this one, so I am assuming this function does not exist and that I need to pull all the code into one file, script.js.

If this is the case then I'd make it a feature request to 'include' this functionality. Each included script file would appear in a tab in the editor window.


Top
 Profile  
 
PostPosted: 2013年 Sep 22日 23:04 
Offline
User avatar

Joined: 2013年 Mar 8日 22:27
Posts: 351
Possible but not as straightforward as you describe here. include() is not supported in MS Script Host. See MSDN for more details about that.
However, it may be possible by adding the references to the script file in the widget xul (main.xul) file. The XUL file format allows that. Simply open up the file in a text editor and add your script file(s).
Code:
<script src="somefile.js"/>


However, I've never tested this and this feature depends on the XWidget XUL parser. Hope it helps! :)

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: 2013年 Sep 23日 04:10 
Offline
User avatar

Joined: 2012年 May 12日 20:32
Posts: 559
yereverluvinuncleber wrote:
It would be nice to get an answer to this one, so I am assuming this function does not exist and that I need to pull all the code into one file, script.js.

If this is the case then I'd make it a feature request to 'include' this functionality. Each included script file would appear in a tab in the editor window.



Hi, you can check this TODOList widget, it's script add two js files: http://www.xwidget.com/xwidget/widgets/ ... 2/421.html
put this code at first line of script:
Code:
eval(readFile(WidgetPath + "other_script.js"));

_________________
XWidget Software Developer
[XWidget for Android] [Lastest version of XWidget] [Lastest patch of XWidget]
[XDesktop for Android/Windows]


Top
 Profile  
 
PostPosted: 2013年 Sep 23日 11:48 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 421
Thanks ever so - it will really simplify some of my code to allow .js inclusion - will give it a try and let you know how I get on.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Adiim, jimking and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group