Condition String Compare Problem

A place for App developers to hang out / post
Post Reply
CobraDuck

Posts: 4
Joined: Tue Jun 03, 2014 9:49 pm
Location:

HTPC Specs: Show details

Condition String Compare Problem

#1

Post by CobraDuck » Tue Jun 03, 2014 10:22 pm

I have two String variables that I am trying to compare with a Condition. When they are declared they have a value of "". Both Strings are bound to Text elements so that I can see their value.
I compare them with this code:

Code: Select all

      <Condition Source="[String1]" ConditionOp="NotEquals" SourceValue="[String2]">
        <Actions>
          Do Stuff
        </Actions>
      </Condition>
      <Condition Source="[String1]" ConditionOp="Equals" SourceValue="[String2]">
        <Actions>
          Do Stuff
        </Actions>
      </Condition>
The Strings are declared like this:

Code: Select all

      
      <cor:String Name="String1" String=""/>
      <cor:String Name="String2" String=""/>
My problem is that when they have a value of "", the condition for Equals works just fine, but when both are changed to the same value by an invoked command, only the NotEquals condition runs.
The text elements show they have the same value, so both strings are equal, but the condition still thinks that they are not. Have I compared them incorrectly? Any ideas?

Post Reply