allright i m gonna check them and i'll add the includes just for the classes that i will need. thanks a lot. kind regards
2009/12/2 Henry Minsky <[email protected]> > You don't need to have the include in every library, but it is good style > to do so, if you look at how > the lps/components/lz and components/base files are written, people > generally do include > the library files that they rely on, it is a kind of documentation as well > as allows the files to > be used and only include the classes that they really need. > > > > On Wed, Dec 2, 2009 at 10:38 AM, cem sonmez <[email protected]> wrote: > >> at first sorry for my bad english >> I m talking about the same thing that henry has explained : >> >> * create a library.lzx file and include all the lzx files inside it. So i >> think i will not need to use the include tag in each class. Thanks for your >> help. >> >> Regards >> >> 2009/12/2 Henry Minsky <[email protected]> >> >> Or maybe he's asking how can you refer to a class in a library file when >>> there is no explicit <include> for it? >>> >>> The Laszlo compiler reads the whole LZX program into memory, processing >>> all the <include> tags, so it is then possible that a library file can see >>> other class definitions as long as some other file has <included>ed them >>> someplace in the program. This can be confusing, and it is always better to >>> explicitly include the classes you are going to use in each file. The >>> compiler is smart enough to only >>> include the classes from a file once even if multiple <include> tag >>> reference it. >>> >>> On Wed, Dec 2, 2009 at 10:04 AM, P T Withington <[email protected]> wrote: >>> >>>> Not sure what your question is. >>>> >>>> In Java (and many of its relatives), each class must be defined in its >>>> own file. I don't know why. Maybe this makes it easier on your IDE. >>>> >>>> But if that is your question, OpenLaszo has no such constraint. You can >>>> define as many different classes as you like in a file, in any order, and >>>> it >>>> will sort them out and make sure the class is defined before it is used. >>>> >>>> On 2009-12-02, at 07:31, cem sonmez wrote: >>>> >>>> > Hi all >>>> > I am taking a look at the LZProject in the demos directory of lps. >>>> Trying to >>>> > understand the operations but one thing that i couldnT undestand well. >>>> > In most of the lzx files, classes use the external classes in the >>>> class >>>> > definetion instead of using the <include> tag. For example : >>>> > >>>> > I18NFlag.lzx >>>> > ___________ >>>> > <library> >>>> > <class name="I18NFlag" extends="view"> >>>> > <!-- PUBLIC ATTRIBUTE SECTION --> >>>> > >>>> > <ServiceConnector name="i18nConn" form="$once{parent}"> >>>> > <method name="handleResult" args="message"> >>>> > // Nothing to do >>>> > </method> >>>> > </ServiceConnector> >>>> > .... >>>> > How do we manage to do this. I always use the <include> tag, when i >>>> want to >>>> > create an instance of external lzx classes. >>>> > Maybe this seems to you a ridiculous question, but for a while i m >>>> confusing >>>> > this issue. >>>> > >>>> > Thanks. >>>> > >>>> > -- >>>> > Cem SONMEZ >>>> >>>> >>>> >>> >>> >>> -- >>> Henry Minsky >>> Software Architect >>> [email protected] >>> >>> >>> >> >> >> -- >> Cem SONMEZ >> > > > > -- > Henry Minsky > Software Architect > [email protected] > > > -- Cem SONMEZ
