[Laszlo-dev] [Laszlo-checkins] r5591 - openlaszlo/branches/legals/WEB-INF/lps/lfc/core

P T Withington ptw at openlaszlo.org
Thu Jul 5 03:25:47 PDT 2007


Did you also remove the method from LzView?  No sense in having a  
duplicate method.

On 2007-07-05, at 03:03 EDT, jcrowley at openlaszlo.org wrote:

> Author: jcrowley
> Date: 2007-07-05 00:03:52 -0700 (Thu, 05 Jul 2007)
> New Revision: 5591
>
> Modified:
>    openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
> Log:
> Change 20070629-jcrowley-W by jcrowley at DoctorManhattan.local on  
> 2007-06-29 02:20:21 EDT
>     in /Users/jcrowley/src/svn/openlaszlo/legals-alpha
>     for http://svn.openlaszlo.org/openlaszlo/branches/legals
>
> Summary: Put "searchParents" from LzView to LzNode
>
> New Features:
>
> Bugs Fixed: LPP-3377
>
> Technical Reviewer: max
> QA Reviewer: pbr
> Doc Reviewer:
>
> Documentation:
>
> Release Notes:
>
> Details: Contributor fix from Andre Bargull.  Added searchParents  
> to LzNode.lzs.
>
>
> Tests: <canvas debug="true" >
>
>   <dataset name="ds" >
>     <root>
>       <entry name="foo" />
>     </root>
>   </dataset>
>
>   <view id="box" datapath="ds:/root" >
>
>     <node name="mynode" datapath="entry" >
>       <handler name="ondata" >
>         Debug.write( "node:", this.data );
>       </handler>
>     </node>
>
>     <view name="myview" datapath="entry" >
>       <handler name="ondata" >
>         Debug.write( "view:", this.data );
>       </handler>
>     </view>
>
>   </view>
>
> </canvas>
>
> In unmodified branch, only "view:" will appear.  In modified  
> branch, both will.
>
>
>
> Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
> ===================================================================
> --- openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs	 
> 2007-07-05 06:49:22 UTC (rev 5590)
> +++ openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs	 
> 2007-07-05 07:03:52 UTC (rev 5591)
> @@ -1664,7 +1664,25 @@
>      return null;
>  }
>
> +/**
> +  * Search up parent views for a named property. For now, returns  
> when it finds
> +  * the first one.
> +  *
> +  * @param String prop: named property
> +  * @return LzView: the first view which has a non-null value for  
> <param>prop</param>
> +  * or <i>null</i> if none is found
> +  */
> +function searchParents ( prop ){
> +    var sview = this;
> +    do{
> +        sview = sview.immediateparent;
> +        if (sview[ prop ] != null ){
> +            return sview;
> +        }
> +    }while ( sview != canvas );
> +}
>
> +
>  static var UIDs = 0;
>
>  /**
>
>
> _______________________________________________
> Laszlo-checkins mailing list
> Laszlo-checkins at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins



More information about the Laszlo-dev mailing list