On Wed, Feb 22, 2006 at 04:35:34PM -0800, Dan Weeks wrote:
> Is it possible to override the _get_ and _set_ methods in an
> InheritableSQLObject subclasa?
It should be possible, I think.
> class SuperElement(sqlobject.inheritance.InheritableSQLObject):
> handle = sqlobject.StringCol(length=64, varchar=False, notNone=True)
> name = sqlobject.StringCol(length=64, varchar=False, notNone=True)
>
> class SubElement(SuperElement):
> number = sqlobject.StringCol(length=64, varchar=False, notNone=True)
>
> def _get_handle(self):
> return (self.number)
>
> def _set_handle(self, value):
> self.number = value
>
>
> So, it seems it's not possible for me to say "when asking for 'handle' in
> the SubElement give 'number' instead."
What's the problem?
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss