[Laszlo-dev] Adding a class to LFC?
Cortlandt Winters
cort at notebookmargins.com
Wed Jun 1 04:51:20 PDT 2005
Hi PT,
Thank you for responding so quickly,
Yes, I was going to be more specific than saying "without sucess" but I
managed to muck up my source so that it fails for some other reason now and
I need to start again with a fresh tree of source without all my noodling
included.
If my memory is correct when I tried to instantiate a frogview tag the
compiler gave me a warning that the class didn't seem to exist and did I
spell it corectly?
Thank you for both of these additional steps, I'll try them both out. And I
will take notes for the future and add to the wiki when I figure it out.
Thanks again!
-Cort
> -----Original Message-----
> From: P T Withington [mailto:ptw at pobox.com]
> Sent: Wednesday, June 01, 2005 7:43 AM
> To: cort at notebookmargins.com
> Cc: OpenLaszlo development development
> Subject: Re: [Laszlo-dev] Adding a class to LFC?
>
>
> What do you mean by 'without success'?
>
> One thing you might have missed if you are trying to invoke the class
> by <frogview> is the ConstructorMap in LaszloInitiator.as and the
> fact that you have to add your new tag to the schema in lzx.rnc.
> (For 'user' code, the mapping from tag to class is 1-1 and the schema
> is extended automatically by the compiler. It's on the wishlist for
> this to be more uniform.)
>
> Hm, this should probably be written up on the Wiki. Hope you're
> taking notes :).
>
> On 1 Jun 2005, at 07:13, Cortlandt Winters wrote:
>
> > Hi Folk,
> >
> > I wonder if somebody could tell me what the steps are to compile a
> > new LFC
> > class?
> >
> > So by way of example, if I were to have a class like this one.
> >
> > /
> > **********************************************************************
> > *****
> > ***
> > * FrogView.as
> >
> > **********************************************************************
> > ******
> > */
> >
> > //===================================================
> > // DEFINE OBJECT: FrogView
> > // View of a frog minded amphibian or an actual Frog
> > //===================================================
> > var LzFrogView = Class ( "LzFrogView" , LzView );
> >
> > LzFrogView.prototype._viewconstruct = LzView.prototype.construct;
> >
> > //--------------------------------------------------------------------
> > ------
> > ---
> > // @keywords private
> > //--------------------------------------------------------------------
> > ------
> > ---
> > LzFrogView.prototype.construct = function ( parent, args ) {
> > Debug.write("FrogView Being Constructed");
> > this._viewconstruct( parent , args );
> > }
> >
> > and I wanted to add it to the LFC, how would I do it?
> >
> > Currently I've tried putting it in the following directory
> >
> > C:\lz3\lps-3.0-src\lps-3.0\WEB-INF\lps\lfc\views
> >
> > And by adding
> > #include "views/LzFrogView.as"
> >
> > in the Library.as file in it's parent directory, but without success.
> >
> > Is there a minimal set of methods that a LFC object must implement
> > or some
> > other method of getting one compiled? I'm just guessing from
> > looking at the
> > directory structure and their contents that that might have worked.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks!
> >
> > -Cort
> >
> > _______________________________________________
> > Laszlo-dev mailing list
> > Laszlo-dev at openlaszlo.org
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> >
> >
>
More information about the Laszlo-dev
mailing list