Is it possible to test other columns in the same table with sqlobject
_set_ override? I seem to be getting an error when trying to do so. Is
there some special _SO_ that I need to use to ref the current object
(maybe before creation):
class Foo( SQLObject ):
mode = StringCol( )
m1 = StringCol( default=None )
m2 = StringCol( default=None )
def _set_mode( self, value ):
modes = [ 'mode1', 'mode2' ]
if value not in modes:
raise "Bad Value!"
else:
return self._SO_set_mode( value )
def _set_m1( self, value ):
if value != None and self.mode != 'mode1':
raise "Cannot set m1 when in mode2"
else:
return self._SO_set_m1( value )
def _set_m2( self, value ):
if value != None and self.mode != 'mode2':
raise "Cannot set m2 when in mode1"
else:
return self._SO_set_m2( value )
Is this even possible? It seems like a logical request. Sorry if this
has been asked before.
Thanks in advance,
DigiportBram
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---