Commits

Just van Rossum  committed f2f669a

stringify 'name' attribute, to ensure we return an NSObject-compatible object to the outline view, thus preventing crashes.

  • Participants
  • Parent commits 15a6500
  • Branches pyobjc-ancient

Comments (0)

Files changed (1)

File Examples/AppKit/PythonBrowser/PythonBrowserModel.py

         return cls.alloc().init()
 
     def __init__(self, name, obj, parent, setvalue):
-        self.name = name
+        self.realName = name
+        self.name = str(name)
         self.parent = parent
         self._setValue = setvalue
         self.type = type(obj).__name__
         self._childRefs = {}
 
     def setValue(self, value):
-        self._setValue(self.parent, self.name, value)
-        self.__init__(self.name, value, self.parent, self._setValue)
+        self._setValue(self.parent, self.realName, value)
+        self.__init__(self.realName, value, self.parent, self._setValue)
 
     def isEditable(self):
         return self._setValue is not None