[Laszlo-dev] ERROR: Attempt to instantiate <foo>, which has not been defined
P T Withington
ptw at pobox.com
Wed Dec 31 08:04:40 PST 2008
The private internal protocol for translating an LZX class to a JS
class has changed (to accomodate the new runtimes). Your test case is
out of date.
Is there some compelling reason that you are not just writing your
class as a class? That would avoid a lot of trouble.
On 2008-12-31, at 10:13EST, Sarah Allen wrote:
> I was trying to isolate a bug where the type setter wasn't being
> called for videoview with the test file below. The dynamic class/
> interface stuff is new for me. Can someone tell me what I did wrong?
>
> I get this runtime error in the debugger:
> ERROR: Attempt to instantiate <foo>, which has not been defined
>
> <canvas><interface name="foo" extends="view"> <!--- Protocol
> "rtmp" or "http". Default: http. --> <attribute name="type"
> value="http" type="string"/></interface><switch> <when
> runtime="dhtml"> <!-- no support for foo in DHTML runtime -->
> </when> <otherwise> <script when="immediate"><!
> [CDATA[ // Classes that implement an interface must obey the
> LZX // tag->class mapping convention dynamic class $lzc
> $class_foo extends LzView { // Next two are part of the
> required LFC tag class protocol static var tagname =
> 'foo'; static var attributes = new
> LzInheritedHash(LzView.attributes); static var uid =
> 0; function $lzc$class_foo(parent, attrs, children, async)
> { super(parent, attrs, children, async); }
> override function init() { super.init();
> if (this.debug) { if ($debug)
> Debug.write("foo.init()"); } } function $lzc
> $set_type(newtype) { Debug.write("videoview setType", newtype,
> "old", this['type'], "isinited", this.isinited, "stream",
> this['stream']); //if (newtype == undefined) newtype =
> 'http'; this.type = newtype; //
> Debug.write('type', this.type); // _setType called before init or
> stream is define, so tip-toe. if (this['stream'])
> { this.stream.setAttribute("type",
> newtype); } } } ]]></script> </
> otherwise> </switch><foo/></canvas>
More information about the Laszlo-dev
mailing list