(ZPatterns 0.4.0a1) Getting Customizers to recognize DataSkin descendants descendants
I want to customize (with a Customizer) a class I made. It inherits from DataSkin. However, it's meta_type doesn't show in the Customizer's manage_typesForm page, so I can't tell the Customizer to use this class unless I call manage_setTypes manually (which works.) So how come my class won't show up - DataSkin and RackMountable both show up, and my Product isn't broken - I can add instances of my DataSkin descendant. -- Itamar S.T. itamar@maxnm.com Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C
At 06:50 PM 6/18/00 +0300, Itamar Shtull-Trauring wrote:
I want to customize (with a Customizer) a class I made. It inherits from DataSkin. However, it's meta_type doesn't show in the Customizer's manage_typesForm page, so I can't tell the Customizer to use this class unless I call manage_setTypes manually (which works.)
So how come my class won't show up - DataSkin and RackMountable both show up, and my Product isn't broken - I can add instances of my DataSkin descendant.
If it's a Python class, you need to register it as a ZClass base. Now that you mention it, there really isn't much reason for Customizers to restrict themselves to ZClasses, since all they use the meta_type for is as a string to check on instances. Unfortunately, there's not an easy way with non-ZClasses to get at the underlying class and see if it's a DataSkin. I'd prefer that Customizer didn't "falsely advertise" that it could work with something that wasn't a DataSkin, like a regular folder or something.
participants (2)
-
Itamar Shtull-Trauring -
Phillip J. Eby