[Laszlo-dev] For Review: Change 20080511-hqm-I Summary: fix, to make LzDatapointer.__LZgetNodes work in swf9

André Bargull a.bargull at intensis.de
Sun May 11 07:26:07 PDT 2008


The elements in the "LzParsedPath#selectors"-Array can be one these types:
i) a String, one of: '/', '..', '*', '.' or a node-name
ii) an Object, structured like {pred: "hasattr" or "attrval", attr: ? [, 
val: ?]}
iii) an Array for range-selection

So, these expressions yield the same result:
> if ( posnext && posnext is Array ){
or
> if ( posnext && !(posnext is String) && posnext['pred'] ==  "range" ){


> Change 20080511-hqm-I by hqm at badtzmaru.home on 2008-05-11 08:39:39 EDT
>      in /Users/hqm/openlaszlo/trunk5/WEB-INF/lps/lfc
>      for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc
>
> Summary: fix to make LzDatapointer.__LZgetNodes work in swf9
>
> New Features:
>
> Bugs Fixed:
>
> Technical Reviewer: max
> QA Reviewer: ptw
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
>
> swf9 gets an error when the code in lzDatapointer tries to look for a  
> property on
> a String object. The code needs to check whether the object it is  
> dereferencing is
> a hash table or not.
>
> This change verified that the object is not a String, assuming that if  
> not, it must
> be a hash table. Can POSNEXT ever be something besides a hash table or  
> a String?
>
>
> -      if ( posnext && posnext.pred == "range" ){
> +      if ( posnext && !(posnext is String) && posnext['pred'] ==  
> "range" ){
>
>
>
>
> Tests:
>
> Files:
> M      data/LzDatapointer.lzs
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080511-hqm-I.tar



More information about the Laszlo-dev mailing list