Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Jim Hunter
I had included some sample code of what I am doing. I added the disposeChildren method to qx.core.Object, this is not a current method. I have a few other methods that I added to Object as well, but they are all similar to disposeChildren. JimOn 9/25/06, Sebastian Werner <[EMAIL PROTECTED]> wrote:

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Dietrich Streifert
as I understood Christians code he does not add new properties and methods to object instances. He just add them to a already defined class. Please correct me if I'm wrong. I'm doing the same thing with the current rev. Adding and modifying properties and methods (including modifiers) to a alre

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Sebastian Werner
Jim, we talk about properties here, but right, this will affects fields and methods, too. Do you only fix properties to fulfill your custom needs or do you add stuff, too? Cheers, Sebastian Jim Hunter schrieb: > I add both fields and methods to base classes. Here is an example of one > of t

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Christian Boulanger
Sebastian Werner schrieb: Hi Christian, please explain what are your exact use cases. Do you just add properties e.g. IDs etc. or do you even modify them? To you attach modifiers? Do you do this on instance level or on prototype level? Cheers, Sebastian Hi Sebastian, have a look at the

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Jim Hunter
I add both fields and methods to base classes. Here is an example of one of the methods that I use all over my application (I use the disposeChildren() function everywhere to remove objects from the system as removeAll() does not work as detailed in many posts): qx.Proto = qx.OO.classes["qx.core.Ob

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Sebastian Werner
Hi Christian, please explain what are your exact use cases. Do you just add properties e.g. IDs etc. or do you even modify them? To you attach modifiers? Do you do this on instance level or on prototype level? Cheers, Sebastian Christian Boulanger schrieb: > Hi Sebastian, > > thanks for you

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Christian Boulanger
Hi Sebastian, thanks for your input. I can only speak for myself, but my interest as developer is to work with the existing classes instead of subclassing them as new ones. This is much more flexible and allows me to extend the behaviour of my application without having to rewrite a single line

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Sebastian Werner
OK, lets me explain the benefits of this new version, when it comes, and let us find solutions for your needs. Sometimes it's not the best solution to try to keep an existing system, especially when they have some design issues. It might be better to reinvent the wheel in some cases. And we def

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Kent Olsson
Hej Christian! Are you still struggling? Forget to migratewe have tried to do it in house. The result: too costy Additionally, there are too many issues we do not accept with the new version. Good luck in your struggling, but the question is if you ever will be ready with version 1. We ha

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Christian Boulanger
Sebastian Werner schrieb: > > I just mention this, because this will not work in the future. The plans > for a new property system doesn't allow the dynamic addition of > properties to previously defined classes. > > Maybe it's better to enhance the other properties to make it possible to > use

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Jim Hunter
I would like to chime in and say that if you remove the ability to add properties to already defined classes it will completely blow my program up. I have added many properties to many objects and I do it at run time so that I don't have to manage my custom code as opposed to the SVN code. Right no

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Sebastian Werner
Christian Boulanger schrieb: > Sebastian Werner schrieb: >> Christian Boulanger schrieb: >> >>> Sebastian Werner schrieb: >>> >>> However I would like to mention again, that this is not a good idea. Please use the userData support instead of custom runtime added properties.

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Christian Boulanger
Sebastian Werner schrieb: > Christian Boulanger schrieb: > >> Sebastian Werner schrieb: >> >> >>> However I would like to mention again, that this is not a good idea. >>> Please use the userData support instead of custom runtime added properties. >>> >>> obj.setUserData("myproperty", "the

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Sebastian Werner
Christian Boulanger schrieb: > Sebastian Werner schrieb: >> Christian Boulanger schrieb: >> >>> Wouldn't a qx.OO.setProto("qx.core.Object") method be useful, which does >>> the first two lines, in order to save some typing? This method could >>> return qx.OO, so one could write >>> >>> qx.OO.

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Christian Boulanger
Sebastian Werner schrieb: > Christian Boulanger schrieb: > >> Wouldn't a qx.OO.setProto("qx.core.Object") method be useful, which does >> the first two lines, in order to save some typing? This method could >> return qx.OO, so one could write >> >> qx.OO.setProto("qx.core.Object").addProperty

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-25 Thread Sebastian Werner
Christian Boulanger schrieb: > Dietrich Streifert schrieb: >> Try this instead: >> >> >> var constructor = qx.OO.classes["qx.core.Object"]; >> qx.Proto = constructor.prototype; >> qx.OO.addProperty({ name: "myproperty", type: >> qx.constant.Type.STRING, defaultValue: null}); >> > Wouldn't a

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-24 Thread Christian Boulanger
Dietrich Streifert schrieb: > Try this instead: > > > var constructor = qx.OO.classes["qx.core.Object"]; > qx.Proto = constructor.prototype; > qx.OO.addProperty({ name: "myproperty", type: > qx.constant.Type.STRING, defaultValue: null}); > Wouldn't a qx.OO.setProto("qx.core.Object") method b

Re: [qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-21 Thread Dietrich Streifert
Try this instead:   var constructor = qx.OO.classes["qx.core.Object"];   qx.Proto = constructor.prototype;   qx.OO.addProperty({ name: "myproperty", type: qx.constant.Type.STRING, defaultValue: null}); Charles SALMON schrieb: Hello, In qooxdoo 0.5, I was able to add some properties (and

[qooxdoo-devel] How to add a property and function to a class from another js file

2006-09-21 Thread Charles SALMON
Hello,In qooxdoo 0.5, I was able to add some properties (and functions) to QxObject, WITHOUT having to modify the QxObject.js file, by doing:QxObject.addProperty(...)  for propand QxObject.prototype.new_function = function () {...} for function.in my 'qooxdooPatch.js' _javascript_ file.Now, in 0.6