Wow. Why do we always have to do things in the most complicated possible way? Any idea why this can't just be written as a handler?

And, I think it is just a rule that a handler gets one argument, so you had better declare it. It would be really gross for sendEvent to have to look at each handler and decide how many arguments to send it.

On 2008-03-28, at 17:01 EDT, Henry Minsky wrote:
OK, more progress.

Now, here's an issue, whenever there is a method which is registered to be
called by an event handler,
such as "update" or "__parentInit" in LzLayout, the sendEvent expects it to
take an argument.

       this.initDelegate = new LzDelegate( this , "__parentInit",
this.immediateparent, "oninit" );

In LzLayout, there is a method called "update" which is registered to be an
event handler through some contorted
and scary looking mechanism where it pushes it on a list named "delegates"

   this.updateDelegate = new LzDelegate( this , "update" );

   this.delegates = [ this.updateDelegate ];


and then LzLayout overrides constructWithArgs

override function constructWithArgs ( args ) {


SO anyway, in simplelayout, a user-defined class, it defines a method named
"update", with no args

   <method name="update">

So, I think we need a way to specify optional or default args in the args
list to a <method> declaration, like maybe

<method name="update" args="v=null" >

or

<method name="update" args="...rest">

??



On undefined, Henry Minsky <[EMAIL PROTECTED]> wrote:

Oh, I put addSubview  on LzView in the schema, but LzLayout extends
LzNode, and defines its own addSubview method.
So i need to put it on LzLayout in the schema.

Sigh, I guess we'll be finding some more of these for a while cuz I did
this manually.


On undefined, Henry Minsky <[EMAIL PROTECTED]> wrote:

It looks like it is. I'm wondering if I have code that is only checking
the immediate superclass for the existence of
an attribute instead of all the way up the chain or something. Time for
some print statements..


On undefined, P T Withington <[EMAIL PROTECTED]> wrote:

You're sure LzNode#addSubview is in the schema?

On 2008-03-28, at 16:40 EDT, Henry Minsky wrote:
Hmm, the new code to check for overrides is failing to catch this
case where
simplelayout overrides the LzView addSubview method.

I better put some tracing in to see why it doesn't identify this as
a method
of a superclasss...


Compiling: hello-layout.lzx to hello-layout.lzr=swf9.swf
writing script to /tmp/lzx-script.js
Executing compiler: (cd /tmp/lzswf9/lzgen55753;
/Users/hqm/flex3/bin/
mxmlc
-compiler.show-actionscript-warnings=false
-compiler.source-path+=/tmp/lzswf9/lzgen55753 -debug=true -output
/tmp/lzswf9/lzgen55753/app.swf -default-size 800 600

-library-path+=/Users/hqm/openlaszlo/trunk4/lps/includes/lfc/ LFC9.swc
/tmp/lzswf9/lzgen55753/LzApplication.as)
compiler output:
Loading configuration file
/Users/hqm/openlaszlo/adobe/trunk/frameworks/flex-config.xml

ERRORS:
Compiler error: at [/tmp/lzswf9/lzgen55753/$lzc
$class_simplelayout.as: 38]:
Error: Overriding a function that is not marked for override.

function addSubview (newsub) {
       ^

FAIL: compiler returned 1
Done executing compiler
Intermediate file /tmp/lzswf9/lzgen55753/app.swf: does not exist
Compilation errors occurred:

--
Henry Minsky
Software Architect
[EMAIL PROTECTED]




--
Henry Minsky
Software Architect
[EMAIL PROTECTED]




--
Henry Minsky
Software Architect
[EMAIL PROTECTED]




--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to