Jon,

  Here is the correct sytax, I wasn't close (old age, can't remember anything)

qx.Proto = qx.OO.classes["qx.ui.toolbar.ToolBarButton"].prototype;
qx.OO.addProperty({ name : "Discount", type : qx.constant.Type.NUMBER, defaultValue : undefined });


Now you should be set and you should be able to make things work a little better.

Jim





On 8/13/06, Jon Fawcett <[EMAIL PROTECTED]> wrote:
Thanks! I haven't tried your code yet, but this gives me a good place to start and your example seems straight forward.

-Jon

Jim Hunter wrote:
I'm sorry that I am going to be able to assist you, but I may be missing something as I can't get to my work computer to get you definitive code samples. What has happened is addProperty is now only for the current prototype in focus. So if you create a new class with defineClass, then you can add a property to that class but if you want to add a property to a current class then you have to make that classes prototype the one in focus. The first line of my sample might need a bit of changing to get the syntax correct, but the second line is correct:

qx.OO.Proto = qx.ui.toolbar.ToolBarButton.Proto; // or getProto() I'm not remembering this correctly, try both.
qx.OO.addProperty({ name : "Discount", type : qx.constant.Type.NUMBER, defaultValue : undefined });

Hope this helps,
Jim


On 8/12/06, Jon Fawcett < [EMAIL PROTECTED]> wrote:
Hello,

I just built the namespaces version and am updating my code to use it.
However, I'm having a problem with addProperty. Can anyone explain what
I'm doing wrong from the code and error listed below? I've read all the
posts I can find about this and still am stuck. Thanks!

My 0.5.3 code that worked fine was:
QxToolBarButton.addProperty({ name : "Discount", type : "number" });

My new code is:
qx.ui.toolbar.ToolBarButton.addProperty({ name : "Discount", type :
"number" });

and I receive the error:

000515 ERROR: qx.component.InitUiComponent(13): Modification of property "state" failed with exception: TypeError - qx.ui.toolbar.ToolBarButton.addProperty is not a function






-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
qooxdoo-devel mailing list
[email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to