Note that there are some explanatory texts on larger screens.

plurals
  1. POwxPython Mac OS X Fullscreen work around error
    primarykey
    data
    text
    <p>I was trying to get fullscreen support for a wxPython app using the code in the answer from this stackoverflow question <a href="https://stackoverflow.com/questions/12327641/wxpython-macos-x-lion-full-screen-mode">wxPython MacOS X Lion full screen mode</a></p> <p>My Error</p> <pre><code>Traceback (most recent call last): File "test_mac_fullscreen.py", line 36, in &lt;module&gt; frame = Frame() File "test_mac_fullscreen.py", line 29, in __init__ SetFullScreenCapable(self) File "test_mac_fullscreen.py", line 16, in SetFullScreenCapable window = frameobj.window() AttributeError: 'NSHIObject' object has no attribute 'window' </code></pre> <p>My Code (just copied and pasted into one file from the above link)</p> <pre><code># from https://stackoverflow.com/questions/12328143/getting-pyobjc-object-from-integer-id import ctypes, objc _objc = ctypes.PyDLL(objc._objc.__file__) # PyObject *PyObjCObject_New(id objc_object, int flags, int retain) _objc.PyObjCObject_New.restype = ctypes.py_object _objc.PyObjCObject_New.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int] def objc_object(id): return _objc.PyObjCObject_New(id, 0, 1) def SetFullScreenCapable(frame): frameobj = objc_object(frame.GetHandle()) NSWindowCollectionBehaviorFullScreenPrimary = 1&lt;&lt;7 window = frameobj.window() newBehavior = window.collectionBehavior() | NSWindowCollectionBehaviorFullScreenPrimary window.setCollectionBehavior_(newBehavior) import wxversion wxversion.select('2-osx_cocoa') # require Cocoa version of wxWidgets import wx class Frame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None) self.Bind(wx.EVT_CLOSE, self.OnClose) wx.Button(self, label="Hello!") # test button to demonstrate full-screen resizing SetFullScreenCapable(self) def OnClose(self, event): print "Closing" exit() if __name__ == "__main__": app = wx.App(False) frame = Frame() frame.Show() app.MainLoop() print "running app loop" </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload