EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 02-25-2006, 04:30 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

1 minor correction on comparisons...

Text is not converted to 0 if both sides of the comparison are text. I've been using text comparisons against sub-class name to derive Market window menu selections for a while now.

Some of this stuff was experimented with and dicussed in this thread

I suspect the cat opperator was added shortly after that discussion and passed on to us in the semi-recent UIBuilder update. I did discuss this with one of Bobble's colleges around that time.
Reply With Quote
  #2  
Unread 07-21-2006, 12:34 PM
Erahain Erahain is offline
A Crazed Gnoll
 
Join Date: Jan 2006
Server: Antonia Bayle
Posts: 23
Default

Are you sure you are not only talking about the == and != operators
now? They are purely for string comparison if i remember correctly.
I.e. its never converted to numbers.

The operators I suggested converted string to numbers were
>= <= > and <.

This was explained in an earlier post.

It might even be possibe that a string is converted to strlen(string);
thus the length of the string in numbers.

Maybe we should try making a length comparison:
COND1 = 'helloo' > 5
... should in theory return true.

I've not been playing with this for a while.
But I'm gonna do that now.
Reply With Quote
  #3  
Unread 04-21-2007, 12:42 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Has anyone really gotten a conditional to work or have any actual working examples? I've been trying to use one and it never does anything.

COND ? case1

gives me case1 regardless of what COND is.

COND ? case1 : case2

gives me case2 regardless of what COND is.
Reply With Quote
  #4  
Unread 04-21-2007, 07:07 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Conditionals are great, same as the operators - they allow you to do at least some minimal processing in the code. I use them in several windows. See below for a combination of conditionals and concactenation from my automatic per-character mail signature function:

SignatureLocation=&apos;Parent.&apos; ## Parent.Selfname.LocalText ## &apos;.Signature&apos;
Parent.RetrieveSignature.OnPress=&apos;Parent.AddSignature.SignatureText=&apos; ## (SignatureLocation)
Parent.RetrieveSignature.Press=True
COND=SignatureText == SignatureLocation
Parent.Parent.Body.Text=Parent.Parent.Body.LocalText ## COND ? Parent.Default.Signature : SignatureText


If you want to see heavy use of conditionals, take a look at Mother's timer window, that one is a beast, possibly the most impressive (or excessive? ) example of what you can do with the XML operators that I have seen on here (although Talyns
has excellent examples as well, search for his kills before level up XP window on the forums, for example).

Not sure what may be wrong with your code, maybe the condition isn't set up correctly.
__________________
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
  #5  
Unread 04-21-2007, 07:15 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Thanks, I actually ended up having to backtrack a few hours and use a different approach. The primary browser object has to be at the first level of the browser window for the homepage or /browser <URL> to work. I was trying to leave that primary browser object there as a dummy and then copy the URI text into different tabs but I ran into a time delay problem anyway so I went back to an earlier design idea.
Reply With Quote
  #6  
Unread 04-22-2007, 06:33 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

Quote:
Originally Posted by Othesus View Post
Has anyone really gotten a conditional to work or have any actual working examples? I've been trying to use one and it never does anything.

COND ? case1

gives me case1 regardless of what COND is.

COND ? case1 : case2

gives me case2 regardless of what COND is.
Works

COND=1>2
Visible=(COND?True:False)

Visible=(COND?True:False) COND=1>2

(remember EQ2 exec it's script right to left, top to bottom)

Does not work

Visible=(1>2?True:False)

Here is a snip of the code I use to show class icons in the group window
Code:
<Button eX_Test="false" LocalText="eXtremeClass" Name="ClassControler" OnActivate="
Parent.Paladin.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Paladin)
Parent.Shadowknight.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Shadowknight)
Parent.Berserker.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Berserker)
Parent.Guardian.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Guardian)
Parent.Bruiser.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Bruiser)
Parent.Monk.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Monk)
Parent.Swashbuckler.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Swashbuckler)
Parent.Brigand.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Brigand)
Parent.Dirge.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Dirge)
Parent.Troubador.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Troubador)
Parent.Ranger.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Ranger)
Parent.Assassin.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Assassin)
Parent.Wizard.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Wizard)
Parent.Warlock.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Warlock)
Parent.Illusionist.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Illusionist)
Parent.Coercer.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Coercer)
Parent.Necromancer.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Necromancer)
Parent.Conjuror.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Conjuror)
Parent.Templar.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Templar)
Parent.Inquisitor.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Inquisitor)
Parent.Warden.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Warden)
Parent.Fury.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Fury)
Parent.Mystic.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Mystic)
Parent.Defiler.Visible=(eX_Test ? True : False) eX_Test=(Parent.Class.LocalText==Defiler)
Activated=False">eXtremeClass</Button>
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #7  
Unread 04-27-2007, 01:40 PM
Syndic Syndic is offline
A Young Mystail Rat
 
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 7
Default

OK sometimes things like this fly right over my head.

I recently returned to EQ2. I found that the /Gamedata.Self.LevelClass has been changed to include the word "Level" at the beginning of it. Now it doesn't fit in the areas I have for it. After finding this thread I thought there might be hope in creating a single text which concats Level + Class together to get the old result again (ie "55 Shadowknight" instead of "Level 55 Shadowknight"), just the examples above seem to concentrate more on conditions than concatenation.

I just can't figure out how or if it is possible to use 2 Gamadatas in one field. I know I could go along and create 2 Texts but the spacing would out. I also tried looking at several UI's to see if anyone has done this but have yet to stumble across it.
Reply With Quote
  #8  
Unread 04-27-2007, 02:38 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

You cannot assign two Gamedatas, assign each to a different invisble text field like charlvl and charclass, then have a third text field that you want to display and populate it via an OnShow event like this: Text=charlvl.LocalText ## charclass.LocalText
__________________
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
  #9  
Unread 04-27-2007, 03:46 PM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Quote:
Originally Posted by gm9 View Post
You cannot assign two Gamedatas, assign each to a different invisble text field like charlvl and charclass, then have a third text field that you want to display and populate it via an OnShow event like this: Text=charlvl.LocalText ## charclass.LocalText
you would probably want a space in there too so

Text=charlvl.LocalText ## (' ') ## charclass.LocalText
__________________
Talyns
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 09:57 PM.


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