RE: [Zope] geting the type of an object from within dtml ??? ==> it works
in an external method, would not this work?: def getclass(self, ob): return type(ob) Then use the getclass fn from DTML: -Original Message- From: NABETH Thierry [mailto:[EMAIL PROTECTED]] Sent: Monday, June 26, 2000 4:11 AM To: '[EMAIL PROTECTED]' Cc: 'ethan mindlace fremen' Subject: RE: [Zope] geting the type of an object from within dtml ??? ==> it works Hello, >> works. Yes, it display the correct meta type. Thanks. When I had done some tests, I forgot to set the meta_type field, and the system was displaying the meta type of the superclass instead. (which had confused me). Note: I am still not very confortable to use the "meta_type" field to get the class name, and would rather have prefered to have the real class itself. (python type function). Thank you again for your help. Thierry Thierry Nabeth Research Fellow INSEAD CALT (the Centre for Advanced Learning Technologies) http://www.insead.fr/CALT/ -Original Message- From: ethan mindlace fremen [mailto:[EMAIL PROTECTED]] Sent: Monday, June 26, 2000 3:43 AM To: Thierry Nabeth Cc: [EMAIL PROTECTED] Subject: Re: [Zope] geting the type of an object from within dtml ??? Thierry Nabeth wrote: > for instance: > > does not return the correct type. works. You can also use things like hope that helps, -- ethan mindlace fremen Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] geting the type of an object from within dtml ??? ==> it works
Title: RE: [Zope] geting the type of an object from within dtml ??? ==> it works Hello, >> works. Yes, it display the correct meta type. Thanks. When I had done some tests, I forgot to set the meta_type field, and the system was displaying the meta type of the superclass instead. (which had confused me). Note: I am still not very confortable to use the "meta_type" field to get the class name, and would rather have prefered to have the real class itself. (python type function). Thank you again for your help. Thierry Thierry Nabeth Research Fellow INSEAD CALT (the Centre for Advanced Learning Technologies) http://www.insead.fr/CALT/ -Original Message- From: ethan mindlace fremen [mailto:[EMAIL PROTECTED]] Sent: Monday, June 26, 2000 3:43 AM To: Thierry Nabeth Cc: [EMAIL PROTECTED] Subject: Re: [Zope] geting the type of an object from within dtml ??? Thierry Nabeth wrote: > for instance: > > does not return the correct type. works. You can also use things like hope that helps, -- ethan mindlace fremen Zopatista Community Liason
Re: [Zope] geting the type of an object from within dtml ???
> I have unsuccessifully been trying to figure out ou to get the type of an > object > from withing html. are you talking about a ZOPE object? remember if you are a DTML Method your 'meta_type' will return the container object (it doenst have its own namespace) you could try > Python is supposed to have a function type(object) that return the type, > but I was not able to find a way to call it. (and I would rather prefere not > to have > to define an external function.). would you please elaborate what are you trying to determine the type of? > My problem seems to have to do with the Zope namespace (which model I > believe is > a real pain in the ass :-). I agree. _[_['blah']] is probably the nastiest thing I've ever seen. and then someone will start adding lambdas to it and it will be all crap to maintain from there... :( eventually the namespace will be explained and documented better, this is mainly a python/ZOPE framework idea that needs to be experienced. I still dont 100% get it. I can usually make things work, but sometimes I just dont quite 'get it'. > > Any suggestion, ideas ? be abit more specific, you using python methods,. external methods, or trying to do this from within DTML? ~runyaga ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] geting the type of an object from within dtml ???
Thierry Nabeth wrote: > for instance: > > does not return the correct type. works. You can also use things like hope that helps, -- ethan mindlace fremen Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] geting the type of an object from within dtml ???
Hello, I have unsuccessifully been trying to figure out ou to get the type of an object from withing html. for instance: does not return the correct type. Python is supposed to have a function type(object) that return the type, but I was not able to find a way to call it. (and I would rather prefere not to have to define an external function.). My problem seems to have to do with the Zope namespace (which model I believe is a real pain in the ass :-). Any suggestion, ideas ? Thanks Thierry Nabeth, INSEAD CALT http://www.insead.fr/CALT/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )