I'm glad you put in the Debug statement.

But it should probably be Debug.error, since setters should never be  
null, unless you are trying to manipulate a destroyed view, which in  
turn, is evidence that you may have a memory leak...

On 2006-08-29, at 19:33 EDT, [EMAIL PROTECTED] wrote:

> Author: hqm
> Date: 2006-08-29 16:33:33 -0700 (Tue, 29 Aug 2006)
> New Revision: 1699
>
> Modified:
>    openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
> Log:
> Summary: fix to setattribute to check for null setters
>
> New Features:
>
> Bugs Fixed: 2543
>
> Technical Reviewer: ptw
>
> QA Reviewer: max
>
> Doc Reviewer:
>
> Documentation:
>
> Release Notes:
>
> Details:
>
> LzNodesetAttribute should check if setters is null before frobbing it
>
>
>
>
>
> Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs
> ===================================================================
> --- openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs         
> 2006-08-29 10:00:07 UTC (rev 1698)
> +++ openlaszlo/branches/legals/WEB-INF/lps/lfc/core/LzNode.lzs         
> 2006-08-29 23:33:33 UTC (rev 1699)
> @@ -616,15 +616,20 @@
>      //@field String datapath: The string to use as this node's  
> datapath. This
>      //usually creates a datapath that attaches to the node.
>
> -    if ( null == this.setters[ prop ] ){
> +    var s = this.setters;
> +    if (s && (prop in s)) {
> +        this[s[prop]](val);
> +    } else {
> +        if (s == null) {
> +            Debug.write('null setters on', this, prop, val);
> +        }
>          this[ prop ] = val;
>          var evt = ("on" + prop);
>          if (evt in this) {
>              this[ evt ].sendEvent( val );
>          }
> -    } else {
> -        this[ this.setters[ prop ] ] ( val );
>      }
> +
>  }
>
>  //------------------------------------------------------------------- 
> -----------
>
> _______________________________________________
> Laszlo-checkins mailing list
> [EMAIL PROTECTED]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to