[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum • View topic - HELP: Opacity expressed differently in code vs IDE - CLOSED

XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently April 16th, 2024, 11:52 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: June 4th, 2016, 2:24 pm 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
In the IDE the opacity of an object can be expressed from 1-100 in percentage terms. That is good.

However, in the use of code there is a massive inconsistency, the object's opacity can only be set at two values, either 0 or 1. Transparent or opaque.

It is as if Tony has forgotten that opacity is different from visibility. Visibility is correctly expressed as a boolean whilst opacity is a gradient from 1-100 or 0-255.

Most other engines and languages will allow opacity to be expressed in values from 0-255. The Xwidget IDE having only a percentage available is limited but just acceptable but the code limitation of an opacity limited to 0 or 1 is unacceptable. This, without a doubt - is a BUG.


Last edited by yereverluvinuncleber on June 5th, 2016, 7:25 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: June 4th, 2016, 3:40 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
I know what do you mean and if through the js doesn't work properly I agree that something is wrong. But I have the same question: When you want a certain function that you can simply use through the designer's menu, why you try to do all through the script..?! There is already the opacity meter for all the components and works perfectly! Why don't use it..? I will never understand you on this.... :lol:

I can understand that as a prof designer you are used to do it, but I checked all your widgets and none of them uses neither one of the designer's functions.. This is crazy man..! :?

(friendly speaking of course, so don't take my comment as an accusation. You're free to do it as you want)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: June 4th, 2016, 5:49 pm 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
No, you have it all wrong. I am changing the opacity in code because I have a function that simply requires it. Changing it in the IDE is not relevant to this function so it has to be done in code. The function that I am coding no longer operates when I tried to implement it because of the inconsistency in xwidget's handling of opacity in scripts.


Top
 Profile  
 
PostPosted: June 4th, 2016, 6:21 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
You know better. It's your work after all. I will see it in practice then..

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: June 4th, 2016, 6:53 pm 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
Go to bed!


Top
 Profile  
 
PostPosted: June 4th, 2016, 10:15 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Try
edit1sensor1.Opacity = 0.5
The range appears to be 0 to 1
Seems to work for me.


Top
 Profile  
 
PostPosted: June 5th, 2016, 3:58 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
Wow, the instructions expressed an int boolean - I'll check and see, thankyou!


Top
 Profile  
 
PostPosted: June 5th, 2016, 7:24 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
Meme, your suggestion worked - perfectly.

To have a percentage expressed as a decimal value below 1 is quite bizarre when the IDE expresses it as you would expect as an integer value between 1 and 100. Other engines express it as a value from 0-255 but base javascript does express it in the same way as Xwidgets. I suppose I should have guessed it but what led me astray is that the auto-completion suggest is purely an integer value of either 0 or 1 (I won't trust that anymore).

Thanks again.


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: Bing [Bot] and 21 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