Hi,
thanks a lot ! I think, to add a the require-configuration is the way to go. I
will try this solution later.
I guess, I expressed myself not correct. Of course, I did not change the boot
part per se. :) I just moved code to other classes to minimize dependencies so
that the part, that will be loaded after the boot part (the first view of the
application) will be much smaller. So I still don´t understand, why the
dependency between qx.ui.core.EventHandler and qx.ui.core.Widget is not
established. The generator should analyse qx.ui.core.EventHandler and "see" the
dependency to qx.ui.core.Widget, because of the method canHandleEvent,
shouldn´t it ?
Cheers,
Rob.
Von: Alexander Steitz [mailto:[email protected]]
Gesendet: Mittwoch, 15. August 2012 13:16
An: Robert Nimax; qooxdoo Development
Betreff: Re: [qooxdoo-devel] TypeError: invalid 'instanceof' operand
qx.ui.core.Widget
Hi Robert,
the "instanceof" check relies on an implicit knowledge that on that given time
the "qx.ui.core.Widget" class is available. This is secured through the startup
of a qooxdoo application. If you change your boot sequence it breaks
(obviously).
One solution could be to remove the lines below. Another solution would be to
include the following lines in your "config.json":
--snip--
"require" :
{
"qx.ui.core.EventHandler" : [ "qx.ui.core.Widget" ]
}
--snip--
Described here:
http://manual.qooxdoo.org/current/pages/tool/generator_config_ref.html#require
This tells the generator explicitly about a dependency between those two
classes.
Regards,
Alex
From: Robert Nimax
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Wednesday, August 15, 2012 11:12 AM
To: 'qooxdoo Development'
Subject: Re: [qooxdoo-devel] TypeError: invalid 'instanceof' operand
qx.ui.core.Widget
Of course...the solution for me is to remove the dependency to
qx.log.appender.Console in the application class (generated code / application
skeleton !):
if ((qx.core.Environment.get("qx.debug")))
{
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
}
That´s okay for us as we don´t use this console.
Von: Robert Nimax [mailto:[email protected]]
Gesendet: Mittwoch, 15. August 2012 10:56
An: Robert Nimax; 'qooxdoo Development'
Betreff: [qooxdoo-devel] TypeError: invalid 'instanceof' operand
qx.ui.core.Widget
Hi all,
I observed a strange error.
I´ve been doing optimizations as I removed class dependencies to minimize the
boot part.
The build version worked fine (and fast of course), but source version
failed...a little bit. :)
To cut a long story, that´s the call stack:
TypeError: invalid 'instanceof' operand qx.ui.core.Widget
http://localhost:8080/ap/qooxdoo/framework/source/class/qx/ui/core/EventHandler.js
Line 163
Callstack:
canHandleEvent(target=html, type=
"keypress"
)EventHandler.js (Zeile 163)
wrappedFunction()Interface.js (Zeile 451)
findHandler(target=html, type=
"keypress"
)Manager.js (Zeile 564)
__registerAtHandler(target=html, type=
"keypress"
, capture=
undefined
)Manager.js (Zeile 587)
addListener(target=html, type=
"keypress"
, listener=qx.log.appender.Console.__onKeyPress()(), self=[Class
qx.log.appender.Console] { __visible=
true
, __history=[0], classname=
"qx.log.appender.Console"
, mehr...}, capture=
undefined
)Manager.js (Zeile 463)
addListener(target=html, type=
"keypress"
, listener=qx.log.appender.Console.__onKeyPress()(), self=[Class
qx.log.appender.Console] { __visible=
true
, __history=[0], classname=
"qx.log.appender.Console"
, mehr...}, capture=
undefined
)Registration.js (Zeile 130)
defer(statics=[Class qx.log.appender.Console] { __visible=
true
, __history=[0], classname=
"qx.log.appender.Console"
, mehr...})Console.js (Zeile 363)
define(name=
"qx.log.appender.Console"
, config=Object { statics=[Class qx.log.appender.Console], type=
"static"
, defer=function()})Class.js (Zeile 251)
Console.js()
The message is obvious:
canHandleEvent : function(target, type) {
return target instanceof qx.ui.core.Widget;
},
qx.ui.core.Widget has not been loaded, so it´s undefined.
So...the defer function of qx.log.appender.Console is called before
qx.ui.core.Widget is loaded, because the boot script is small (and because
there is no dependency for qx.ui.core.Widget ?).
A solution for myself could be to change the function canHandleEvent of
qx.ui.core.EventHandler:
canHandleEvent : function(target, type) {
return qx.ui.core.Widget ? (target instanceof qx.ui.core.Widget) : false;
},
So...any suggestions ?
Thanks,
Rob.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel