[Laszlo-dev] Dynamic library in SOLO mode
Henry Minsky
henry.minsky at gmail.com
Thu Jan 3 12:59:46 PST 2008
Yes that is right, if you modify the "href" attribute of the LzLibrary
object (that is the name of the class which the <import> tag makes),
then that is what will be used as the URL to load from. The LZX
compiler normally supplies that value, based on the location of the
library file at compile time, but you can modify it at runtime if
you really need to.
On Jan 3, 2008 3:59 PM, André Bargull <a.bargull at intensis.de> wrote:
> Actually, it's quite easy to do so, you just need to alter a specific
> propery of the library-node, no need to dig into the LzLibraryLoader code.
> See: http://forum.openlaszlo.org/showthread.php?t=9713 and
> http://forum.openlaszlo.org/showthread.php?t=4034
>
> Regards,
> André
>
> > What do you mean when you say you "moved" the library fils? The
>
> > library loader constructs
> > a specific path to get the library file from, which has to be relative
> > to the app main directory,
> > of the form "build/../libname.swf", so if you alter that relative
> > location, you would have to modify
> > the library loader to know where to find the library file at runtime.
> >
> > One thing you might check is to see where the application is trying to
> > fetch the library from,
> > if you can monitor your browser's HTTP requests. You can also put a
> > debug print statement into
> > the library loader , which is in kernel/swf/LzLibraryLoader.lzs , to
> > see what URL it is attempty to load
> > from.
> >
> >
> >
> >
> > On Jan 2, 2008 9:21 PM, Hyok S. Choi <hyok.choi at samsung.com> wrote:
> >
> >> > Hello,
> >> >
> >> > We're trying to make a OL application which loads a few libraries in SOLO
> >> > mode.
> >> >
> >> > e.g., at the main.lzx ;
> >> > <import href="mylib.lzx" stage="defer" name="mylib"/>
> >> >
> >> > When we compiled them to SOLO mode, we've got
> >> > main.lzx.{..}.swf and build/../mylib.lzx.{..}.swf
> >> > and moved the *.swf files into some local directory.
> >> > When we tried to run the main.lzx.{..}.swf by a flash player from the local
> >> > copy,
> >> > it gives an error which says "unable to load" the mylib.lzx.{..}.swf file.
> >> >
> >> > Do we have any way to import a library from local storage?
> >> >
> >> > Another one,
> >> > We've found that the mylib.lzx.{..}.swf file could be replaced with a new
> >> > version
> >> > even if the main.lzx.{..}.swf was old version(which built before the
> >> > additional
> >> > modification on the mylib.lzx).
> >> >
> >> > Is the "defer" staged import loads the library at runtime by somewhat symbol
> >> > matching or something? (as .so does)
> >> >
> >> > Best Regards,
> >> > Hyok
> >> >
> >> >
> >>
> >
> >
> >
> > -- Henry Minsky Software Architect hminsky at laszlosystems.com
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
More information about the Laszlo-dev
mailing list