phill54 wrote:
> Hi,
Hi
>
> I just ran into a problem concercing class dependencies/requirements and
> wonder what to do.
>
> I'm having a dynamicaly created ToolBar with Menus and Buttons. All
> buttons/menus receive their labels, iconpaths from a database. To make each
> button do something else on execution the button model has a string
> containing the class name of a class that implements a a custom interface,
> so each of the classes has a getWindow() function.
>
> example given:
>
> var obj_string = "path.to.my.Object"; // this would be the string of my
> model
>
> var dynamic_object = eval("new "+obj_string);
> var win = dynamic_object.getWindow();
>
> this.getRoot().add(win);
>
>
> my project runs perfectly in the source version.
> but my build version returns an error:
>
> path.to.my.Object is not a constructor
> [Break on this error] var bG=eval(bE);
>
> i suppose since the given class name isn't used anywhere else in my project
> the generator doesn't export path.to.my.Object.
>
> since I'm having about a dozon (and growing) dynamic objects i inserted
> this into the head of my Application.js:
>
> /*
> * #require(path.to.my.*);
> */
I also had to instantiate objects using their class name.
The #require hint was not working when it was not at the very beginning of the
line. Try:
/*
#require(path.to.my.*);
*/
with no leading "*". There was also a bug with leading whitespaces
(http://bugzilla.qooxdoo.org/show_bug.cgi?id=2886), but this may be fixed
depending on the qooxdoo version you are using.
>
> but I still get the same error. where did I go wrong? where should I look
> for the problem?
--
Loïc Bresson
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel