[Laszlo-dev] [Laszlo-checkins] r9211 - openlaszlo/trunk/WEB-INF/lps/lfc/core

P T Withington ptw at pobox.com
Sat May 17 10:18:39 PDT 2008


Whatever happened to the idea of unifying the datapath crud a little  
better?  Would it help at all to utilize the different types of  
LzValueExpr's, the way we do to keep constraints, etc. sorted?

On 2008-05-17, at 08:13 EDT, hqm at openlaszlo.org wrote:

> Author: hqm
> Date: 2008-05-17 05:13:37 -0700 (Sat, 17 May 2008)
> New Revision: 9211
>
> Modified:
>   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
> Log:
> Change 20080517-hqm-n by hqm at badtzmaru.home on 2008-05-17 00:53:21 EDT
>    in /Users/hqm/openlaszlo/trunk5
>    for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: make 'datapath' attribute on an instance override any  
> existing class datapath
>
> New Features:
>
> Bugs Fixed: LPP-5193
>
> Technical Reviewer: andre
> QA Reviewer: ptw
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
>
> The constructor for LzNode checks whether a 'datapath' attribute was
> passed in the init args list.
>
> If so, it suppresses any $datapath value which would have been
> inherited from the class, so that the 'datapath' init arg value will  
> be the one
> which overrides the datapath value.
>
>
> Tests:
>
> test case in bug report
> smoke
> test/lfc/data
> calendar
> amazon
>
>
>
> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
> ===================================================================
> --- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-05-17  
> 11:48:53 UTC (rev 9210)
> +++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2008-05-17  
> 12:13:37 UTC (rev 9211)
> @@ -284,6 +284,11 @@
>       children = LzNode.mergeChildren(children, classChildren);
>     }
>
> +    // If a 'datapath' init arg was passed, we must override any  
> existing $datapath
> +    if (maskedargs['datapath'] != null) {
> +      maskedargs.$datapath = LzNode._ignoreAttribute;
> +    }
> +
>     this.construct(  parent , maskedargs );
>
>     // Construct may, through many tangled webs of replication and
> @@ -2099,7 +2104,10 @@
>    * setter for $datapath
>    */
>   function $lzc$set_$datapath( dpobj ){
> -    if (! (dpobj instanceof Object)) {
> +    if (dpobj == LzNode._ignoreAttribute) {
> +      // a 'datapath' attribute overrode our $datapath
> +      return;
> +    } else if (! (dpobj instanceof Object)) {
>       if ($debug) {
>         Debug.debug('%s on non-object %w?', arguments.callee, dpobj)
>           }
>
>
> _______________________________________________
> 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