[Laszlo-dev] delegates *must* have an argument?
Sarah Allen
sarah at ultrasaurus.com
Thu Mar 19 12:22:55 PDT 2009
if that is the case I usually write: args="unused"
On Mar 19, 2009, at 12:07 PM, Antun Karlovac wrote:
> Yeah, you have to have one argument now for methods that get called
> by delegates. It's annoying. Happened in 4.1 (http://www.antunkarlovac.com/blog/2008/07/02/migrating-lzx-code-to-openlaszlo-41/
> ).
>
> I wonder if the arguments should be documented if they're only there
> for the purpose of avoiding the compiler warning? (e.g. when you
> write args="arg").
>
> -Antun
>
> Sarah Allen wrote:
>> So, I've got this code...
>> <method name="_activateTimeDel">
>> //Debug.write("mediastream._activeTimeDel()", this);
>> if (!this._timedel) {
>> this._timedel = new LzDelegate(this, "_updateTime");
>> }
>> this._timedel.unregisterAll();
>> this._timedel.register(lz.Idle, "onidle");
>> </method>
>> I had noticed that _updateTime had an unused (and undocumented)
>> argument 'v' which I removed to make the code cleaner and clearer.
>> However, in the swf9 runtime, I learn that delegates *must* be
>> declared with an argument:
>> WARNING: Invalid delegate: mediastream name: ms._updateTime =>
>> Function (must accept one argument)
>> So, I go look up in the reference to see what the argument is and
>> find no mention of it. Is this a doc omission?
>> just curious... for now, I'll just put back the mysterious 'v'
>> Sarah
More information about the Laszlo-dev
mailing list