Boolean expression evaluation

Hello

Flex, 4.0.x

I came across a strange behavior, by evaluating the following expressions (function):

public function calculateIsNext():void
{
     if ( _currentState == "FirstPage" )
     {
          isNext = ((StoreManufacturerCode!='') && hasSelectedProducts);
          dispatchEvent( new Event( "ChangeValidation" ) );
     }
}

the problem lies on the line where the proximity is calculated, whenever I stop here during debugging, the two part of the expression are real and just leave this function after this line, dispatchEvent is not managed.

I got this line also with if else statements, where proximity = true, never evaluated even the two parts of the expression are ture

Anyone encountered similar behavior?

r. sandor

Sometimes, you will see this, if you are using the old code.  Try to delete the contents of bin-debug and then goes to the project > Clean and the cleaning of your project.  You can also see this in functions that may be related, if the underlying code generated decides that the value has not changed.

HTH;

Amy

Tags: Flex

Similar Questions

  • First HP axis line bug in Boolean expressions (Adv. Graphing App)

    When the graphic representation of an inequality and excluding a part of it using Boolean expressions, there is a bug where the first will be graphic axis lines are part of the solution by using 'AND NOT '.

    An example of this is that if you were to graph a circle of RADIUS < = 5 and remove a circle of RADIUS < = 4.

    Example:

    V1:=(X^2+Y^2<=5^2) AND NOT (X ^ 2 + Y ^ 2 < = 4 ^ 2)

    Axis lines X - there exist in the excluded (X ^ 2 + Y ^ 2 < = 4 ^ 2) and can be traced back as if it were part of the solution of V1.

    Interestingly, if V2 is set to be equal to V1 (X - 0.5, Y - 0.5), axis lines are no longer aligned with the axis of the grid, but are rather shifted-0.5 on the X and Y as well as the rest of the V2.

    In this case, the equation can be modified to work around the bug by removing the NOT and change the sign of the circle radius 4-more of:

    V1:=(X^2+Y^2<=5^2) AND (X ^ 2 + Y ^ 2 > 4 ^ 2)

    Does anyone know if there is a reported bug?  Where I might be able to look to see a list of known issues?

    Thanks for the detailed examples. It took me a while to see what you were talking about, but once I did I had the info the graphic calculator expert.

  • vector expression evaluation

    Hello world

    Can someone tell me the following expression evaluation.

    int i = 0;
    System.out.println (i ++ + ++ I + ++ i);


    Please help me...

    Prem says:
    Ok.. Thanks for this knowledge...

    If the operands are evaluated, left right then exit this expression must be of 6 but is 5? How?

    No, it must be exactly what it is. If such was not the case, it would mean that there is a HUGE mistake in a very basic part of Java a beginner like you could find, but who somehow don't get it fixed, despite Java used in thousands of existing applications.

    int i=0;
    System.out.println( i++ + ++i + ++i); 
    

    When we reached the first term (i ++), the value of i is 0. The value of this expression is the value of i, before the increment, if we determine that the value of this expression is 0. Then, we increment I 1. Running so our total is 0 and the value of i is 1.

    When we reached the second term (++ i), we increment all first I between 1 to 2. Then, we determine the value of this expression, which is the new value of i is 2. We have therefore 0 + 2 = 2 for our running total, and the value of i is now 2.

    When we reached the third mandate (++ i once again), we increment all first I have 2-3. Then, we determine the value of this expression, which is the new value of i is 3. So we have 0 + 2 + 3 = 5 for our total and the value of i is 3.

    It's as if we have:

    int i = 0;
    int j = i++; // j  = 0; i = 1;
    int k = ++i; // i = 2; k = 2;
    int m = ++i; // i = 3; m = 3;
    System.out.println(j + k + m); // 0 + 2 + 3
    

    Edited by: jverd May 15, 2012 02:32

  • simple expression evaluator

    Hi all

    need help with an expression evaluation:
    user enters a string like "x * x + dx * dy" or 'x * dx - dy * y' and I Flash on hidden that in an actionscriptline in the code, it looks like:

    x = 3;
    DX = 0.6;
    DY = 0.1;
    AA = x * x + dx * dy;
    trace (AA);

    and the result would be: 9.06

    Now my problem is to convert the operator.
    Anyone for a solution for this newbie?

    thnx
    Rob

    OK, thnx, I will follow your advice

    Rob

  • Expression evaluation limits step

    I'm just trying to understand the point at which the step limits expression is evaluated. I'm trying to define the limits of a test of numerical limit based on an expression. I'm passing the context of the sequence for the LabVIEW code module so that the VI may determine the limits to set the colors of parts of pass/fail indicator and for certain other purposes.

    The problem I have is that it resembles the step limits expression has not been evaluated at the time wherever the context of the sequence is passed to the VI, which means that the calculated limits are not available. Is this correct? If so, does anyone have suggestions as to how I might be able to get around this?

    Thank you.

    Adam

    Hi Adam,.

    The following graph shows the order of execution of the teststand steps.

    I believe that the evaluation of the expression limited on "steps of numerical limit test" occurs during the evaluation of the expression status (so the last part of the stage).

    Another solution would be to create your own custom step type and include a custom "step first substep for your personalized step step" (I think I just broke the world record for most uses of the word 'no' in a sentence )

    However, I think that you've already found the solution more practice/simple/elegant. Yes, Bravo to you!

    Thanks for your time. I hope that gives a little clarification.

    Best wishes

  • Do in Expression evaluation

    Do everything in
    ((

    Val (locals. ((DailySelfCalTimeMsgBoxInputHours)<0&& val(locals.dailyselfcaltimemsgboxinputhours)="">23)). ((Val (Locals.DailySelfCalTimeMsgBoxInputMinutes)<0&& val(locals.dailyselfcaltimemsgboxinputminutes)="">59)). RunState.Sequence.Main ["Message Popup"]. Result.ButtonHit! = "2"

    MSG Box to read at the time of user input
    }

    I have this logic, but do so while the loop was never released.  If I press the button cancel the do while loop is exited.  However, Locals.DailySelfCalTimeMsgBoxInputHours Locals.DailySelfCalTimeMsgBoxInputMinutes meet the requirements above in the Do While expression, the loop never ends.  In the framework of the Expression of Post of Message box, I converted the above string variables of numeric type and display values as expected.  So, I'm not sure why when I try to use Val (String) in the Do While expression, the evaluation does not work as expected.  Can someone shed light on this problem?

    Pseudocode:

    While

    hours < 0="" and="" hours=""> 23

    Or

    minutes < 0="" and="" minutes=""> 59

    Or

    buttonhit <> 2

    end while

    Ok. Hours is never negative and more than 23. Minutes will be never greater than 59 both negative. buttonhit could not be 2. Thus, it seems that you will never get a real on buttonhit.

    I think that either you have you a larger and less reverse, or you need to replace your ANDS by RHA.

    Good luck

    Bob Y.

  • Boolean expression EL?

    Hello
    Is it a correct expression for and operation?
    disabled="#{!bindings.execute.enabled && (!lOVManagedBean.initiator)}"
    He complains with the following error.
    OracleJSP error: oracle.jsp.parse.JspParseException:
    Error: oracle.xml.parser.v2.XMLParseException ( /taskDetails1.jspx ):
    line #:410 column #:80 : Expected name instead of &.

    Hello

    have you tried with

    Disabled = "#{!}" "{Bindings.Execute.Enabled and (! lOVManagedBean.initiator)} '.

    Try with single & or AND or and

    Published by: Raj Gopal K may 3, 2011 15:34

  • Stored as varchar expression evaluation

    Hello

    I declared a varchar variable and that data stored in this variable are an expression.
    I need to evaluate the expression.
    Y at - it an option to do so.
    For example

    v_s_expression: = '10 + 5';

    I need to evaluate and get the value in another variable.

    I would get the result 15 in the v_n_result variable.

    all methods?

    Thanks in advance
    Prasanth
       1  declare v varchar2(30) := '5+10';
      2          i number;
      3  begin
      4    execute immediate 'begin :b0 :='||v||'; end;'
      5    using out i;
      6    dbms_output.put_line(i);
      7* end;
    SQL> /
    15
    
  • bind variables and expression evaluation

    Hi friends,

    I was looking at a query that uses a bad plan. DB is 11.2.0.3 with active user bind peeking. It is a simplified version showing the problem:

    Select egp.bsn

    , egp.klantnummer as 'Persoonsnummer '.

    , egp.samengesteldenaam as 'Samengesteldenaam '.

    , egp.geboortedatum as 'Geboortedatum.

    of pr_eigenschappen2 egp

    where

    (egp.bsn =: b1 or: b2 is null)

    and rownum < 51

    EGP. BSN is varchar2 (10) and has a high selectivity (almost unique) and is indexed btree. table and index have adequate statistics.

    When it is run with b1: = 928818 and b2: = 928818 (linked both as varchar2 (10)) a full table scan + filter is used on pr_eigenschappen2.

    If the query is changed to

    Select egp.bsn

    , egp.klantnummer as 'Persoonsnummer '.

    , egp.samengesteldenaam as 'Samengesteldenaam '.

    , egp.geboortedatum as 'Geboortedatum.

    of pr_eigenschappen2 egp

    where

    (= egp.bsn: b1 or 928818 a null value)

    and rownum < 51


    the index on the bsn is used, and the query does not 3.9 seconds but 1 millisecond.


    If I had a choice, the query would be different. I don't want to talk about the reason for the request, I would like to know why the optimizer does not use the index in the first case.



    Jan-marten,

    as Hoek wrote: "the optimizer must take into account the fact that the bind peut var be null, and then a full crawl is required...". ». For the bsn = part: b1 a systematic index scan range would be a good idea, but for: b1 is null, there is only one relevant case producing a result: NULL IS NULL and this condition the CBO only a full table scan or a full scan of the index taking into account (after all a complete analysis of the index may also be called 'index range scan across the table' - but that would be contrary to the 'Beach' in its name).

    By the way: I think that the trick of gather_plan_statistics is not very useful in the test case since you do not use display_cursor with allstats format. He might even have a negative impact on performance since statistical rowsource are quite expensive - depending on the timing of your OS routine. I think that Mr. Lewis has written something on this effect, in his notebook.

    Concerning

    Martin

  • evaluate the expression error

    Hello

    TestStand 4.1, I'm trying to copy a container of FileGlobals to StationGlobals, based on a name.

    The following works, even if the browser of Expression says that it will cause a runtime error because "error in the call for expression int 'Evaluate'. Unexpected token:... »

    Locals.Name = "Name1"

    StationGlobals.TargetContainer = evaluate ("FileGlobals" + Locals.Name + ".") SourceContainer")

    where StationGlobals.TargetContainer and FileGlobals.Name1.SourceContainer are of the same named type.

    I tried to use EvaluateEx(), but found no construction to make it work. What would be the syntactically correct way to do this?

    Thank you

    Peter

    Peter,

    the reason for the 'mistake' the evaluation of the expression at development time, it's that he is a "stacked" expression

    First, you set Locals.Name a new value. I think in your sequence Locals.Name is by default an empty string. Then use this value in another part of the expression.

    Since there is no SequenceContext (no performance), the value of Locals.Name is not actually modified by the first part of the expression leaving the Evaluate() to search for a "FileGlobals" property... SourceContainer. Since two '.' one after another are illegal for search strings, the entire expression evaluation fails.

    This error does not occur during execution, because the first part of the expression does not actually change Locals.Name (for the SequenceContext) to be "Name1", while the second part will result in Evaluate ("FileGlobals.Name1.SourceContainer").

    hope this helps,

    Norbert

  • Logging data source expressions

    Hello

    We use NI TestStand 2012 here in our society, and I have a simple question.

    In any test pass/fail (numeric, String, pass/fail regular), is it possible to have the TestStand to include the data source expression in the default report?

    I can add it manually in the component "Other results", but I have to do for each step.

    I see that on conditional expressions and flow measures are included in the report, but not the my expressions of pass/fail, which are found in the data source tab.

    It seems obvious to me that the data source should be there, otherwise I just in the report the name of the step and the result and no information of what has been actually tested.

    Thank you in advance!

    Leandro

    It does not show what the '10' value means: speed, voltage, current, RPM, etc. unless we call actually step in this way.

    Thanks again.

    There is a 'units' set numerical limit markets which addresses this problem. You can even specify custom units if you would like, although there are many built in those you choose as well. Also the name of the step should usually give an idea of what exactly is being tested.

    For the recording of Boolean expressions, probably the simplest thing is to use a stage model that is preconfigured to connect to the data source, or you can create a new custom step based on the test of success/failure that connects to the default data source type, or you could write a tool that passes through the sequence files and change all tests pass/fail to connect their datasource.

    -Doug

  • Expression.Evaluate () - how to use with propertyobject?

    Hello

    I have the code in a reminder of model of process and would like to evaluate an expression in the context of Runstate.Caller.

    I found the method

    Expression. Evaluate (evaluationContext, evaluationOptions is EvalOption_NoOptions)

    That's exactly what I need. However, if I have a CallingStep.Expr, which is an expression, I can't access the Evaluate() function. It is not available, only the functions PropertyObjects are.

    How can I throw it's an Expression, so I can access the function Evaluate?

    I really I could do:

    Runstate.CallingStep.Expr.Evaluate (Runstate.Caller, 0x0)

    This returns the expression evaluated in the context of the appellant as a PropertyObject.

    But this isn't the case, need me something to TS know Runstate.CallingStep.Expr is an Expression... even if I add it to the Panel of the watch, it shows that it is an expression...

    Thank you.

    Hello

    Try to use RunState.Caller. AsPropertyObject. EvaluateEx (xxx)

    Hope this helps

    Jürgen

  • Select the problem with expressions

    Hello

    I use Teststand 4.0 and a frustrating problem with the Select Case statements.

    I have attached a sequence that shows the problem.

    A loop from 0 to 10.

    The select case statement should decide which box 3 instructions corresponds to the expression and a message box is displayed.

    However the Basic program reacts as expected.

    First, he made his entry with a value of 0, it goes to the > 7 stated case.

    The second time, he enters the loop with a value of 1, it will correctly to the<3 case="">

    The other values of 2 to 10 enter no case statement.

    Is this a bug in TS 4?, or I do something wrong?

    Thank you

    Mike

    The problem is that you compare the Locals.New_Val of the Locals.New_Val property.< 3". ="" if="" those="" two="" properties="" match,="" then="" it="" will="" execute. ="" if="" you="" wanted="" that="" particular="" case="" to="" execute="" when="" locals.new_val="" is="" 0,="" you="" would="" just="" type="">

    Unfortunately there is no way to have multiple cases of a single block of code.

    In C, you could do it like this:

    Switch (newVal)

    {

    case 0:

    case 1:

    case 2:

    do something

    break;

    case 3:

    case 4:

    case 5:

    case 6:

    case 7:

    do something else

    break;

    etc...

    }

    Even in C, it's awkward, and you would probably do the following instead:

    If (newval<>

    do something

    Else if (newval<>

    do something else

    on the other

    do something else

    The reason why it works in TestStand, is that expressions will try to automatically convert types if she can do it.  false is logically equivalent to 0 and true, it is logically equivalent to 1, so what you are really comparing to in your case statement is your property (Locals.New_Val) to a Boolean expression that evaluates to 0 or 1.  It is certainly not obvious when we look at, but at least, this explains why it happens.  Another way, you could do this is to change "Point to compare" step of the 'True' selection, which will each case in order to compare the expression of the value 'true '.  I still recommend a structure if/else if/else for this kind of problem because it's easier to read, but it is possible to do what you want in this case with a select / box.

    P. Allen

    NEITHER

  • Is there any built-in method to calculate mathematical expressions in blackberry?

    Hello

    I want to calculate the input given to for example phrase (25 + 48 * 9 + 69) / 3 in the BIRD rule database and display the result in a text box. So there is a built-in method to calculate data expressions?

    Do you mean a mathematical expression evaluator?

    Maybe you can use this:

    http://javadots.blogspot.com/2008/11/arithemetic-expressions-Solver-in-64.html

    http://Web.archive.org/Web/20070205080726/http://oglimmer.de/Java/mathematical_expression_parser.php

  • Custom number Converter:-EL Expression

    Hi all

    I use JDeveloper 11.1.2.4.0.

    I have created a number converter to format number fields.

    I've referenced: Jerry on Java: create a custom converter of JSF 1.2 with the attributes and bunch of Red: tag JSP behavior customer personalized ADF Faces 11.1.1 Articles and created as a component of the taglib.

    I put the model to a numeric field based on a value of fields of wages as below

    #{bindings. Salary.inputValue gt 15000?' # 0.000 ': ' {# 0.00 "}".

    Salary is given as partial trigger deposited number and automatic sending is enabled in the salary field.

    I already pay value deposited. The loading of the page, the expression is used and the correct model is visible.

    But if I change the amount of salary not evaluates the expression and model does not change.

    But when refresh my browser tab then the model will change based on the new amount.

    For default converter I found the expression evaluates according to the change in the value of the wage.


    What I need to know is why EL Expression was not evaluated in the converter of custom number? I do any extra parameter?

    Please help me by providing some valuable links & Suggestions

    Thank you and best regards,

    Gijith

    Hi all

    Finally, I solved the problem of my custom number converter.

    It was that didn't save the handler class in the taglib.xml file. That's why expression evaluation works do not.

    After Manager class regitering everything works fine.

    Thank you dvohra21 for your reply.

    Kind regards

    Gijith.

Maybe you are looking for