Announcement

Collapse
No announcement yet.

What do you mean properties?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What do you mean properties?

    if (BarCntr>4){
    for (i=1;i<4;++i){
    vpast = ref(-i);
    if (vpast[3]==null){
    return;
    }
    !!! mR = vpast[3];
    Sum+=mR;
    debugPrintln("i: " + i +" mR= " + mR);
    }
    This code is near the bottom of my function.It computes 3 other things and is trying to refer to previous values of the fourth thing it computes to find a 4 bar average(a fifth thing).And it says vpast has no properties.I previously defined var vpast=new Array(5); .

  • #2
    Hello Roderick,

    When you set vpast = ref(-i) and you get the no properties error, it's telling you that bar -i didn't have any values returned to the chart on that bar. Try adding a null check for vpast before checking for vpast[3] == null and see if that helps. Checking for vpast[3] == null assumes that vpast was returned as a valid array.

    PHP Code:
        if (BarCntr>4){ 
            for (
    i=1;i<4;++i){
                
    vpast ref(-i);
                if (
    vpast == null) return;
                if (
    vpast[3]==null) return;
                
    mR vpast[3];
                
    Sum+=mR;
                
    debugPrintln("i: " +" mR= " mR);
            }
        } 
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X