P T Withington | 1 Apr 02:15
Picon
Favicon
Gravatar

The current lossage

Spot the bug:

   /* -*- file: base/basecomponent.lzx#110.11 -*- */
  56    override function construct (parent, args) {
  57    with (this) {
  58    super.construct(parent, args);
  59    var p = this.immediateparent;
  60    while (p != canvas) {
  61    if (p instanceof lz.basecomponent) {
  62    this._parentcomponent = p;

Er, there is a `parent` property on `this` that is shadowing the  
argument.  Who is inserting that `with (this)`?

P T Withington | 1 Apr 02:52
Picon
Favicon
Gravatar

Re: The current lossage

So, if I fix the swf9 compiler (by telling it _not_ to emit implicit  
this if it is not going to rename the locals) I get a bunch of new  
interesting errors:

Executing compiler: (cd /tmp/lzswf9/lzgen38150; /usr/local/flex_sdk_3/ 
bin/mxmlc -compiler.show-actionscript-warnings=false -compiler.source- 
path+=/tmp/lzswf9/lzgen38150 -debug=true -output /tmp/lzswf9/ 
lzgen38150/app.swf -default-size 800 600 -library-path+=/Users/ptw/ 
OpenLaszlo/ringding-clean/lps/includes/lfc/LFC9.swc /tmp/lzswf9/ 
lzgen38150/LzApplication.as)
compiler output:
Loading configuration file /usr/local/flex_sdk_3/frameworks/flex- 
config.xml

ERRORS:
Compiler error: at 262 [/tmp/lzswf9/lzgen38150/$lzc 
$class_basefocusview.as: 194]: Error: Access of possibly undefined  
property focuswithkey through a reference with static type Class.

this.setActive(LzFocus.focuswithkey);
                        ^

Compiler error: at 239 [/tmp/lzswf9/lzgen38150/$lzc 
$class_basebutton.as: 143]: Error: Incorrect number of arguments.   
Expected 3.

setTint(this, s.basecolor)
                  ^

Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc 
(Continue reading)

P T Withington | 1 Apr 02:56
Picon
Favicon
Gravatar

For Review: Change 20080331-ptw-f Summary: Don't need explicit with this in swf9

Change 20080331-ptw-f by ptw <at> dueling-banjos.local on 2008-03-31  
20:53:05 EDT
     in /Users/ptw/OpenLaszlo/ringding-clean
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Don't need explicit with this in swf9

Technical Reviewer: dda (pending)
QA Reviewer: hqm (pending)

Details:
     JavascriptGenerator: If the swf9 compiler is not going to rename  
locals, it had better
     not shadow them with a `with (this)`.  AS3 methods already have
     implicit this.

Files:
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080331-ptw-f.tar

Philip Romanik | 1 Apr 03:00
Favicon

Re: some other goodies when I try to compile a checkbox

FYI, I've been adding an optional argument to the destroy methods in the data objects to get around this issue.

 
 
Compiler error: at [/tmp/lzswf9/lzgen55150/$lzc$ class_basecomponent.as:
230]: Error: Incompatible override.

override function destroy () {
                 ^

This is because we're not matching the destroy() method signature because
of  the secret "recursiveCall" arg that LzNode.destroy uses

function destroy( recursiveCall = null){
 
That's a source change right?
 

Yes, but I don't really want to change all the classes in the LFC and in the component libraries (and random user apps) that define a  destroy()  method to give them  an optional argument.

I wonder if we could make it so that destroy()  method on LzNode takes no args, and then have
some other internal "destroy" method that takes the extra arg.

Henry Minsky | 1 Apr 03:12
Picon

Re: The current lossage

I'll see if I can either fix this or define dummy classes or methods to get past them for now.


On undefined, P T Withington <ptw <at> pobox.com> wrote:
So, if I fix the swf9 compiler (by telling it _not_ to emit implicit
this if it is not going to rename the locals) I get a bunch of new
interesting errors:

Executing compiler: (cd /tmp/lzswf9/lzgen38150; /usr/local/flex_sdk_3/
bin/mxmlc -compiler.show-actionscript-warnings=false -compiler.source-
path+=/tmp/lzswf9/lzgen38150 -debug=true -output /tmp/lzswf9/
lzgen38150/app.swf -default-size 800 600 -library-path+=/Users/ptw/
OpenLaszlo/ringding-clean/lps/includes/lfc/LFC9.swc /tmp/lzswf9/
lzgen38150/LzApplication.as)
compiler output:
Loading configuration file /usr/local/flex_sdk_3/frameworks/flex-
config.xml

ERRORS:
Compiler error: at 262 [/tmp/lzswf9/lzgen38150/$lzc
$class_basefocusview.as: 194]: Error: Access of possibly undefined
property focuswithkey through a reference with static type Class.

this.setActive(LzFocus.focuswithkey);
                       ^

Compiler error: at 239 [/tmp/lzswf9/lzgen38150/$lzc
$class_basebutton.as: 143]: Error: Incorrect number of arguments.
Expected 3.

setTint(this, s.basecolor)
                 ^

Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
$class_baseformitem.as: 118]: Error: Call to a possibly undefined
method xmlEscape through a reference with static type Class.

return LzBrowser.xmlEscape(this.submitname) + '="' +
LzBrowser.xmlEscape(val) + '"'
                 ^

Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
$class_baseformitem.as: 118]: Error: Call to a possibly undefined
method xmlEscape through a reference with static type Class.

return LzBrowser.xmlEscape(this.submitname) + '="' +
LzBrowser.xmlEscape(val) + '"'
                                                               ^

On 2008-03-31, at 20:15 EDT, P T Withington wrote:
> Spot the bug:
>
>  /* -*- file: base/basecomponent.lzx#110.11 -*- */
> 56    override function construct (parent, args) {
> 57    with (this) {
> 58    super.construct(parent, args);
> 59    var p = this.immediateparent;
> 60    while (p != canvas) {
> 61    if (p instanceof lz.basecomponent) {
> 62    this._parentcomponent = p;
>
> Er, there is a `parent` property on `this` that is shadowing the
> argument.  Who is inserting that `with (this)`?
>
>




--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

Henry Minsky | 1 Apr 03:13
Picon

Re: For Review: Change 20080331-ptw-f Summary: Don't need explicit with this in swf9

approved

On undefined, P T Withington <ptw <at> pobox.com> wrote:
Change 20080331-ptw-f by ptw <at> dueling-banjos.local on 2008-03-31
20:53:05 EDT
    in /Users/ptw/OpenLaszlo/ringding-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Don't need explicit with this in swf9

Technical Reviewer: dda (pending)
QA Reviewer: hqm (pending)

Details:
    JavascriptGenerator: If the swf9 compiler is not going to rename
locals, it had better
    not shadow them with a `with (this)`.  AS3 methods already have
    implicit this.

Files:
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080331-ptw-f.tar



--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

P T Withington | 1 Apr 03:18
Favicon

Re: some other goodies when I try to compile a checkbox

We eliminated the recursiveCall argument altogether.  It was  
obsolete.  So you shouldn't need the optional argument if you are at  
ToT.

On 2008-03-31, at 21:00 EDT, Philip Romanik wrote:
> FYI, I've been adding an optional argument to the destroy methods in  
> the data objects to get around this issue.
>
>>
>>
>> Compiler error: at [/tmp/lzswf9/lzgen55150/$lzc$<http://class_basecomponent.as 
>> >class_basecomponent.as:
>> 230]: Error: Incompatible override.
>>
>> override function destroy () {
>>                 ^
>>
>> This is because we're not matching the destroy() method signature  
>> because
>> of  the secret "recursiveCall" arg that LzNode.destroy uses
>>
>> function destroy( recursiveCall = null){
>>
>> That's a source change right?
>>
>>
>> Yes, but I don't really want to change all the classes in the LFC  
>> and in the component libraries (and random user apps) that define  
>> a  destroy()  method to give them  an optional argument.
>>
>> I wonder if we could make it so that destroy()  method on LzNode  
>> takes no args, and then have
>> some other internal "destroy" method that takes the extra arg.
>>

P T Withington | 1 Apr 03:19
Picon
Favicon
Gravatar

Re: The current lossage

What I don't get is why the `with (this)` masked those errors?

On 2008-03-31, at 21:12 EDT, Henry Minsky wrote:
> I'll see if I can either fix this or define dummy classes or methods  
> to get
> past them for now.
>
>
> On undefined, P T Withington <ptw <at> pobox.com> wrote:
>
>> So, if I fix the swf9 compiler (by telling it _not_ to emit implicit
>> this if it is not going to rename the locals) I get a bunch of new
>> interesting errors:
>>
>> Executing compiler: (cd /tmp/lzswf9/lzgen38150; /usr/local/ 
>> flex_sdk_3/
>> bin/mxmlc -compiler.show-actionscript-warnings=false - 
>> compiler.source-
>> path+=/tmp/lzswf9/lzgen38150 -debug=true -output /tmp/lzswf9/
>> lzgen38150/app.swf -default-size 800 600 -library-path+=/Users/ptw/
>> OpenLaszlo/ringding-clean/lps/includes/lfc/LFC9.swc /tmp/lzswf9/
>> lzgen38150/LzApplication.as)
>> compiler output:
>> Loading configuration file /usr/local/flex_sdk_3/frameworks/flex-
>> config.xml
>>
>> ERRORS:
>> Compiler error: at 262 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_basefocusview.as: 194]: Error: Access of possibly undefined
>> property focuswithkey through a reference with static type Class.
>>
>> this.setActive(LzFocus.focuswithkey);
>>                       ^
>>
>> Compiler error: at 239 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_basebutton.as: 143]: Error: Incorrect number of arguments.
>> Expected 3.
>>
>> setTint(this, s.basecolor)
>>                 ^
>>
>> Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_baseformitem.as: 118]: Error: Call to a possibly undefined
>> method xmlEscape through a reference with static type Class.
>>
>> return LzBrowser.xmlEscape(this.submitname) + '="' +
>> LzBrowser.xmlEscape(val) + '"'
>>                 ^
>>
>> Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_baseformitem.as: 118]: Error: Call to a possibly undefined
>> method xmlEscape through a reference with static type Class.
>>
>> return LzBrowser.xmlEscape(this.submitname) + '="' +
>> LzBrowser.xmlEscape(val) + '"'
>>                                                               ^
>>
>> On 2008-03-31, at 20:15 EDT, P T Withington wrote:
>>> Spot the bug:
>>>
>>> /* -*- file: base/basecomponent.lzx#110.11 -*- */
>>> 56    override function construct (parent, args) {
>>> 57    with (this) {
>>> 58    super.construct(parent, args);
>>> 59    var p = this.immediateparent;
>>> 60    while (p != canvas) {
>>> 61    if (p instanceof lz.basecomponent) {
>>> 62    this._parentcomponent = p;
>>>
>>> Er, there is a `parent` property on `this` that is shadowing the
>>> argument.  Who is inserting that `with (this)`?
>>>
>>>
>>
>>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky <at> laszlosystems.com

Henry Minsky | 1 Apr 03:33
Picon

Re: The current lossage

I'm going to take this opportunity to try and make LzFocus.lzs  compile and run in swf9.



On undefined, P T Withington <ptw <at> pobox.com> wrote:
So, if I fix the swf9 compiler (by telling it _not_ to emit implicit
this if it is not going to rename the locals) I get a bunch of new
interesting errors:

Executing compiler: (cd /tmp/lzswf9/lzgen38150; /usr/local/flex_sdk_3/
bin/mxmlc -compiler.show-actionscript-warnings=false -compiler.source-
path+=/tmp/lzswf9/lzgen38150 -debug=true -output /tmp/lzswf9/
lzgen38150/app.swf -default-size 800 600 -library-path+=/Users/ptw/
OpenLaszlo/ringding-clean/lps/includes/lfc/LFC9.swc /tmp/lzswf9/
lzgen38150/LzApplication.as)
compiler output:
Loading configuration file /usr/local/flex_sdk_3/frameworks/flex-
config.xml

ERRORS:
Compiler error: at 262 [/tmp/lzswf9/lzgen38150/$lzc
$class_basefocusview.as: 194]: Error: Access of possibly undefined
property focuswithkey through a reference with static type Class.

this.setActive(LzFocus.focuswithkey);
                       ^

Compiler error: at 239 [/tmp/lzswf9/lzgen38150/$lzc
$class_basebutton.as: 143]: Error: Incorrect number of arguments.
Expected 3.

setTint(this, s.basecolor)
                 ^

Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
$class_baseformitem.as: 118]: Error: Call to a possibly undefined
method xmlEscape through a reference with static type Class.

return LzBrowser.xmlEscape(this.submitname) + '="' +
LzBrowser.xmlEscape(val) + '"'
                 ^

Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
$class_baseformitem.as: 118]: Error: Call to a possibly undefined
method xmlEscape through a reference with static type Class.

return LzBrowser.xmlEscape(this.submitname) + '="' +
LzBrowser.xmlEscape(val) + '"'
                                                               ^

On 2008-03-31, at 20:15 EDT, P T Withington wrote:
> Spot the bug:
>
>  /* -*- file: base/basecomponent.lzx#110.11 -*- */
> 56    override function construct (parent, args) {
> 57    with (this) {
> 58    super.construct(parent, args);
> 59    var p = this.immediateparent;
> 60    while (p != canvas) {
> 61    if (p instanceof lz.basecomponent) {
> 62    this._parentcomponent = p;
>
> Er, there is a `parent` property on `this` that is shadowing the
> argument.  Who is inserting that `with (this)`?
>
>




--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

Henry Minsky | 1 Apr 03:32
Picon

Re: The current lossage

The flex compiler stops reporting errors after 50 are seen, but maybe it aborts early in other cases as well if it decides
things are too screwed up ?

On undefined, P T Withington <ptw <at> pobox.com> wrote:
What I don't get is why the `with (this)` masked those errors?

On 2008-03-31, at 21:12 EDT, Henry Minsky wrote:
> I'll see if I can either fix this or define dummy classes or methods
> to get
> past them for now.
>
>
> On undefined, P T Withington <ptw <at> pobox.com> wrote:
>
>> So, if I fix the swf9 compiler (by telling it _not_ to emit implicit
>> this if it is not going to rename the locals) I get a bunch of new
>> interesting errors:
>>
>> Executing compiler: (cd /tmp/lzswf9/lzgen38150; /usr/local/
>> flex_sdk_3/
>> bin/mxmlc -compiler.show-actionscript-warnings=false -
>> compiler.source-
>> path+=/tmp/lzswf9/lzgen38150 -debug=true -output /tmp/lzswf9/
>> lzgen38150/app.swf -default-size 800 600 -library-path+=/Users/ptw/
>> OpenLaszlo/ringding-clean/lps/includes/lfc/LFC9.swc /tmp/lzswf9/
>> lzgen38150/LzApplication.as)
>> compiler output:
>> Loading configuration file /usr/local/flex_sdk_3/frameworks/flex-
>> config.xml
>>
>> ERRORS:
>> Compiler error: at 262 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_basefocusview.as: 194]: Error: Access of possibly undefined
>> property focuswithkey through a reference with static type Class.
>>
>> this.setActive(LzFocus.focuswithkey);
>>                       ^
>>
>> Compiler error: at 239 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_basebutton.as: 143]: Error: Incorrect number of arguments.
>> Expected 3.
>>
>> setTint(this, s.basecolor)
>>                 ^
>>
>> Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_baseformitem.as: 118]: Error: Call to a possibly undefined
>> method xmlEscape through a reference with static type Class.
>>
>> return LzBrowser.xmlEscape(this.submitname) + '="' +
>> LzBrowser.xmlEscape(val) + '"'
>>                 ^
>>
>> Compiler error: at 201 [/tmp/lzswf9/lzgen38150/$lzc
>> $class_baseformitem.as: 118]: Error: Call to a possibly undefined
>> method xmlEscape through a reference with static type Class.
>>
>> return LzBrowser.xmlEscape(this.submitname) + '="' +
>> LzBrowser.xmlEscape(val) + '"'
>>                                                               ^
>>
>> On 2008-03-31, at 20:15 EDT, P T Withington wrote:
>>> Spot the bug:
>>>
>>> /* -*- file: base/basecomponent.lzx#110.11 -*- */
>>> 56    override function construct (parent, args) {
>>> 57    with (this) {
>>> 58    super.construct(parent, args);
>>> 59    var p = this.immediateparent;
>>> 60    while (p != canvas) {
>>> 61    if (p instanceof lz.basecomponent) {
>>> 62    this._parentcomponent = p;
>>>
>>> Er, there is a `parent` property on `this` that is shadowing the
>>> argument.  Who is inserting that `with (this)`?
>>>
>>>
>>
>>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky <at> laszlosystems.com




--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com


Gmane