XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Dec 15日 15:37

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2016年 Jun 4日 06:58 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Folder names for source images are relative when you assign an image to an object but NOT when using a comparison, so this sort of thing works - an assignment:

leftscale.src = "centigradescale.png"; //success - it can find this image as it uses the relative folder location.

However, when you use an if () {} construct to compare the same object variable you need to use the full path.

Example:
if(leftscale.src == "centigradescale.png"){

The above does not work as the full path is required.

print (leftscale.src); shows the following path in full :

D:\Program Files (x86)\XWidget\AppData\Widgets\Steampunk CPU GPU Thermometer Xwidget\centigradescale.png

So that this if construct is required as a comparator:

if(leftscale.src == "D:\Program Files (x86)\XWidget\AppData\Widgets\Steampunk CPU GPU Thermometer Xwidget\centigradescale.png"){

The above works but is counter intuitive as one usage allows relative comparisons but not the other. Both the assignment and comparator should be the same. This is an unwanted feature of Xwidgets (as it runs under Win10). On any other engine and in any other language this would be considered an obvious and serious BUG.


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 10 guests


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:  

Powered by phpBB® Forum Software © phpBB Group