[Laszlo-dev] super.initialize call for a class with no superclass?
Henry Minsky
henry.minsky at gmail.com
Mon Jun 12 14:12:52 EDT 2006
I removed the pragma in LzLoader, but then started getting this compiler
error:
Compile again [Enter | q + Enter]:
org.openlaszlo.sc.CompilerException: data/LzLoader.as:15:5:
org.openlaszlo.sc.UnimplementedError: unimplemented: calling
super.initialize from null. The method names must have the same
capitalization.
Compilation aborted.
so I put it back for now.
On 6/12/06, P T Withington <ptw at openlaszlo.org> wrote:
>
> A class with 'no superclass' will still have Instance as its
> superclass, and right now Instance.initialize is used for scaffolding.
>
> In general, it is always good practice to call your super initialize
> method.
>
> You should be able to delete the pragma as the new class system
> doesn't have the restriction that you can only call super on the
> method you are overriding.
>
> On 2006-06-12, at 12:59 EDT, Henry Minsky wrote:
>
> > The code declaring the LzLoader class in legals starts like this
> >
> >
> > LzLoader = Class("LzLoader", null, function ( owner , args ){
> > #pragma 'methodName=initialize'
> > super.initialize(owner, args);
> >
> > Is it necessary for the initialize method to call super.initialize
> > for a
> > class with no superclass?
> >
> >
> >
> >
> > --
> > Henry Minsky
> > Software Architect
> > hminsky at laszlosystems.com
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20060612/12a9e1b0/attachment.html
More information about the Laszlo-dev
mailing list