Commits

Ronald Oussoren committed a356214

AppKit.NSViewFrameDidChangeNotification had disappeared due to a buglet in
the CodeGenerator scripts.

  • Participants
  • Parent commits 320a9c0

Comments (0)

Files changed (2)

File pyobjc/Lib/AppKit/test/test_constants.py

 import unittest
 import AppKit
+import objc
 
 class ContantTest (unittest.TestCase):
 
     def testNSAnyEventMask(self):
         self.assert_(AppKit.NSAnyEventMask > 0)
 
+    def testNSViewFrameDidChangeNotification(self):
+        self.assert_(hasattr(AppKit, 'NSViewFrameDidChangeNotification'))
+        self.assert_(isinstance(AppKit.NSViewFrameDidChangeNotification, objc.pyobjc_unicode))
+
 if __name__ == "__main__":
     unittest.main()

File pyobjc/Scripts/CodeGenerators/strconst_generator.py

 
 ON_OSX= (sys.platform == "darwin")
 
-MATCH_RE=re.compile(r'NSString\s*\*\s*(const\s+)?([A-Za-z_][A-Za-z0-9_]*(\s*,\s\*\s*[A-Za-z_][A-Za-z0-9_]*)*);')
+MATCH_RE=re.compile(r'NSString\s*\*\s*(const\s+)?([A-Za-z_][A-Za-z0-9_]*(\s*,\s*\*\s*[A-Za-z_][A-Za-z0-9_]*)*);')
 
 def entry(fp, val, ignore):
     vals = val.split(',')
             if ln.strip().startswith('}'):
                 struct_level -= 1
 
-        if ln.strip().startswith('struct '):
+        if ln.strip().startswith('struct ') and ln.strip().endswith('{'):
             struct_level += 1
 
         if struct_level: