[PyObjC-svn] r2136 - trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Fri Apr 10 01:02:51 2009
New Revision: 2136

Log:
Remove NibClassBuilder usage and test with PyObjC 2.2b1

Modified:
   trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/OpenGLDemo.py
   trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/setup.py
   trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/summary.txt

Modified: trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/OpenGLDemo.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/OpenGLDemo.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/OpenGLDemo.py	Fri Apr 10 01:02:51 2009
@@ -12,19 +12,15 @@
 This example requires PyOpenGL
 """
 
-from PyObjCTools import NibClassBuilder, AppHelper
-from objc import getClassList, objc_object
-from AppKit import *
-from Foundation import *
+from Cocoa import *
 from OpenGL.GL import *
-
-
-NibClassBuilder.extractClasses("OpenGLDemo")
+from PyObjCTools import AppHelper
 
 
 ClearColors = redIndex, greenIndex, blueIndex, alphaIndex = range(4)
 
-class OpenGLDemoView(NibClassBuilder.AutoBaseClass):
+class OpenGLDemoView(NSOpenGLView):
+
     def awakeFromNib(self):
         self.color_index = alphaIndex
 
@@ -44,6 +40,7 @@
         self = super(OpenGLDemoView, self).initWithFrame_pixelFormat_(frame, fmt)
         return self
 
+    @objc.IBAction
     def setClearColor_(self, sender):
         self.color_index = sender.tag()
         self.setNeedsDisplay_(True)

Modified: trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/setup.py	(original)
+++ trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/setup.py	Fri Apr 10 01:02:51 2009
@@ -14,6 +14,7 @@
 
 plist = dict(NSMainNibFile='OpenGLDemo')
 setup(
+    name="OpenGLDemo",
     app=['OpenGLDemo.py'],
     data_files=["OpenGLDemo.nib"],
     options=dict(py2app=dict(plist=plist)),

Modified: trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/summary.txt
==============================================================================
--- trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/summary.txt	(original)
+++ trunk/pyobjc/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/summary.txt	Fri Apr 10 01:02:51 2009
@@ -1 +1,4 @@
 A simple program that shows how to use OpenGL in a Cocoa program. It is a port of Apple's "CocoaGL" example.
+
+The actual OpenGL drawing is done using the PyOpenGL bindings to OpenGL and not using wrappers provided
+by PyObjC.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.