[qooxdoo-devel] Object mocks should be derived from the class of the objects they mock

2012-08-15 Thread Florin Jurcovici
Trying to inject a mock instead of the real dependency into a property fails, if there is an instanceof-like check in place. This seriously hampers the use of mocks in tests. This can be avoided if object mocks are derived from the class of the object they mock. -- Rule of Diversity: Distrust all

Re: [qooxdoo-devel] Custom Libraries

2012-08-15 Thread Benjamin Cuningham
Wow! Thank you all for your quick replies. I created a new application called "Kravis" (using the default "desktop" option) and added the Manifest.json file for that application to the config.json (see attached) file of another application. When I run "generate.py source-all" on that applicat

Re: [qooxdoo-devel] Custom Libraries

2012-08-15 Thread Loren Schlomer
Very good point. Thank you for the correction. On Wed, Aug 15, 2012 at 9:30 AM, thron7 wrote: > You don't have to create a 'contribution' skeleton, a 'gui' skeleton > serves even better if you want to use the library locally. The > 'contribution' skeleton adds additional directory structure (and

Re: [qooxdoo-devel] Custom Libraries

2012-08-15 Thread thron7
You don't have to create a 'contribution' skeleton, a 'gui' skeleton serves even better if you want to use the library locally. The 'contribution' skeleton adds additional directory structure (and hence complexity) which is only interesting when you want to publish the library on qooxdoo-contri

Re: [qooxdoo-devel] Custom Libraries

2012-08-15 Thread thron7
There is even a dedicated manual page for what you ask: http://manual.qooxdoo.org/2.0.x/pages/development/library_custom.html A "library" is a fundamental concept in qooxdoo. All code is actually considered to be found in libraries. In that sense the qooxdoo framework classes themselves consti

Re: [qooxdoo-devel] Custom Libraries

2012-08-15 Thread Loren Schlomer
Create a Contribution project using the create-app script for all of the shared stuff. Link to your lib like you would any other contribution in your config.json using a relative path to its Manifest.json instead of the contrib uri. On Wed, Aug 15, 2012 at 9:02 AM, Benjamin Cuningham wrote

Re: [qooxdoo-devel] Custom Libraries

2012-08-15 Thread Alexander Steitz
Hi Benjamin, the best way would be to split up your code in own "libraries" (from a qooxdoo point of view) and integrate them together in your main application. How to use libraries and what they are all about is described here: http://manual.qooxdoo.org/current/pages/tool/generator_config_arti

[qooxdoo-devel] Custom Libraries

2012-08-15 Thread Benjamin Cuningham
We are developing several standalone applications and would like to share classes across them. What is the best way to organize shared classes into some sort of library? Thank you, -Benjamin Cuningham -- Live Security Vi

Re: [qooxdoo-devel] Qooxdoo 2.0.1 and CodeMirror 2.32 Integration

2012-08-15 Thread smhanes
John, Thanks a ton for your response. It's definitely gotten me farther along. Luckily, I know which CM JS/CSS modules to load and can hard-code those in. I can get the CM instance to load, but will occasionally get an uncaught referenceerror (editor is not defined). Would it be too much trouble

Re: [qooxdoo-devel] Filter on icon

2012-08-15 Thread Patrice Oostermeyer
Ignore this one, I have solved the case. Filtering is still based on the String value, only the value is rendered as an icon. 2012/8/14 Patrice Oostermeyer > Hello, > > I'm using the Filered table, and filtering on a string works just fine. > But I also have columns with icons, how can I filter

Re: [qooxdoo-devel] TypeError: invalid 'instanceof' operand qx.ui.core.Widget

2012-08-15 Thread Robert Nimax
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 b

Re: [qooxdoo-devel] TypeError: invalid 'instanceof' operand qx.ui.core.Widget

2012-08-15 Thread Alexander Steitz
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

Re: [qooxdoo-devel] Constructor error

2012-08-15 Thread Robert Nimax
Hi, re-run the generator so it can detect the dependency to qx.ui.menubar.MenuBar. HTH, Rob. -Ursprüngliche Nachricht- Von: kay [mailto:kabelo.tsama...@gmail.com] Gesendet: Mittwoch, 15. August 2012 11:32 An: Robert Nimax; qooxdoo-devel@lists.sourceforge.net Betreff: [qooxdoo-devel] Cons

Re: [qooxdoo-devel] Constructor error

