[Laszlo-user] suggestions for tracking down source of INFO message in pagan-deities?
P T Withington
ptw at pobox.com
Wed Mar 5 09:57:08 PST 2008
What this warning is telling you is that in 3.x when you defined a
user class (e.g., `<class name="menu">`) we would define it globally.
If you wanted to instantiate that class from script, you would say
`new menu`. For backwards compatibility, in 4.x we still define the
global if it does not conflict with a built-in (runtime) class. (We
don't want to clobber globals in the different runtimes, e.g., in
DHTML there is already a global class named `menu`.) In the case
where we don't define the global, we are emitting this warning, to
remind you that if you want to instantiate the user-defined class from
script, you need to say `new lz.menu` now.
Perhaps we should just do away with this warning and rely on
documentation instead?
On 2008-03-05, at 11:53 EST, Elliot Winard wrote:
> I'm changing the debug messageLevel used in a large application from
> WARNING to ALL [0] to complete a port from wafflecone to the pagan-
> deities branch of OLS.
>
> One of the INFO messages that shows up is a message about global
> `menu` already being defined.
> I grepped through the code (I didn't write all of it) and it is not
> obvious what LZX (or ECMAScript) is triggering this warning.
>
> What's the best way to track this down? I filed LPP-5545 to track
> this issue.
>
> Thanks,
> -e
>
> [0]
> I'm removing this -
> Debug.messageLevel='WARNING';
>
> [0]
> INFO: The global `menu` is already defined. To dynamically create a
> <menu> element, you will have to use `lz.menu`.
> INFO @../../applib/contacts/contacts.lzx#384: getNodeAttribute: p is
> null in LzDatapointer lzx> Debug.inspect(«LzInfo| INFO: The global
> `menu` is alrea...»)
> «LzInfo#1| INFO: The global `menu` is already defined. To
> dynamically create a <menu> element, you will have to use
> `lz.menu`.» {
> backtrace: $lzsc$initialize <- lz.class <- makeChild <-
> makeSomeViews <- checkQ <- ...
> file: null
> line: null
> message: 'The global `menu` is already defined. To dynamically
> create a <menu> element, you will have to use `lz.menu`.'
> }«LzInfo#1| INFO: The global `menu` is already defined. To
> dynamically create a <menu> element, you will have to use `lz.menu`.»
> lzx>
>
More information about the Laszlo-user
mailing list