Is contextual checking possible here?  I do a lot of this:

if( foo.bar == null ) ...

which of course can generate "WARNING: reference to undefined  
property 'bar'".  Well duh, that's why I'm checking.  On the other  
hand, once or twice I've been save by warnings from:

var x = foo.bar + baz;

I suspect that if the warnings are optional, I'll just get in the  
habit of using a lot of the first example.  In turn, this means that  
when I decide to use the optional warnings to track down and instance  
of the second example I'll drown in a flood of red herrings.  This is  
where a little bit of contextual smarts would be nice.  If that's  
even reasonably possible...

On May 7, 2006, at 7:47 PM, P T Withington wrote:

> Looks good, but what is 'hasAttribute'?  Do you mean hasOwnProperty?
> (Or 'in', but we don't permit 'in').
>
> The idiom we use for testing the existence of a property without
> getting a warning is this['prop'] -- the debugger does not warn on  
> that.
>
> But perhaps we should be working on ERROR's first, not WARNING's.  It
> is not an error in Javascript to reference a non-existent property,
> we only have a warning to help people debug.  Maybe I should make
> that warning optional.
>
> On 2006-05-07, at 17:56 EDT, Benjamin Shine wrote:
>
>>
>> Tucker, I have risen to approximately 1% of your challenge. If
>> these fixes are in the right vein, I'll keep going.
>>
>> Change 42100 by [EMAIL PROTECTED] on 2006/05/07 14:49:36
>> *pending*
>>
>>      Summary: Eliminating a few warnings in LaszloCanvas.as  
>> instantiation.
>>      
>>      New Features:
>>      
>>      Bugs Fixed:
>>      
>>      Technical Reviewer: ptw (pending)
>>      QA Reviewer:  frisco (pending)
>>      Doc Reviewer:  (pending)
>>      
>>      Documentation:
>>      
>>      Release Notes:
>>      
>>      Details:
>>         This change eliminates the following runtime errors and
>> warnings, when I run http://localhost:8087/lps-legals/test/lztest/
>> lztest-simple.lzx?debug=true
>>         07 May 2006 14:21:26 (127.0.0.1 2) INFO
>> responders.ResponderEVAL – CLIENT_LOG ERROR: views/LaszloCanvas.as:
>> 256: undefined object does not have a property ‘sendEvent’
>>         07 May 2006 14:21:26 (127.0.0.1 1) INFO
>> responders.ResponderEVAL – CLIENT_LOG WARNING: views/
>> LaszloCanvas.as:256: reference to undefined property
>> ‘onpercentcreated’
>>         07 May 2006 14:21:26 (127.0.0.1 3) INFO
>> responders.ResponderEVAL – CLIENT_LOG WARNING: views/
>> LaszloCanvas.as:258: reference to undefined property ‘initdelay’
>>         07 May 2006 14:21:26 (127.0.0.1 4) INFO
>> responders.ResponderEVAL – CLIENT_LOG WARNING: views/
>> LaszloCanvas.as:308: reference to undefined property ’LZlateinit’
>>      
>>      Tests:
>>
>> Affected files ...
>>
>> ... //depot/lps-legals/WEB-INF/lps/lfc/core/LzNode.as#7 edit
>> ... //depot/lps-legals/WEB-INF/lps/lfc/views/LaszloCanvas.as#5 edit
>> ... //depot/lps-legals/lps/utils/lztestmanager.lzx#2 edit
>>
>>
>> <changeset-42100.zip>
>>
>> benjamin shine
>> software engineer
>> [EMAIL PROTECTED]
>>
>>
>>
>
>
> _______________________________________________
> Laszlo-dev mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev


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

Reply via email to