Hello, I quess you are looking for something like a classname attribute? If thats what you are looking for, qooxdoo has attached its classname to every object. You can access it via <>.classname. That should do the job.
If you want assert an exception, take a look at the assertException method you could use. http://demo.qooxdoo.org/current/apiviewer/#qx.core.Assert~assertException Regards, Martin flj wrote: > > Hi, me, the bloody beginner, again. > > I'm happily writing unit tests, now that my qooxdoo installation works. > > I have a unit test where I expect an exception, and I want to check that > its type is the proper one. If not, I'd log the type name of the received > exception. But qooxdoo has no methods/props, as far as I can see, which > return this. > > Now, either I'm stupid again and don't know here to look in the > documentation, or this is indeed a missing feature of qooxdoo. > > I agree, this would be only a little part of it, but IMO it should be easy > to add an entire reflection/introspection mechanism, providing a way to > interrogate all interfaces, mixins, method signatures etc. of a qooxdoo > object's class. > > Now, my question: am I stupid, and there _is_ such a feature in the > framework? Is there an intention to implement something like this > > For now, I use what I found at > http://magnetiq.com/2006/07/10/finding-out-class-names-of-javascript-objects/, > but IMO some reflection API added to the Object class would be a nice and > easy to add enhancement. > > Why do I think it would be easy to add: qooxdoo already has its own > constructors for classes, mixins and interfaces. So as far as I can judge, > without having looked at the code, all there is to be done is to append > some properties to object, where these constructors can append the > classes, mixins and interfaces they add to an object. Since these > constructors construct and append properties and methods one by one to an > object, it shouldn't be so hard to append them to a methods registry as > well, containing references to the classes/mixin/interfaces registries of > each object, so that a class/mixin/interface retrieved from an object can > be queried about its methods and properties too. > > br, > > -- > Florin Jurcovici > ----------------- > If you fear obesity, drink 100 ml of cognac before each meal - cognac will > take your fear away ... > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > -- View this message in context: http://n2.nabble.com/Beginner-s-request-tp3596098p3596147.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
