3 Replies Latest reply on Sep 22, 2009 9:32 AM by Daniel Freiman

    Object Passed to Function as Null

    Daniel Freiman Level 1

      I'm coming across a case where when I pass a non-null value to a function, the function sees the passed value as null.

       

      This does not happen every call, but it does happen at exactly the same point in a specific test case every time the test case is run. I can't see any reason why the value is noteworthy when this error occurs.

       

      Has anyone seen anything like this before? (code excerpts below.  Note that I can't actually do the traces shown, but below is representative of the debugger's reported state).

       

       

      ...

      // trace(_curElement) == flashx.textLayout.elements.SpanElement

      _curLineLeading = curLine.getLineLeading(_blockProgression,_curElement,_curElementStart);

      ...

      ...

      tlf_internal function getLineLeading(bp:String,elem:FlowLeafElement,elemStart:int):Number {

      // trace(elem) == null

      ...

      ...

      ...