/[gnue]/gnue-appserver/src/classrep/Property.py
ViewVC logotype

Diff of /gnue-appserver/src/classrep/Property.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by reinhard, Sun Oct 19 13:07:14 2003 UTC revision 1.9 by reinhard, Sun Oct 19 22:08:04 2003 UTC
# Line 21  Line 21 
21  #  #
22  # $Id$  # $Id$
23    
24    import types
25  from Base import *  from Base import *
26  from Namespace import *  from Namespace import *
27    
# Line 130  class Property: Line 131  class Property:
131      self._object  = object      self._object  = object
132    
133      # gnue_property.gnue_name is already a fully qualified identifier      # gnue_property.gnue_name is already a fully qualified identifier
134      self.fullName = createName (module.gnue_name, object.gnue_name)      self.fullName = createName (module.gnue_name, self.gnue_name)
135      self.column   = self.fullName      self.column   = self.fullName
136      if self.gnue_type == 'string':      if self.gnue_type == 'string':
137        self.fullType = '%s(%d)' % (self.gnue_type, int (self.gnue_length))        self.fullType = '%s(%d)' % (self.gnue_type, int (self.gnue_length))
# Line 147  class Property: Line 148  class Property:
148    # all unknown attributes are routed to the gnue-namespace    # all unknown attributes are routed to the gnue-namespace
149    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
150    def __getattr__ (self, attr):    def __getattr__ (self, attr):
151      return getattr (self._object, attr)      value = getattr (self._object, attr)
152        if isinstance (value, types.UnicodeType):
153          return value.encode ('utf-8')
154        else:
155          return value

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26