EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 09-24-2010, 07:31 PM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Default Conditional Help

OnShow="
Parent.Parent.MakeLarge.LargeReady ? Parent.Parent.MakeLarge.Press=true : ''"

Should that work?

My goal is to get a button to be pressed but only if another data element is set to true.

So far it fires no matter whatever the data element is set to.

Silat
Reply With Quote
  #2  
Unread 09-25-2010, 12:09 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Your syntax looks incorrect. And looking at it a second time, needlessly complicated.

I'm not exactly sure what your code wants to do... but I'm guessing this is more what you want.

Parent.Parent.MakeLarge.Press=Parent.Parent.MakeLarge.LargeReady

This would be exactly the same as:
Parent.Parent.MakeLarge.Press=Parent.Parent.MakeLarge.LargeReady ? true : false

Synax:
ValueToBeAssigned=BooleanValue ? ValueIfBooleanTrue : ValueIfBooleanFalse
Reply With Quote
  #3  
Unread 09-25-2010, 05:08 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by EQAditu View Post
Parent.Parent.MakeLarge.Press=Parent.Parent.MakeLarge.LargeReady

This would be exactly the same as:
Parent.Parent.MakeLarge.Press=Parent.Parent.MakeLarge.LargeReady ? true : false
Unless this was changed I don't think so. The .Press command disregards the argument, so it would fire even on Press=false. You must use .Activated for stuff like this.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #4  
Unread 09-25-2010, 06:39 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

*shrug* I've never used buttons to run scripting through scripting so I guess I wouldn't know. Supposedly Buttons and Pages are both direct children of Widgets, but it seemed cleaner to me to use the simpler object to contain my scripts instead of using a UI element that expects input but is getting it simulated.

Regardless, I stand by what I said about the incorrect syntax and the comparison of complexities. What was originally written would have had the same problem regardless of the event triggered.

Last edited by EQAditu : 09-25-2010 at 06:42 AM.
Reply With Quote
  #5  
Unread 09-25-2010, 08:25 AM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Default

Yea .Press fires regardless of argument so that was why I was trying the conditional. I will look into .Activated.

Thanks for the input.

Edit: Figured out another way to achieve the same goal. Now I just want to try to fix the dropdown problem.



Silat

Last edited by TalTal : 09-25-2010 at 09:29 AM.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:53 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI