XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently March 28th, 2024, 7:55 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: June 4th, 2016, 6:58 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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 63 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:  
cron

Powered by phpBB® Forum Software © phpBB Group