two questions:

1) how would you recommend declaring my lzoptions  parsing function so it
could be used
both in the LFC and in embed.js? In embed.js, it's defined as two methods on
lz.embed, and in the LFC I put those methods on the class LzKernelUtils. I'm
not sure
how to use #include to get the same code to be defined in those two
different places.

2)  Is there a period in app startup when it is too early to call out to
lz.embed, from the swf app?

I'm asking because originally I tried to  just make a callJS  call from
LzDebug.makeWindow()
to the lz.embed.parselzoptions method, but it did not seem to work, although
it worked
ok when I called it manually from the debugger. So that seemed to me like
some kind of
race condition where lz.embed was not yet initialized when that call was
made?

I am wondering whether using the Andre's RegExp implementation, which works
via lz.embed, also will have some problem with it being too early and
lz.embed not being ready
to respond when I make that call from LzDebug.makeWindow().





On Sun, Aug 22, 2010 at 1:37 PM, Max Carlson <[email protected]> wrote:

> On 8/22/10 1:10 AM, Henry Minsky wrote:
>
>>
>>
>>>    On Sat, Aug 21, 2010 at 7:10 PM, Max Carlson <
>>>    <mailto:[email protected]>[email protected]
>>>
>>>    <mailto:[email protected]>> wrote:
>>>
>>>        Can you use RegExps instead of string ops for the parser in
>>>        embednew.js?  Also, could the parsing/unparsing code be shared
>>>        by embednew.js, dev-console.lzx, LzDebug and LzKernelUtils?
>>>
>>>
>>>    I was having trouble  in LzDebug.makeWindow() with calling out
>>>    from the app to lzembed to get the parser service;  it seemed like
>>>    the lz.embed code was not initialized yet when LzDebug tried to
>>>    call it.  Maybe that code runs too early in the app init process
>>>    to reliably
>>>    talk to lz.embed ? So that's why I ended up putting a copy of the
>>>    options parser into the LFC
>>>    (in LzKernelUtils).
>>>
>>>
>>    Sure, but why not share the same include across both places?
>>
>>
>> You mean include the same file into the LFC and into embed.js? I guess I
>> could
>> do that, although that would mean I would not want to use regexps
>> because they
>> aren't available in  natively in swf8. Also, where should the source
>> file live?
>>
>
> You can use RegExps in swf8, thanks to André's implementation.  You can put
> the source file in lps/includes/source/ or WEB-INF/lps/lfc/, or we could
> make up a new place.  Be sure to put a comment calling out the fact that
> it's shred across both places.
>
> --
> Regards,
> Max Carlson
> OpenLaszlo.org
>



-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to