2012-08-15 Thread Marc Puts
Hi Kay, Did you run the generator (./generate.py source)? This error typically happens if you forget to do that after including a new class, because the class won't be loaded then. Regards, Marc On 08/15/2012 11:31 AM, kay wrote: > Hi There > > I have a construcotr defined already,what I want i

[qooxdoo-devel] Constructor error

2012-08-15 Thread kay
Hi There I have a construcotr defined already,what I want is to create another functiion to include menubar on my desktop application,but I'm getting this error : " TypeError: qx.ui.menubar.MenuBar is not a constructor" how can I unclude two constructor? here is my code: qx.Class.define("cont

Re: [qooxdoo-devel] TypeError: invalid 'instanceof' operand qx.ui.core.Widget

2012-08-15 Thread Robert Nimax
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; }

[qooxdoo-devel] TypeError: invalid 'instanceof' operand qx.ui.core.Widget

2012-08-15 Thread Robert Nimax
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

Re: [qooxdoo-devel] Qooxdoo and JS-Ctypes problem while generating source

2012-08-15 Thread 689137
Daniel, This solves my problem! I got some more errors like Scanning libraries \Unknown operator u'int' for using ctypes.int, but applying same approach solves this problem as well. Thank you! -- View this message in context: http://qooxdoo.678.n2.nabble.com/Qooxdoo-and-JS-Ctypes-problem-whi

Re: [qooxdoo-devel] Qooxdoo and JS-Ctypes problem while generating source

2012-08-15 Thread Daniel Wagner
You can use the bracket notation: Components.utils["import"]("resource://gre/modules/ctypes.jsm"); On 08/15/2012 10:18 AM, 689137 wrote: > But what are the alternatives of the Components.utils.import? > > > > > -- > View this message in context: > http://qooxdoo.678.n2.nabble.com/Qooxdoo-and-JS-

Re: [qooxdoo-devel] Qooxdoo and JS-Ctypes problem while generating source

2012-08-15 Thread 689137
But what are the alternatives of the Components.utils.import? -- View this message in context: http://qooxdoo.678.n2.nabble.com/Qooxdoo-and-JS-Ctypes-problem-while-generating-source-tp7580977p7580984.html Sent from the qooxdoo mailing list archive at Nabble.com. --

Re: [qooxdoo-devel] Qooxdoo 2.0.1 and CodeMirror 2.32 Integration

2012-08-15 Thread John Spackman
Yes I've done it; the basic idea is to extend from qx.ui.core.Widget, and when you're ready to initialise the widget get the DOM element by calling this.getContentElement().getDomElement() and then pass the result to CodeMirror constructor. In my case I knew the DOM was ready at the time when I wa

Re: [qooxdoo-devel] Qooxdoo 2.0.1 and CodeMirror 2.32 Integration

2012-08-15 Thread Jean-Noël Rivasseau
It's definitely possible. We did it with Qooxdoo 2.0 (don't know the CM version). You can email ko...@kameleoon.com for details (that's the engineer that wrote the integration). Cheers On Tue, Aug 14, 2012 at 8:59 PM, smhanes wrote: > For the last several days, I've been trying to find out how

Re: [qooxdoo-devel] Qooxdoo and JS-Ctypes problem while generating source

2012-08-15 Thread thron7
"import" is a future reserved word in JS, use something else. t. On 08/14/2012 03:59 PM, 689137 wrote: > I am using JS-Ctypes in my Qooxdoo project. When I try to generate source, I > am given the following error: > > Scanning libraries -Unknown operator u'import' > > This error is risen when usi

[qooxdoo-devel] Qooxdoo and JS-Ctypes problem while generating source

2012-08-15 Thread 689137
I am using JS-Ctypes in my Qooxdoo project. When I try to generate source, I am given the following error: Scanning libraries -Unknown operator u'import' This error is risen when using the following function: Components.utils.import("resource://gre/modules/ctypes.jsm"); Does any one know how to

[qooxdoo-devel] Qooxdoo 2.0.1 and CodeMirror 2.32 Integration

2012-08-15 Thread smhanes
For the last several days, I've been trying to find out how to integrate CodeMirror into Qooxdoo. All I have found is this: http://www.mail-archive.com/qooxdoo-devel@lists.sourceforge.net/msg35552.html. Both of these are old versions and after poring over Qooxdoo's Playground implementation, I'm n