From guess-who@kevin-masako.com Mon Nov 05 21:48:13 2001 Received: (qmail 123 invoked by alias); Tue, 06 Nov 2001 05:48:13 -0000 Received: from [24.254.60.35] (helo=femail41.sdc1.sfba.home.com) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 160z5o-0000qg-00 for ; Mon, 05 Nov 2001 21:48:13 -0800 Received: from cj622768a ([24.37.124.9]) by femail41.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20011106054807.ONBB3383.femail41.sdc1.sfba.home.com@cj622768a> for ; Mon, 5 Nov 2001 21:48:07 -0800 Message-ID: <004301c16686$9c3ed9a0$0100a8c0@cj622768a> From: "Kevin & Masako Ollivier" To: MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-Mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 Subject: [wxPython-mac] wxFrame.Show(true) doesn't show window? Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Mon Nov 5 21:49:02 2001 X-Original-Date: Tue, 6 Nov 2001 00:48:06 -0500 Hi all, Thought I'd go ahead and start the posting to this group. =) I'm still stuck on the problem with windows (specifically wxFrame) not appearing even after the Show method is called. Here is the information I have been able to gather about the problem so far: 1. wxFrame.Show(true) is the code which is 'mis-behaving'. I've stripped code down and used the simplest examples, ones which simply create a frame, show it, and that's it. 2. An exception is not occurring. Code execution runs fine even after the problem and enters the main loop. In fact, wxFrame.IsShown() returns true! 3. wxFrames appear without a problem in wxMac. Here are my questions: 1. Is there any "middle layer" code that is run between the wxFrame.Show(true) call in Python and the subsequent call in wxMac? I've been trying to follow all the super/sub-classing and I'm getting a bit dizzy. ^_^; I've looked over wxWindow_Show in the SWIG source and it looks identical to other implementations, i.e. Windows and I couldn't find any place where there wxPython runs extra code for Show, but I certainly could be missing something. 2. Is there a way to get more information on what wxMac and wxPython are doing from the command line? Could there be a "silent" error happening? 3. Any insights? Maybe Pythons don't like Aqua? =) Thanks, Kevin From kevino@tulane.edu Thu Nov 08 15:43:28 2001 Received: (qmail 123 invoked by alias); Thu, 08 Nov 2001 23:43:28 -0000 Received: from [129.81.224.6] (helo=tulane.edu) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 161ypU-0001hX-00; Thu, 08 Nov 2001 15:43:28 -0800 Received: from kevinnew ([205.208.130.218]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id fA8NhQc07917; Thu, 8 Nov 2001 17:43:26 -0600 (CST) Message-ID: <00ec01c168b0$51ecf0e0$2101a8c0@kevinnew> From: "Kevin Ollivier" To: Cc: , "Wx-Users" , , References: <20011105100056.DB508303181@snelboot.oratrix.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Subject: [wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Thu Nov 8 15:44:08 2001 X-Original-Date: Thu, 8 Nov 2001 18:51:42 -0500 > This is a nasty Mac OS X 10.1 bug (or a Python bug triggered by 10.1). I fixed > it in the sourceforge CVS repository, so try building from CVS and the problem > should be gone. Sorry for the late response! I built from CVS just fine, but the problem persists. I think it may be an issue with the wxWindows shared library though - not Python. I can start up two copies of the Python interactive terminal just fine. It is only when I try to run a wxPython script in two terminals that I get the bus error. I haven't done extensive testing, but this is what I have found so far. Is there any way to track down what "Bus error" means exactly? =) Thanks, Kevin From jack@oratrix.nl Fri Nov 09 01:20:24 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 09:20:24 -0000 Received: from [212.203.14.1] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 1627po-0002JG-00; Fri, 09 Nov 2001 01:20:24 -0800 Received: from snelboot.oratrix.nl (snelboot.oratrix.nl [212.203.14.60]) by oratrix.oratrix.nl (Postfix) with ESMTP id 8435911E4A1; Fri, 9 Nov 2001 10:20:21 +0100 (MET) Received: from snelboot.oratrix.nl (localhost [127.0.0.1]) by snelboot.oratrix.nl (Postfix) with ESMTP id 6F4EF303181; Fri, 9 Nov 2001 10:20:15 +0100 (MET) X-Mailer: exmh version 2.1.0 04/14/1999 To: wxpython-mac@lists.wxwindows.org Cc: wxpython-users@lists.wxwindows.org, "Wx-Users" , pythonmac-sig@python.org Subject: Re: [wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1 In-Reply-To: Message by "Kevin Ollivier" , <00ec01c168b0$51ecf0e0$2101a8c0@kevinnew> Organisation: Oratrix Development, Valeriusplein 30, 1075 BJ Amsterdam, NL Phone: +31 20 6795452(work), +31 20 6795309 (fax), +31 20 6160335(home) X-Last-Band-Seen: Sex Bomb Nagasaki, Blakes 7, Uit de Sloot (Parkhof, 28-10) X-Mini-Review: Quiet... Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: Jack Jansen Message-Id: <20011109092015.6F4EF303181@snelboot.oratrix.nl> Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 01:21:08 2001 X-Original-Date: Fri, 09 Nov 2001 10:20:14 +0100 > Sorry for the late response! I built from CVS just fine, but the problem > persists. I think it may be an issue with the wxWindows shared library > though - not Python. I can start up two copies of the Python interactive > terminal just fine. It is only when I try to run a wxPython script in two > terminals that I get the bus error. I haven't done extensive testing, but > this is what I have found so far. Is there any way to track down what "Bus > error" means exactly? =) Then this may be another example of the bug I ran into, but then again it may be something completely different. I'll explain my findings, this may help you along. As of 10.1 Mac OS X is a lot more critical about using Carbon in non-.app programs. Apparently this was already officially illegal in 10.0, but only since 10.1 are there real problems. One thing you cannot do is include window-related portions of Carbon.framework (such as WindowMgr or DialogMgr calls) if no window manager is available (ssh connection as another user than the person logged in on the desktop, OS X Server, >console style login). You will immedeately get kCGErrorIllegalArgument : CGSNewConnection cannot get connection port kCGErrorIllegalArgument : CGSNewConnection cannot get connection port kCGErrorInvalidConnection : CGSGetEventPort: Invalid connection and then a crash. Even if you do have a window manager it seems calling using Carbon from a non-.app program is dangerous. If you call the program once from a terminal window everything seems fine. Except of course that a non-.app program can open windows, but it can't interact with them, show up in the toolbar, etc (you were aware of this, by the way, that you must be a .app style bundle to interact with the user?). But: if you call that same program a second time from a different window you will probably get a coredump. Trying to debug this is difficult (when either copy is run under gdb everything works fine!), but by tracing library loading it seems that the crash is in the initialization of the HIToolbox portion of Carbon. The conclusion of all this is that it seems unsafe to link anything that could be run from the commandline against Carbon. If this appears to be the problem with wxWindows too the solution is simple: use a .app. If you're hosting this in Python already (I think you are, right?) then build the Python.app according to the instructions in Mac/OSX/README in the python disitrbuiton. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From robin@alldunn.com Fri Nov 09 11:15:45 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 19:15:45 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162H7x-0004hF-00; Fri, 09 Nov 2001 11:15:45 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Fri, 9 Nov 2001 11:15:45 -0800 Message-ID: <03f801c16952$eec70660$0100a8c0@Rogue> From: "Robin Dunn" To: Cc: "wxPython-users" , "Wx-Dev" References: <20011109092015.6F4EF303181@snelboot.oratrix.nl> X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400 Subject: [wxPython-mac] wxPython on Mac Screenshot!!! Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 11:16:01 2001 X-Original-Date: Fri, 9 Nov 2001 11:15:43 -0800 Thanks Jack, that was the magic I was hunting for. It's still VERY flakey but at least I am seeing the windows now... Here's a screenshot of the wxPython demo running on Max OS X: http://alldunn.com/wxPython/stuff/wxMacPython-Demo.jpg -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! ----- Original Message ----- From: "Jack Jansen" To: Cc: ; "Wx-Users" ; Sent: Friday, November 09, 2001 1:20 AM Subject: Re: [wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1 > > > Sorry for the late response! I built from CVS just fine, but the problem > > persists. I think it may be an issue with the wxWindows shared library > > though - not Python. I can start up two copies of the Python interactive > > terminal just fine. It is only when I try to run a wxPython script in two > > terminals that I get the bus error. I haven't done extensive testing, but > > this is what I have found so far. Is there any way to track down what "Bus > > error" means exactly? =) > > Then this may be another example of the bug I ran into, but then again it may > be something completely different. I'll explain my findings, this may help you > along. > > As of 10.1 Mac OS X is a lot more critical about using Carbon in non-.app > programs. Apparently this was already officially illegal in 10.0, but only > since 10.1 are there real problems. One thing you cannot do is include > window-related portions of Carbon.framework (such as WindowMgr or DialogMgr > calls) if no window manager is available (ssh connection as another user than > the person logged in on the desktop, OS X Server, >console style login). You > will immedeately get > kCGErrorIllegalArgument : CGSNewConnection cannot get connection port > kCGErrorIllegalArgument : CGSNewConnection cannot get connection port > kCGErrorInvalidConnection : CGSGetEventPort: Invalid connection > and then a crash. > > Even if you do have a window manager it seems calling using Carbon from a > non-.app program is dangerous. If you call the program once from a terminal > window everything seems fine. Except of course that a non-.app program can > open windows, but it can't interact with them, show up in the toolbar, etc > (you were aware of this, by the way, that you must be a .app style bundle to > interact with the user?). > > But: if you call that same program a second time from a different window you > will probably get a coredump. Trying to debug this is difficult (when either > copy is run under gdb everything works fine!), but by tracing library loading > it seems that the crash is in the initialization of the HIToolbox portion of > Carbon. > > The conclusion of all this is that it seems unsafe to link anything that could > be run from the commandline against Carbon. If this appears to be the problem > with wxWindows too the solution is simple: use a .app. If you're hosting this > in Python already (I think you are, right?) then build the Python.app > according to the instructions in Mac/OSX/README in the python disitrbuiton. > -- > Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ > Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ > www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm > > > > _______________________________________________ > wxPython-mac mailing list > wxPython-mac@lists.wxwindows.org > http://lists.wxwindows.org/mailman/listinfo/wxpython-mac > From ntiffin@earthlink.net Fri Nov 09 11:25:41 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 19:25:41 -0000 Received: from [207.217.120.50] (helo=avocet.prod.itd.earthlink.net) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162HHZ-0004uP-00; Fri, 09 Nov 2001 11:25:41 -0800 Received: from dialup-209.244.142.218.dial1.providence1.level3.net ([209.244.142.218]) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 162HHX-00027P-00; Fri, 09 Nov 2001 11:25:40 -0800 Mime-Version: 1.0 X-Sender: ntiffin@pop.earthlink.net Message-Id: In-Reply-To: <03f801c16952$eec70660$0100a8c0@Rogue> References: <20011109092015.6F4EF303181@snelboot.oratrix.nl> <03f801c16952$eec70660$0100a8c0@Rogue> To: wxpython-mac@lists.wxwindows.org From: Neil Tiffin Subject: Re: [wxPython-mac] wxPython on Mac Screenshot!!! Cc: "wxPython-users" , "Wx-Dev" Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 11:26:02 2001 X-Original-Date: Fri, 9 Nov 2001 13:23:11 -0600 At 11:15 AM -0800 11/9/01, Robin Dunn wrote: >Thanks Jack, that was the magic I was hunting for. It's still VERY flakey >but at least I am seeing the windows now... > >Here's a screenshot of the wxPython demo running on Max OS X: >http://alldunn.com/wxPython/stuff/wxMacPython-Demo.jpg That is excellent! Keep up the good work. I can hardly wait. This is the only thing holding up GNU Enterprise on the Mac (well at least until we start the debug process) :) -- Neil neilt@gnue.org GNU Enterprise http://www.gnuenterprise.org/ http://www.gnuenterprise.org/~neilt/sc.html From jack@oratrix.nl Fri Nov 09 13:14:30 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 21:14:29 -0000 Received: from [212.203.14.1] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162Iyr-00086I-00; Fri, 09 Nov 2001 13:14:29 -0800 Received: by oratrix.oratrix.nl (Postfix, from userid 201) id 6130A1162D7; Fri, 9 Nov 2001 22:13:56 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by oratrix.oratrix.nl (Postfix) with ESMTP id 5745A19BEB5B; Fri, 9 Nov 2001 22:13:56 +0100 (MET) To: wxpython-mac@lists.wxwindows.org Cc: "wxPython-users" , "Wx-Dev" Subject: Re: [wxPython-mac] wxPython on Mac Screenshot!!! In-Reply-To: Message by "Robin Dunn" , <03f801c16952$eec70660$0100a8c0@Rogue> Organisation: Oratrix Development, Valeriusplein 30, 1075 BJ Amsterdam, NL Phone: +31 20 6795452(work), +31 20 6795309 (fax), +31 20 6160335(home) X-Last-Band-Seen: Sex Bomb Nagasaki, Blakes 7, Uit de Sloot (Parkhof, 28-10) X-Mini-Review: Quiet... From: Jack Jansen Message-Id: <20011109211356.6130A1162D7@oratrix.oratrix.nl> Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 13:15:09 2001 X-Original-Date: Fri, 09 Nov 2001 22:13:51 +0100 Recently, "Robin Dunn" said: > Thanks Jack, that was the magic I was hunting for. It's still VERY flakey > but at least I am seeing the windows now... Congratulations!! Sorry that I didn't realise that this was your problem from previous messages, really silly from me, as I suffered pretty similar behaviour when I first got EasyDialogs.py running in MachoPython... Oh, and a quick bit of advice, triggered by the screenshot: if you're thinking of replacing the tree widget with one based on the Data Browser (which should probably be done eventually): I've stayed away from it for the time being, as it is the one control that everyone is continually whining about on Carbon-dev. It is apparently not in a very stable state yet... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From pobrien@orbtech.com Fri Nov 09 13:26:09 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 21:26:09 -0000 Received: from [207.158.192.60] (helo=mail01h.rapidsite.net) by first.cirl.uoregon.edu with smtp (Exim 3.32 #1 (Debian)) id 162JA9-0000Yi-00 for ; Fri, 09 Nov 2001 13:26:09 -0800 Received: from www.orbtech.com (209.41.3.197) by mail01h.rapidsite.net (RS ver 1.0.62s) with SMTP id 023476; Fri, 9 Nov 2001 16:25:52 -0500 (EST) From: "Patrick K. O'Brien" To: , Cc: "Wx-Dev" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <03f801c16952$eec70660$0100a8c0@Rogue> X-Mimeole: Produced By Microsoft MimeOLE V5.50.4807.1700 Importance: Normal X-Loop-Detect: 1 Subject: [wxPython-mac] RE: [wxPython] wxPython on Mac Screenshot!!! Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org X-Reply-To: List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 13:27:15 2001 X-Original-Date: Fri, 9 Nov 2001 15:29:20 -0600 I gotta ask - how well does PyCrust hold up on the Mac? --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: wxpython-users-admin@lists.wxwindows.org [mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of Robin Dunn Sent: Friday, November 09, 2001 1:16 PM To: wxpython-mac@lists.wxwindows.org Cc: wxPython-users; Wx-Dev Subject: [wxPython] wxPython on Mac Screenshot!!! Thanks Jack, that was the magic I was hunting for. It's still VERY flakey but at least I am seeing the windows now... Here's a screenshot of the wxPython demo running on Max OS X: http://alldunn.com/wxPython/stuff/wxMacPython-Demo.jpg -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! ----- Original Message ----- From: "Jack Jansen" To: Cc: ; "Wx-Users" ; Sent: Friday, November 09, 2001 1:20 AM Subject: Re: [wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1 > > > Sorry for the late response! I built from CVS just fine, but the problem > > persists. I think it may be an issue with the wxWindows shared library > > though - not Python. I can start up two copies of the Python interactive > > terminal just fine. It is only when I try to run a wxPython script in two > > terminals that I get the bus error. I haven't done extensive testing, but > > this is what I have found so far. Is there any way to track down what "Bus > > error" means exactly? =) > > Then this may be another example of the bug I ran into, but then again it may > be something completely different. I'll explain my findings, this may help you > along. > > As of 10.1 Mac OS X is a lot more critical about using Carbon in non-.app > programs. Apparently this was already officially illegal in 10.0, but only > since 10.1 are there real problems. One thing you cannot do is include > window-related portions of Carbon.framework (such as WindowMgr or DialogMgr > calls) if no window manager is available (ssh connection as another user than > the person logged in on the desktop, OS X Server, >console style login). You > will immedeately get > kCGErrorIllegalArgument : CGSNewConnection cannot get connection port > kCGErrorIllegalArgument : CGSNewConnection cannot get connection port > kCGErrorInvalidConnection : CGSGetEventPort: Invalid connection > and then a crash. > > Even if you do have a window manager it seems calling using Carbon from a > non-.app program is dangerous. If you call the program once from a terminal > window everything seems fine. Except of course that a non-.app program can > open windows, but it can't interact with them, show up in the toolbar, etc > (you were aware of this, by the way, that you must be a .app style bundle to > interact with the user?). > > But: if you call that same program a second time from a different window you > will probably get a coredump. Trying to debug this is difficult (when either > copy is run under gdb everything works fine!), but by tracing library loading > it seems that the crash is in the initialization of the HIToolbox portion of > Carbon. > > The conclusion of all this is that it seems unsafe to link anything that could > be run from the commandline against Carbon. If this appears to be the problem > with wxWindows too the solution is simple: use a .app. If you're hosting this > in Python already (I think you are, right?) then build the Python.app > according to the instructions in Mac/OSX/README in the python disitrbuiton. > -- > Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ > Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ > www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm > > > > _______________________________________________ > wxPython-mac mailing list > wxPython-mac@lists.wxwindows.org > http://lists.wxwindows.org/mailman/listinfo/wxpython-mac > _______________________________________________ wxpython-users mailing list wxpython-users@lists.wxwindows.org http://lists.wxwindows.org/mailman/listinfo/wxpython-users From robin@alldunn.com Fri Nov 09 13:33:52 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 21:33:52 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162JHc-0000rd-00; Fri, 09 Nov 2001 13:33:52 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Fri, 9 Nov 2001 13:33:51 -0800 Message-ID: <04f301c16966$39afd590$0100a8c0@Rogue> From: "Robin Dunn" To: Cc: "Wx-Dev" References: <20011109211356.6130A1162D7@oratrix.oratrix.nl> Subject: Re: [wxPython-mac] wxPython on Mac Screenshot!!! X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 13:34:01 2001 X-Original-Date: Fri, 9 Nov 2001 13:33:50 -0800 > > Recently, "Robin Dunn" said: > > Thanks Jack, that was the magic I was hunting for. It's still VERY flakey > > but at least I am seeing the windows now... > > Congratulations!! > > Sorry that I didn't realise that this was your problem from previous > messages, really silly from me, as I suffered pretty similar behaviour Any other magic stuff that a OS X neophyte should know? > Oh, and a quick bit of advice, triggered by the screenshot: if you're > thinking of replacing the tree widget with one based on the Data > Browser (which should probably be done eventually): I've stayed away > from it for the time being, as it is the one control that everyone is > continually whining about on Carbon-dev. It is apparently not in a > very stable state yet... That's up to Stefan and others who are working on wxMac itself. Looks like it is currently using the generic tree that is also used by wxGTK and other ports (except wxMSW.) -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From robin@alldunn.com Fri Nov 09 14:21:43 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 22:21:43 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162K1v-0002FQ-00; Fri, 09 Nov 2001 14:21:43 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Fri, 9 Nov 2001 14:21:39 -0800 Message-ID: <050b01c1696c$e6b23e30$0100a8c0@Rogue> From: "Robin Dunn" To: , Cc: "Wx-Dev" References: Subject: Re: [wxPython-mac] RE: [wxPython] wxPython on Mac Screenshot!!! X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 14:22:02 2001 X-Original-Date: Fri, 9 Nov 2001 14:21:36 -0800 > I gotta ask - how well does PyCrust hold up on the Mac? > Don't know yet. I couldn't get that far in the main demo so I am working on some small simple samples now so I can more easily see what's working and figure out what's not. -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From kevino@tulane.edu Fri Nov 09 14:28:56 2001 Received: (qmail 123 invoked by alias); Fri, 09 Nov 2001 22:28:56 -0000 Received: from [129.81.224.6] (helo=tulane.edu) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162K8u-0002eE-00; Fri, 09 Nov 2001 14:28:56 -0800 Received: from kevinnew ([205.208.130.218]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id fA9MSsc24216; Fri, 9 Nov 2001 16:28:54 -0600 (CST) Message-ID: <008301c1696f$154033e0$2101a8c0@kevinnew> From: "Kevin Ollivier" To: , Cc: , "Wx-Users" , References: <20011109092015.6F4EF303181@snelboot.oratrix.nl> Subject: Re: [wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 14:29:08 2001 X-Original-Date: Fri, 9 Nov 2001 17:37:14 -0500 <> > The conclusion of all this is that it seems unsafe to link anything that could > be run from the commandline against Carbon. If this appears to be the problem > with wxWindows too the solution is simple: use a .app. If you're hosting this > in Python already (I think you are, right?) then build the Python.app > according to the instructions in Mac/OSX/README in the python disitrbuiton. Thanks for your detailed response!! It was very informative, and as you already know, this was *exactly* the problem. Like Robin said, it is still somewhat flaky but at least now we can see that it is flaky. =) And of course, if we can actually see what the bugs are its easier to trace down and fix the problem. =) One error I thought I'd throw out to you and the groups. Messages like the ones below pop up from time to time in the console when running wxPython apps: -------------------------------------------------- Nov 9 10:25:54 localhost /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder: kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map visRegion shmem Nov 9 10:25:54 localhost /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder: kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map shapeRegion shmem Nov 9 10:25:54 localhost /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder: kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map shapeRegion shmem ---------------------------------------------------- I haven't yet figured out how to reproduce them (it seems to be behaving at the moment), but my suspicion (since it's the finder throwing errors) is that this has something to do with the top menubar and it being 'registered' as an app. Python does not list its name in the top menubar, even when running a wxPython script, and also the menubars for the wxPython app do not appear. (Menubars do appear for compiled wxMac applications.) The error messages (kCGErrorFailure) looked familiar to the ones that occurred with command line Python, and I thought this may be related to Python.app itself so I thought I would see if this meant anything to anyone. It also will only run one copy of Python at a time - it "beeps" if you try to run another Python script. Any thoughts? Is there a place where code specifying Python's "behavior" as an app are specified, or are the limitations due to the fact that it is a CLI app? I don't yet know too much about building app bundles on OS X, but it looks like it would be good to learn, so I'll probably do some more poking around on the subject in the next week or so. Too bad I don't have a Mac at home, although since I have school work that is probably a VERY bad idea. ^_^; (One I will no doubt indulge myself in sometime soon though...!) Thanks again to you, Robin and everyone else for all your help!! It feels *really* good to get over this hurdle! =) Still more to get through, but this is one big step closer to making wxPython on Mac a reality! Kevin From robin@alldunn.com Fri Nov 09 16:29:49 2001 Received: (qmail 123 invoked by alias); Sat, 10 Nov 2001 00:29:47 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162M1r-0006iN-00 for ; Fri, 09 Nov 2001 16:29:47 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Fri, 9 Nov 2001 16:29:47 -0800 Message-ID: <05e301c1697e$cd0e8080$0100a8c0@Rogue> From: "Robin Dunn" To: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400 Subject: [wxPython-mac] wxPython-Mac issues Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Nov 9 16:30:02 2001 X-Original-Date: Fri, 9 Nov 2001 16:29:45 -0800 [I've trimmed down to just this mail list since I am tired of getting four copies of everything. (I know, a simple procmail filter would fix it...}] I've just checked in a few things to CVS, a starting set of build instructions, a simple demo to play with (copied below,) and regenereated SWIG code where it was needed. The issues I'm seeing at the moment are: 1. As Kevin mentioned although menus are created (seemingly successfuly) in the souce nothing at all shows up on the menubar. 2. Also from Kevin, multiple instances of Python running wxPython code can not be launched (even if they are separate .py files) 3. The app's wxFrame can not be moved or resized. 4. Sometimes the contents of a window are not seen until another app is selected and then the wxPython app is selected again. I think I saw this in one of the wxWindows samples as well. Any ideas? from wxPython.wx import * class MyFrame(wxFrame): def __init__(self, parent, title): wxFrame.__init__(self, parent, -1, title, size=(350, 200)) menuBar = wxMenuBar() menu = wxMenu() menu.Append(101, "E&xit\tAlt-X", "Exit demo") EVT_MENU(self, 101, self.OnButton) menuBar.Append(menu, "&File") self.SetMenuBar(menuBar) panel = wxPanel(self, -1) text = wxStaticText(panel, -1, "Hello World!\nWhere is my menu?") text.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD)) text.SetSize(text.GetBestSize()) btn = wxButton(panel, -1, "Close") btn.SetDefault() sizer = wxBoxSizer(wxVERTICAL) sizer.Add(text, 0, wxALL, 10) sizer.Add(btn, 0, wxALL, 10) panel.SetSizer(sizer) panel.SetAutoLayout(true) panel.Layout() EVT_BUTTON(self, btn.GetId(), self.OnButton) def OnButton(self, evt): self.Close() app = wxPySimpleApp() frame = MyFrame(None, "Simple wxPython App") frame.Show(true) app.MainLoop() -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From jack@oratrix.nl Sat Nov 10 15:45:59 2001 Received: (qmail 123 invoked by alias); Sat, 10 Nov 2001 23:45:59 -0000 Received: from [212.203.14.1] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.32 #1 (Debian)) id 162hp1-0007Pc-00; Sat, 10 Nov 2001 15:45:59 -0800 Received: by oratrix.oratrix.nl (Postfix, from userid 201) id CA27C1162D7; Sun, 11 Nov 2001 00:45:56 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by oratrix.oratrix.nl (Postfix) with ESMTP id B782119BEB5B; Sun, 11 Nov 2001 00:45:56 +0100 (MET) To: wxpython-mac@lists.wxwindows.org Cc: wx-users@lists.wxwindows.org, wxpython-users@lists.wxwindows.org, pythonmac-sig@python.org Subject: Re: [wxPython-mac] Re: [Pythonmac-SIG] Re: [wxPython] Compiling wxPython on OS X 10.1 In-Reply-To: Message by "Kevin Ollivier" , <008301c1696f$154033e0$2101a8c0@kevinnew> Organisation: Oratrix Development, Valeriusplein 30, 1075 BJ Amsterdam, NL Phone: +31 20 6795452(work), +31 20 6795309 (fax), +31 20 6160335(home) X-Last-Band-Seen: Sex Bomb Nagasaki, Blakes 7, Uit de Sloot (Parkhof, 28-10) X-Mini-Review: Quiet... From: Jack Jansen Message-Id: <20011110234556.CA27C1162D7@oratrix.oratrix.nl> Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Sat Nov 10 15:46:08 2001 X-Original-Date: Sun, 11 Nov 2001 00:45:51 +0100 Recently, "Kevin Ollivier" said: > -------------------------------------------------- > Nov 9 10:25:54 localhost > /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder: > kCGErrorFailure : _CGSLockAndUpdateWindow: cannot map visRegion shmem > > I haven't yet figured out how to reproduce them (it seems to be behaving at > the moment), but my suspicion (since it's the finder throwing errors) is > that this has something to do with the top menubar and it being 'registered' > as an app. Python does not list its name in the top menubar, even when > running a wxPython script, and also the menubars for the wxPython app do not > appear. (Menubars do appear for compiled wxMac applications.) Interesting. This probably has to do with Python.app not going through the correct initialization sequence. The main program of Python.app is simply the main program for MacPython with everything that didn't work imedeately #ifdeffed out. If someone could look at the code (Mac/Python/macmain.c) and the releant Apple documentation and tell me what to do that would be great. For one, MacPython doesn't initialize the menubar because that is (a) delayed and (b) handled by SIOUX when it's needed. So we probably need some stuff for that, but there may be more missing. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From kevino@tulane.edu Mon Dec 31 18:07:22 2001 Received: (qmail 123 invoked by alias); Tue, 01 Jan 2002 02:07:21 -0000 Received: from [129.81.255.237] (helo=trend3.tcs.tulane.edu ident=root) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16LEKn-0007kH-00; Mon, 31 Dec 2001 18:07:21 -0800 Received: from trend3.tcs.tulane.edu (IDENT:root@localhost [127.0.0.1]) by trend3.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0127Kx25414; Mon, 31 Dec 2001 20:07:20 -0600 Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend3.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0127KB25407; Mon, 31 Dec 2001 20:07:20 -0600 Received: from cj622768a (cj622768-a.alngtn1.va.home.com [24.37.124.9]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0127J115568; Mon, 31 Dec 2001 20:07:19 -0600 (CST) Message-ID: <00ee01c19269$17e17f00$6401a8c0@cj622768a> From: "Kevin Ollivier" To: Cc: References: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Subject: [wxPython-mac] Re: [wxPython] wxPython for Mac Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Mon Dec 31 18:08:03 2001 X-Original-Date: Mon, 31 Dec 2001 21:07:00 -0500 Well, I think the best way of describing it is "a work in progress". =) We're focusing on OS X because it's UNIX roots makes the porting easier. We've managed to get some tests running (thanks to Robin and Jack!!), but menus are still not appearing and there are also a number of little glitches left to work out, so we may have a ways to go. I think I know what is wrong with the menus (they need Carbonized for OS X) and am going to take a shot at fixing it over the next few days. (Got sidetracked with exams and haven't had time to work on it.) If I'm successful I'll post a note to this list and the wxPython-Mac list (wxpython-mac@lists.wxwindows.org). You can see a screenshot of a working example at: http://alldunn.com/wxPython/stuff/wxMacPython-Demo.jpg Yup, it's fully 'Aquafied'! Gives you a taste of what's to come! =) Hope this answers your questions! Kevin Ollivier ----- Original Message ----- From: "Samuel Smith" To: Sent: Friday, December 28, 2001 12:07 PM Subject: [wxPython] wxPython for Mac > Hello, > > I am new to this list, can anyone tell me what is the status of > wxPython for the Mac? > > Thanks > -- > ********************************************** > > Samuel M. Smith Ph.D. > > 360 W. 920 N. > Orem, Utah 84057 > > 801-226-7607 x112 (voice) > 801-226-7608 (fax) > http://www.samuelsmith.org (web) > > ********************************************* > > _______________________________________________ > wxpython-users mailing list > wxpython-users@lists.wxwindows.org > http://lists.wxwindows.org/mailman/listinfo/wxpython-users > From guess-who@kevin-masako.com Sun Jan 06 13:22:06 2002 Received: (qmail 123 invoked by alias); Sun, 06 Jan 2002 21:22:05 -0000 Received: from [24.254.60.36] (helo=femail42.sdc1.sfba.home.com) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16NKk1-00028h-00; Sun, 06 Jan 2002 13:22:05 -0800 Received: from cj622768a ([24.37.124.9]) by femail42.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20020106212204.XZEQ25043.femail42.sdc1.sfba.home.com@cj622768a>; Sun, 6 Jan 2002 13:22:04 -0800 Message-ID: <054801c196f8$348f8000$6401a8c0@cj622768a> From: "Kevin & Masako Ollivier" To: , , MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Subject: [wxPython-mac] Menus for wxPythonMac Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Sun Jan 6 13:23:13 2002 X-Original-Date: Sun, 6 Jan 2002 16:22:10 -0500 Sorry for the cross-posting, but I thought I'd cover all my bases! =) I'll briefly explain where I'm at. I'm using the Carbon version of Python 2.2, along with wxWindows and wxPython on OS X 10.1.2. I've pulled all the sources from CVS. Everything compiles, and so far I've been able to run wxPython scripts with a limited degree of success. However, the major problem is that I'm still having troubles with the menus. When I load a wxPython script in Python, Python's menubars stay active and the menus created by the script are nowhere to be found. Has anyone else experienced this? Also, when I run the script it does not open as a separate application in OS X. All windows are listed as child windows of the Python application. I'm wondering if these two issues are related. wxPython may not be able to modify Python's menus, and since it does not have its own application, it has no way of showing its own menus. Does this make sense? I admit I'm pretty new to Mac programming, and as such I'm a bit stuck as to what can be done about this problem. Any help would be appreciated! Thanks, Kevin From robin@alldunn.com Sun Jan 06 16:43:27 2002 Received: (qmail 123 invoked by alias); Mon, 07 Jan 2002 00:43:26 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16NNss-0004gb-00; Sun, 06 Jan 2002 16:43:26 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Sun, 6 Jan 2002 16:43:24 -0800 Message-ID: <021001c19714$50414740$0214a8c0@Rogue> From: "Robin Dunn" To: , , References: <054801c196f8$348f8000$6401a8c0@cj622768a> Subject: Re: [wxPython-mac] Menus for wxPythonMac X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Sun Jan 6 16:44:05 2002 X-Original-Date: Sun, 6 Jan 2002 16:43:05 -0800 > Sorry for the cross-posting, but I thought I'd cover all my bases! =) > > I'll briefly explain where I'm at. I'm using the Carbon version of Python > 2.2, along with wxWindows and wxPython on OS X 10.1.2. I've pulled all the > sources from CVS. Everything compiles, and so far I've been able to run > wxPython scripts with a limited degree of success. However, the major > problem is that I'm still having troubles with the menus. When I load a > wxPython script in Python, Python's menubars stay active and the menus > created by the script are nowhere to be found. Has anyone else experienced > this? Yes. I've been experimenting with Python built as a Framework and have the similar problem of there being no menus at all. > > Also, when I run the script it does not open as a separate application in OS > X. All windows are listed as child windows of the Python application. I'm > wondering if these two issues are related. wxPython may not be able to > modify Python's menus, and since it does not have its own application, it > has no way of showing its own menus. Does this make sense? I admit I'm > pretty new to Mac programming, and as such I'm a bit stuck as to what can be > done about this problem. Any help would be appreciated! An approach that I've been thinking of trying is to build a wxMac C++ application that embeds Python, rather than a standard Python extension module. This app can then do the housework necessary to be a well behaved Mac app, and then hand off to the embedded Python to run the main wxPython script. I havn't had much time lately to do more than think about this, perhaps if you've got the time you could try it? Any more knowledgable people have comments about this approach? -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From smithsm@samuelsmith.org Mon Jan 07 11:27:12 2002 Received: (qmail 123 invoked by alias); Mon, 07 Jan 2002 19:27:12 -0000 Received: from [166.70.74.29] (helo=mail.adeptsystemsinc.com) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16NfQO-0000fy-00 for ; Mon, 07 Jan 2002 11:27:12 -0800 Received: (qmail 31169 invoked by uid 84); 7 Jan 2002 19:26:33 -0000 Received: from smithsm@samuelsmith.org by adeptsystemsinc.com with qmail-scanner-1.00 (. Clean. Processed in 0.998629 secs); 07 Jan 2002 19:26:33 -0000 Received: from unknown (HELO ?10.0.2.215?) (10.0.2.215) by 0 with DES-CBC3-SHA encrypted SMTP; 7 Jan 2002 19:26:32 -0000 Mime-Version: 1.0 X-Sender: smithsm%samuelsmith.org@mail.adeptsystemsinc.com Message-Id: In-Reply-To: <054801c196f8$348f8000$6401a8c0@cj622768a> References: <054801c196f8$348f8000$6401a8c0@cj622768a> To: wxpython-mac@lists.wxwindows.org From: Samuel Smith Subject: Re: [wxPython-mac] Menus for wxPythonMac Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Mon Jan 7 11:28:02 2002 X-Original-Date: Mon, 7 Jan 2002 12:18:19 -0700 >Sorry for the cross-posting, but I thought I'd cover all my bases! =) > >I'll briefly explain where I'm at. I'm using the Carbon version of Python >2.2, along with wxWindows and wxPython on OS X 10.1.2. I've pulled all the >sources from CVS. Everything compiles, and so far I've been able to run >wxPython scripts with a limited degree of success. However, the major >problem is that I'm still having troubles with the menus. When I load a >wxPython script in Python, Python's menubars stay active and the menus >created by the script are nowhere to be found. Has anyone else experienced >this? You may want to post this to the mac python mailing list. I am not qualified enough to answer but there have several postings recently about menu issues and OSX, frameworks etc. >Also, when I run the script it does not open as a separate application in OS >X. All windows are listed as child windows of the Python application. I'm >wondering if these two issues are related. wxPython may not be able to >modify Python's menus, and since it does not have its own application, it >has no way of showing its own menus. Does this make sense? I admit I'm >pretty new to Mac programming, and as such I'm a bit stuck as to what can be >done about this problem. Any help would be appreciated! > >Thanks, > >Kevin > > > > >_______________________________________________ >wxPython-mac mailing list >wxPython-mac@lists.wxwindows.org >http://lists.wxwindows.org/mailman/listinfo/wxpython-mac -- ********************************************** Samuel M. Smith Ph.D. 360 W. 920 N. Orem, Utah 84057 801-226-7607 x112 (voice) 801-226-7608 (fax) http://www.samuelsmith.org (web) ********************************************* From kevino@tulane.edu Tue Jan 08 15:24:26 2002 Received: (qmail 123 invoked by alias); Tue, 08 Jan 2002 23:24:26 -0000 Received: from [129.81.255.237] (helo=trend3.tcs.tulane.edu ident=root) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16O5bW-0005u3-00 for ; Tue, 08 Jan 2002 15:24:26 -0800 Received: from trend3.tcs.tulane.edu (IDENT:root@localhost [127.0.0.1]) by trend3.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g08NOPu11296 for ; Tue, 8 Jan 2002 17:24:25 -0600 Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend3.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g08NOPb11289 for ; Tue, 8 Jan 2002 17:24:25 -0600 Received: from kevinnew (64.83.41.225.dsl225-bus-nova.cavtel.net [64.83.41.225]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id g08NOO918774 for ; Tue, 8 Jan 2002 17:24:24 -0600 (CST) Message-ID: <010a01c1989c$ffeb10c0$2101a8c0@kevinnew> From: "Kevin Ollivier" To: References: <054801c196f8$348f8000$6401a8c0@cj622768a> Subject: Re: [wxPython-mac] Menus for wxPythonMac MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Tue Jan 8 15:25:02 2002 X-Original-Date: Tue, 8 Jan 2002 18:34:19 -0500 > You may want to post this to the mac python mailing list. I am not qualified > enough to answer but there have several postings recently about menu > issues and OSX, frameworks etc. Already done. =) Thanks, Kevin From kevino@tulane.edu Fri Jan 11 06:08:59 2002 Received: (qmail 123 invoked by alias); Fri, 11 Jan 2002 14:08:58 -0000 Received: from [129.81.255.236] (helo=trend2.tcs.tulane.edu) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16P2Mc-0002oP-00; Fri, 11 Jan 2002 06:08:58 -0800 Received: from trend2.tcs.tulane.edu (localhost [127.0.0.1]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0BE8q015773; Fri, 11 Jan 2002 08:08:52 -0600 Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0BBiDc14901; Fri, 11 Jan 2002 05:44:13 -0600 Received: from trend2.tcs.tulane.edu (trend2-vw.tcs.tulane.edu [129.81.255.236]) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0B79x900682; Fri, 11 Jan 2002 01:09:59 -0600 (CST) Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0B79wv16910; Fri, 11 Jan 2002 01:09:58 -0600 Received: from trend2.tcs.tulane.edu (trend2-vw.tcs.tulane.edu [129.81.255.236]) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0B4in928126; Thu, 10 Jan 2002 22:44:49 -0600 (CST) Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0B4iS007387; Thu, 10 Jan 2002 22:44:28 -0600 Received: from trend2.tcs.tulane.edu (trend2-vw.tcs.tulane.edu [129.81.255.236]) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0B4ik928032; Thu, 10 Jan 2002 22:44:46 -0600 (CST) Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0B4iQ007293; Thu, 10 Jan 2002 22:44:26 -0600 Received: from trend2.tcs.tulane.edu (trend2-vw.tcs.tulane.edu [129.81.255.236]) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0B4ig927947; Thu, 10 Jan 2002 22:44:42 -0600 (CST) Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0B4iN007209; Thu, 10 Jan 2002 22:44:23 -0600 Received: from trend2.tcs.tulane.edu (trend2-vw.tcs.tulane.edu [129.81.255.236]) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0B4ie927898; Thu, 10 Jan 2002 22:44:41 -0600 (CST) Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0B4iJ007055; Thu, 10 Jan 2002 22:44:19 -0600 Received: from cj622768a (cj622768-a.alngtn1.va.home.com [24.37.124.9]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0B4iO927453; Thu, 10 Jan 2002 22:44:25 -0600 (CST) Message-ID: <06e501c19a5a$b32b5460$6401a8c0@cj622768a> From: "Kevin Ollivier" To: "Bob Ippolito" , , , References: <07CD21F6-0301-11D6-A5E6-003065A10F5A@redivi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Subject: [wxPython-mac] Re: [Pythonmac-SIG] Menus for wxPythonMac Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Fri Jan 11 06:09:01 2002 X-Original-Date: Thu, 10 Jan 2002 23:44:38 -0500 > That's quite a hairy issue. You see, the way WindowServer and the Dock > work, to my knowledge, is that they just *will not* register two > separate dock instances or two menus for the same pid. > > It is possible to change the menu bars dynamically, so, with appropriate > fixes to wxWindows and/or wxPython's source code it could work by using > submenus or something under PythonInterpreter. But until apple (which > they will almost certainly never do...) properly documents WindowServer > and the behind-the-scenes stuff that goes on it's going to be pretty > difficult to see flawless operation of any scripting language with the > GUI. I don't think this will be too much work using wxWindows, in fact, what confuses me is that (as I understand it) wxWindows is actually built to dynamically create and change menus on Mac. This is because wxWindows apps generally define menu items right inside the code. To me this indicates that there is some problem with wxWindows getting 'access' to the hosting application's menubar. My (Mac-inexperienced) eyes see two possible problems: 1. A resource file conflict? This seems rather unlikely to me, but I noticed that most Mac apps use an 'MBAR' resource to define their menus. Could it cause a problem if a shared library and the 'host' application both define a MBAR resource, especially if they have the same resource ID? Also, would anyone know if a shared library needs its resource file bundled with the hosting application or is it compiled into the library? If this is the case, creating a wxWindows version of the Python app could solve this problem. 2. GetNewMBar() fails because a menubar already exists for the application. This seems more likely to me, the question then becomes: is there a way to check to see if a menubar exists before calling GetNewMBar(), and if so, getting the Handle to that menubar? Does my thinking make sense here? Of course, I'm new to Mac programming so I may be missing something obvious here. ^_^; Thanks for your help! Kevin > The only solution I can think of is to make dummy application bundles > and launch them in separate processes, and have some sort of socket > communication between wxPython and the dummy bundles. Each bundle would > have to have a unique name because WindowServer seems to use argv[0] as > it's key to redirect events back to the application, so it could get > confused. This is a terrible hack, but it would almost certainly work. > The problem is that all communication to windows probably has to be done > over sockets, unless you can get an NSApplication pointer to the dummy > app or something, which would be awfully cool. It'd be a lot of work > though, obviously. > > -bob > > On Sunday, January 6, 2002, at 04:22 PM, Kevin & Masako Ollivier wrote: > > > Sorry for the cross-posting, but I thought I'd cover all my bases! =) > > > > I'll briefly explain where I'm at. I'm using the Carbon version of > > Python > > 2.2, along with wxWindows and wxPython on OS X 10.1.2. I've pulled all > > the > > sources from CVS. Everything compiles, and so far I've been able to run > > wxPython scripts with a limited degree of success. However, the major > > problem is that I'm still having troubles with the menus. When I load a > > wxPython script in Python, Python's menubars stay active and the menus > > created by the script are nowhere to be found. Has anyone else > > experienced > > this? > > > > Also, when I run the script it does not open as a separate application > > in OS > > X. All windows are listed as child windows of the Python application. > > I'm > > wondering if these two issues are related. wxPython may not be able to > > modify Python's menus, and since it does not have its own application, > > it > > has no way of showing its own menus. Does this make sense? I admit I'm > > pretty new to Mac programming, and as such I'm a bit stuck as to what > > can be > > done about this problem. Any help would be appreciated! > > > > Thanks, > > > > Kevin > > > > > > > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From guess-who@kevin-masako.com Tue Jan 15 18:09:32 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 02:09:30 -0000 Received: from [24.254.60.38] (helo=femail44.sdc1.sfba.home.com) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QfW6-0002dY-00; Tue, 15 Jan 2002 18:09:30 -0800 Received: from cj622768a ([24.37.124.9]) by femail44.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20020116020924.ZFXY17332.femail44.sdc1.sfba.home.com@cj622768a>; Tue, 15 Jan 2002 18:09:24 -0800 Message-ID: <014f01c19e32$91662b30$6401a8c0@cj622768a> From: "Kevin & Masako Ollivier" To: , , MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Subject: [wxPython-mac] wxPython for OS X - now with menus! Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Tue Jan 15 18:10:47 2002 X-Original-Date: Tue, 15 Jan 2002 21:07:31 -0500 Hi everyone, I've (finally!) been able to get menus working on wxPython for Mac OS X. =) Of course, I did not forget the obligatory screenshot: http://payson.tulane.edu/kollivier/wxPythonMac-menu.JPG I tested a number of samples out (including demo.py, hangman.py, slashdot.py, and wxProject.py) and all the menu code ran fine. There was one time where there did not appear to be any space between a menu title text and the shortcut key, but that was the only issue I encountered. So how did I do it? Actually, all I did was remove a few lines from the wxWindows/wxMac source code which read in the menubar resource. Here's the code I removed: File: src/mac/menu.cpp in Function wxMenuBar::MacInstallMenuBar Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ; wxString message ; wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource")); ::SetMenuBar( menubar ) ; ::DisposeHandle( menubar ) ; Feel free to try this at home! I'm sure this will cause problems when creating compiled apps on OS X though. My question is: is there a place we can "move" the menubar initialization code so that it will get run by compiled applications, but not by scripted apps? Maybe add an "InitMenuBar()" function into the IMPLEMENT_APP macro for Mac? Once we get this code issue resolved, I'm thinking we may want to build an "alpha" binary version of wxPython for Mac, so that people can play with it and see what has been done so far. What do you think? A majority of the other issues I've found in the samples are simply visual "glitches" (like text alignment and control overlap issues) that should have a more straight-forward fix for them. =) Thanks, Kevin From robin@alldunn.com Tue Jan 15 18:58:47 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 02:58:47 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QgHn-0003LW-00; Tue, 15 Jan 2002 18:58:47 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Tue, 15 Jan 2002 18:58:46 -0800 Message-ID: <0c8001c19e39$b6f33080$0214a8c0@Rogue> From: "Robin Dunn" To: , , References: <014f01c19e32$91662b30$6401a8c0@cj622768a> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Tue Jan 15 18:59:02 2002 X-Original-Date: Tue, 15 Jan 2002 18:58:43 -0800 > > I've (finally!) been able to get menus working on wxPython for Mac OS X. =) > Of course, I did not forget the obligatory screenshot: > > http://payson.tulane.edu/kollivier/wxPythonMac-menu.JPG WooHoo! > I tested a number of samples out (including demo.py, hangman.py, > slashdot.py, and wxProject.py) and all the menu code ran fine. There was one > time where there did not appear to be any space between a menu title text > and the shortcut key, but that was the only issue I encountered. > > So how did I do it? Actually, all I did was remove a few lines from the > wxWindows/wxMac source code which read in the menubar resource. ... Yes, there's got to be a better way, but at least this lets us know where the conflict is at... -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From terabaap@yumpee.org Tue Jan 15 23:58:25 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 07:58:25 -0000 Received: from [209.225.8.13] (helo=dc-mx03.cluster1.charter.net) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16Qkxl-0005fh-00; Tue, 15 Jan 2002 23:58:25 -0800 Received: from [66.188.129.161] (HELO yumpee.org) by dc-mx03.cluster1.charter.net (CommuniGate Pro SMTP 3.4.6) with ESMTP id 32239746; Wed, 16 Jan 2002 02:15:18 -0500 Message-ID: <3C452655.7000505@yumpee.org> From: Manoj Plakal User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5) Gecko/20011011 X-Accept-Language: en-us MIME-Version: 1.0 To: wxpython-mac@lists.wxwindows.org CC: wxpython-users Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! References: <014f01c19e32$91662b30$6401a8c0@cj622768a> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Tue Jan 15 23:59:03 2002 X-Original-Date: Wed, 16 Jan 2002 01:05:57 -0600 [Replying to a post on wxpython-mac@lists.wxwindows.org] Kevin & Masako Ollivier wrote: > Hi everyone, > > I've (finally!) been able to get menus working on wxPython for Mac OS X. =) > Of course, I did not forget the obligatory screenshot: > > http://payson.tulane.edu/kollivier/wxPythonMac-menu.JPG > > I tested a number of samples out (including demo.py, hangman.py, > slashdot.py, and wxProject.py) and all the menu code ran fine. There was one > time where there did not appear to be any space between a menu title text > and the shortcut key, but that was the only issue I encountered. > > So how did I do it? Actually, all I did was remove a few lines from the > wxWindows/wxMac source code which read in the menubar resource. Here's the > code I removed: > > File: src/mac/menu.cpp > in Function wxMenuBar::MacInstallMenuBar > > Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ; > wxString message ; > wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource")); > ::SetMenuBar( menubar ) ; > ::DisposeHandle( menubar ) ; > > Feel free to try this at home! I'm sure this will cause problems when > creating compiled apps on OS X though. My question is: is there a place we > can "move" the menubar initialization code so that it will get run by > compiled applications, but not by scripted apps? Maybe add an > "InitMenuBar()" function into the IMPLEMENT_APP macro for Mac? > > Once we get this code issue resolved, I'm thinking we may want to build an > "alpha" binary version of wxPython for Mac, so that people can play with it > and see what has been done so far. What do you think? A majority of the > other issues I've found in the samples are simply visual "glitches" (like > text alignment and control overlap issues) that should have a more > straight-forward fix for them. =) Yes, please do provide something to play around with :) In the meantime, could you post all the changes you made to wxMac/wxPython sources and a brief procedure for building on OS X? BTW, thanks for getting things up and running! Manoj PS: The tree controls in the screenshots look suspiciously like wxGTK. But you are building using wxMac, right? Which brings us to the possiblity of two wxPythons for OS X: based on either wxGTK or wxMac. Do both work now? Which one is going to be the "official" one? From csomor@advancedconcepts.ch Wed Jan 16 00:10:16 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 08:10:15 -0000 Received: from [194.230.42.37] (helo=advancedconcepts.ch) by first.cirl.uoregon.edu with smtp (Exim 3.33 #1 (Debian)) id 16Ql9D-0005vT-00 for ; Wed, 16 Jan 2002 00:10:15 -0800 Received: from [195.226.0.170] by advancedconcepts.ch (CommuniGate SMTP 3.1.3) with SMTP id S.0957175790sg for ; Wed, 16 Jan 2002 08:00:25 +0100 Message-ID: <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> From: "Stefan Csomor" To: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 00:11:03 2002 X-Original-Date: Wed, 16 Jan 2002 08:55:41 +0100 Hi actually you are then modifying somebody elses menubar - this is not at all a recommended action - event if it works ;-) Could somebody tell me what I need to follow get things building (or where to look at them) macos x might be ok for the moment. makes things easier for me to try at the classic level Thanks Stefan ----- Original Message ----- From: "Kevin & Masako Ollivier" To: ; ; Sent: Wednesday, January 16, 2002 3:07 AM Subject: [wxPython-mac] wxPython for OS X - now with menus! > Hi everyone, > > I've (finally!) been able to get menus working on wxPython for Mac OS X. =) > Of course, I did not forget the obligatory screenshot: > > http://payson.tulane.edu/kollivier/wxPythonMac-menu.JPG > > I tested a number of samples out (including demo.py, hangman.py, > slashdot.py, and wxProject.py) and all the menu code ran fine. There was one > time where there did not appear to be any space between a menu title text > and the shortcut key, but that was the only issue I encountered. > > So how did I do it? Actually, all I did was remove a few lines from the > wxWindows/wxMac source code which read in the menubar resource. Here's the > code I removed: > > File: src/mac/menu.cpp > in Function wxMenuBar::MacInstallMenuBar > > Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ; > wxString message ; > wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource")); > ::SetMenuBar( menubar ) ; > ::DisposeHandle( menubar ) ; > > Feel free to try this at home! I'm sure this will cause problems when > creating compiled apps on OS X though. My question is: is there a place we > can "move" the menubar initialization code so that it will get run by > compiled applications, but not by scripted apps? Maybe add an > "InitMenuBar()" function into the IMPLEMENT_APP macro for Mac? > > Once we get this code issue resolved, I'm thinking we may want to build an > "alpha" binary version of wxPython for Mac, so that people can play with it > and see what has been done so far. What do you think? A majority of the > other issues I've found in the samples are simply visual "glitches" (like > text alignment and control overlap issues) that should have a more > straight-forward fix for them. =) > > Thanks, > > Kevin > > > _______________________________________________ > wxPython-mac mailing list > wxPython-mac@lists.wxwindows.org > http://lists.wxwindows.org/mailman/listinfo/wxpython-mac > From jack@oratrix.nl Wed Jan 16 02:36:26 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 10:36:24 -0000 Received: from [192.16.197.220] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QnQe-0007sw-00; Wed, 16 Jan 2002 02:36:24 -0800 Received: from oratrix.oratrix.nl (localhost [127.0.0.1]) by oratrix.oratrix.nl (Postfix) with ESMTP id E275CE8451; Wed, 16 Jan 2002 11:36:21 +0100 (MET) X-Mailer: exmh version 2.1.0 04/14/1999 To: wxpython-mac@lists.wxwindows.org Cc: pythonmac-sig@python.org, wx-dev@lists.wxwindows.org Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! In-Reply-To: Message by "Kevin & Masako Ollivier" ,<014f01c19e32$91662b30$6401a8c0@cj622768a> Organisation: Oratrix, Valeriusplein 30, 1075 BJ Amsterdam, NL Phone: +31 20 6795452(work), +31 20 6795309 (fax), +31 20 6160335(home) X-Last-Band-Seen: Lazy Sunday Dream (Maloe Melo, 29-12) X-Mini-Review: Best countryrock band in many a year... Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: Jack Jansen Message-Id: <20020116103621.E275CE8451@oratrix.oratrix.nl> Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 02:37:46 2002 X-Original-Date: Wed, 16 Jan 2002 11:36:21 +0100 > So how did I do it? Actually, all I did was remove a few lines from the > wxWindows/wxMac source code which read in the menubar resource. Here's the > code I removed: > > File: src/mac/menu.cpp > in Function wxMenuBar::MacInstallMenuBar > > Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ; > wxString message ; > wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource")); > ::SetMenuBar( menubar ) ; > ::DisposeHandle( menubar ) ; There's a couple of issues with this code. First of all, the Carbon docs warn that you should *not* call DisposeHandle() on a MenuBar anymore, use DisposeMenuBar(). Second, you're missing a DrawMenuBar() call after the SetMenuBar(). Third, I'm not sure that you actually want to dispose the menubar: the docs do say that SetMenuBar copies the menus, but all code I've ever seen keeps a reference to the menubar handle nonetheless. -- - Jack Jansen http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - From csomor@advancedconcepts.ch Wed Jan 16 05:08:14 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 13:08:14 -0000 Received: from [194.230.42.37] (helo=advancedconcepts.ch) by first.cirl.uoregon.edu with smtp (Exim 3.33 #1 (Debian)) id 16Qpna-00019g-00 for ; Wed, 16 Jan 2002 05:08:14 -0800 Received: from [195.226.0.170] by advancedconcepts.ch (CommuniGate SMTP 3.1.3) with SMTP id S.0958248190vb for ; Wed, 16 Jan 2002 12:58:18 +0100 Message-ID: <0de701c19e8c$d8db1110$2501000a@core.advancedconcepts.ch> From: "Stefan Csomor" To: References: <20020116103621.E275CE8451@oratrix.oratrix.nl> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 05:09:03 2002 X-Original-Date: Wed, 16 Jan 2002 13:53:32 +0100 Hi Jack > > File: src/mac/menu.cpp > > in Function wxMenuBar::MacInstallMenuBar > > > > Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ; > > wxString message ; > > wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource")); > > ::SetMenuBar( menubar ) ; > > ::DisposeHandle( menubar ) ; > > There's a couple of issues with this code. First of all, the Carbon docs warn > that you should *not* call DisposeHandle() on a MenuBar anymore, use > DisposeMenuBar(). that's true, this has changed, and is also fixed in the current wxWindows cvs code (src/mac/menu.cpp line 630) (the reason why DisposeMenuBar should be used is ref counting, although Apple's own samples still call DisposeHandle) > Second, you're missing a DrawMenuBar() call after the > SetMenuBar(). DrawMenuBar is only called after all menus have been constructed (src/mac/menu.cpp line 737), doing this before would result in an unnecessary redraw > Third, I'm not sure that you actually want to dispose the > menubar: the docs do say that SetMenuBar copies the menus, but all code > I've > ever seen keeps a reference to the menubar handle nonetheless. I've seen quite a few examples of this code, disposing the menubar, since the docs indicate SetMenuBar does a copy, and I've seen several of apple's code doing so too, I decided to dispose of it, because it seems like a leak to me (e.g. Listing 4-2 in the porting to carbon doc). While the standard native mac app only has one menubar and reads this once, it may not really matter, but especially in wxwindows where we are constructing menus frequently when different wxFrames have different menubars, it seems appropriate to me. Thanks for bringing these points up. So any suggestions on how to resolve this wxPython-mac menu refreshing problem are more than welcome :-) Best Stefan From kevino@tulane.edu Wed Jan 16 07:26:04 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 15:26:03 -0000 Received: from [129.81.255.236] (helo=trend2.tcs.tulane.edu) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16Qrwx-0003Kb-00 for ; Wed, 16 Jan 2002 07:26:03 -0800 Received: from trend2.tcs.tulane.edu (localhost [127.0.0.1]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0GFQ2L26404; Wed, 16 Jan 2002 09:26:02 -0600 Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend2.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0GFQ2c26398; Wed, 16 Jan 2002 09:26:02 -0600 Received: from kevinnew (64.83.41.225.dsl225-bus-nova.cavtel.net [64.83.41.225]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0GFPx912639; Wed, 16 Jan 2002 09:25:59 -0600 (CST) Message-ID: <003101c19ea2$366d2e20$2101a8c0@kevinnew> From: "Kevin Ollivier" To: , Cc: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 07:27:03 2002 X-Original-Date: Wed, 16 Jan 2002 10:26:45 -0500 > Hi actually you are then modifying somebody elses menubar - this is not at > all a recommended action - event if it works ;-) I know it is far from ideal behavior, but so far this is the only solution to the problem I have been able to come up with. The problem is caused because wxPython scripts are identified as "documents" belonging to Python instead of applications. So instead of creating a new application, wxPython code is executed within Python itself. Any attempt to create a new menubar will fail, because Python already has a menubar. I haven't yet found any Carbon code for dynamically creating a new Application, but I'm new to Mac coding so I could be missing something. From what I've found though, it seems we have to consider Python as a "host" application, which can be taken over by wxPython when a wxPython script is run. I believe this behavior is also used by Tkinter on Mac OS 9, but I just ran a couple tests so I could be wrong. (I actually got the idea when looking at Tk's Mac menu code.) We could do something like split Python into two executables - one for the IDE and one which only runs scripts. I'm open to any other suggestions that could get this working! =) Also, as a more "gentle" way of handling this issue, I basically added some code to check and see if a menubar already exists, and if not, create it. So the code now looks like: if (GetMenuBar() == NULL) { Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ; wxString message ; wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource")); ::SetMenuBar( menubar ) ; ::DisposeHandle( menubar ) ; } I've both run wxPython apps and compiled wxMac apps successfully with this code. This code as I see it should do no harm - as I understand it, if GetMenuBar() is not null, the following lines of code will fail anyways. (Although I realize that it will go ahead and execute the other code.) GetMenuBar should always return null for wxMac apps, and if GetMenuBar does not return null, the only plausable situation I can see for that is if wxWindows is running through a scripting language. Is this correct? > Could somebody tell me what I need to follow get things building (or where > to look at them) macos x might be ok for the moment. makes things easier for > me to try at the classic level Yeah, realizing that all these components use Carbon as the GUI code, I realized that wxPython for Mac Classic may be a realistic option. In any case, here are the steps to build wxPython on Mac OS X: Step 1: Get the Python 2.2 source code from www.python.org and build twice. First as normal (configure/make/make install) and then as instructed in the dist/src/mac/osx/ folder (from the beginning). This will create both a "traditional" Python binary (in /usr/local/bin/) and a Carbon-based Python.app (in /Applications). When you run scripts from the shell, you'll be using the traditional binary. When you double-click in the Finder, then you'll use Python.app. (These two will probably merge in the future.) Step 2: Get the latest CVS of wxWindows and wxPython and build as usual. =) Step 3: Copy the wxPython folder from /usr/local/lib/python2.2/site-packages/ to /Library/Frameworks/Python.Framework/Versions/2.2/python2.2/lib/site-package s/ Step 4: Double-click on wxPython/demo/demo.py and see what happens! I believe this is it. Let me know how it goes. Thanks for your help! Kevin From robin@alldunn.com Wed Jan 16 08:32:47 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 16:32:46 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QszW-0004TT-00 for ; Wed, 16 Jan 2002 08:32:46 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Wed, 16 Jan 2002 08:32:45 -0800 Message-ID: <0d3501c19eab$6d597520$0214a8c0@Rogue> From: "Robin Dunn" To: Cc: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> <003101c19ea2$366d2e20$2101a8c0@kevinnew> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 08:33:03 2002 X-Original-Date: Wed, 16 Jan 2002 08:32:44 -0800 > > Step 1: Get the Python 2.2 source code from www.python.org and build twice. > First as normal (configure/make/make install) and then as instructed in the > dist/src/mac/osx/ folder (from the beginning). This will create both a > "traditional" Python binary (in /usr/local/bin/) and a Carbon-based > Python.app (in /Applications). When you run scripts from the shell, you'll > be using the traditional binary. When you double-click in the Finder, then > you'll use Python.app. (These two will probably merge in the future.) I've found that only one build is needed. Build as described in MacOSX/README to do the framework and then just put a link to /Library/Frameworks/Python.framework/Versions/2.2/bin/python in /usr/local/bin or anywhere else on the PATH. > > Step 2: Get the latest CVS of wxWindows and wxPython and build as usual. =) > I've got a (slightly outdated) set of instructions in wxWindows/wxPython/BUILD.osx.txt -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From smithsm@samuelsmith.org Wed Jan 16 09:31:07 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 17:31:07 -0000 Received: from [166.70.74.29] (helo=mail.adeptsystemsinc.com) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16Qttw-0005A3-00 for ; Wed, 16 Jan 2002 09:31:07 -0800 Received: (qmail 6844 invoked by uid 84); 16 Jan 2002 17:30:14 -0000 Received: from smithsm@samuelsmith.org by adeptsystemsinc.com with qmail-scanner-1.00 (. Clean. Processed in 0.286956 secs); 16 Jan 2002 17:30:14 -0000 Received: from unknown (HELO ?10.0.2.215?) (10.0.2.215) by 0 with DES-CBC3-SHA encrypted SMTP; 16 Jan 2002 17:30:13 -0000 Mime-Version: 1.0 X-Sender: smithsm%samuelsmith.org@mail.adeptsystemsinc.com Message-Id: To: wxpython-mac@lists.wxwindows.org From: Samuel Smith Content-Type: text/plain; charset="us-ascii" ; format="flowed" Subject: [wxPython-mac] Mac Menubars Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 09:32:03 2002 X-Original-Date: Wed, 16 Jan 2002 10:30:09 -0700 > Hi actually you are then modifying somebody elses menubar - this is not at > all a recommended action - event if it works ;-) I don't know if this will help. But I while back I was having problems with the menubars in macpython with tkinter. The fix was to save the existing menubar, create a new one, then restore the old menubar on script exit. This seems safer than modifying the existing menubar if there is one. # test program for Tkinter from Tkinter import * import sys def quit(): print 'Hello, I must be going' import sys; sys.exit() def greeting(): print 'Hello output world' # store oldBar = Menu.GetMenuBar() # run TK root = Tk() menuBar = Menu() root.config(menu=menuBar) fileMenu = Menu(menuBar) fileMenu.add_command(label='Quit', command=quit,accelerator='Command+Q') menuBar.add_cascade(label='File', menu=fileMenu) win = Frame() win.pack() Label(win, text="hello container world").pack(side=TOP) Button(win,text='Hello', command=greeting).pack(side=LEFT) Button(win,text='Quit', command=quit).pack(side=RIGHT) win.mainloop() # restore Menu.ClearMenuBar() Menu.SetMenuBar(oldBar) Menu.DrawMenuBar() -- ********************************************** Samuel M. Smith Ph.D. 360 W. 920 N. Orem, Utah 84057 801-226-7607 x112 (voice) 801-226-7608 (fax) http://www.samuelsmith.org (web) ********************************************* From csomor@advancedconcepts.ch Wed Jan 16 10:58:45 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 18:58:45 -0000 Received: from [194.230.42.37] (helo=advancedconcepts.ch) by first.cirl.uoregon.edu with smtp (Exim 3.33 #1 (Debian)) id 16QvGm-00075q-00 for ; Wed, 16 Jan 2002 10:58:45 -0800 Received: from [195.226.0.170] by advancedconcepts.ch (CommuniGate SMTP 3.1.3) with SMTP id S.0959510309zm for ; Wed, 16 Jan 2002 18:48:53 +0100 Message-ID: <0f4901c19ebd$d0754b40$2501000a@core.advancedconcepts.ch> From: "Stefan Csomor" To: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> <003101c19ea2$366d2e20$2101a8c0@kevinnew> <0d3501c19eab$6d597520$0214a8c0@Rogue> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 10:59:04 2002 X-Original-Date: Wed, 16 Jan 2002 19:44:06 +0100 Hi sorry, for disturbing I have the console running, also done a symlink for having python everywhere, but doubleclicking Python.app launches and quits again, dropping the primes.py on it gives me the Python interpreter icon on the dock but no output, is this going to stdout, so that it's ok for me not to see anything or did I forget something, any tests to find out what I'm missing ? Thanks for any pointers Stefan ----- Original Message ----- From: "Robin Dunn" To: Cc: Sent: Wednesday, January 16, 2002 5:32 PM Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! > > > > Step 1: Get the Python 2.2 source code from www.python.org and build > twice. > > First as normal (configure/make/make install) and then as instructed in > the > > dist/src/mac/osx/ folder (from the beginning). This will create both a > > "traditional" Python binary (in /usr/local/bin/) and a Carbon-based > > Python.app (in /Applications). When you run scripts from the shell, you'll > > be using the traditional binary. When you double-click in the Finder, then > > you'll use Python.app. (These two will probably merge in the future.) > > I've found that only one build is needed. Build as described in > MacOSX/README to do the framework and then just put a link to > /Library/Frameworks/Python.framework/Versions/2.2/bin/python in > /usr/local/bin or anywhere else on the PATH. > > > > > Step 2: Get the latest CVS of wxWindows and wxPython and build as usual. > =) > > > > I've got a (slightly outdated) set of instructions in > wxWindows/wxPython/BUILD.osx.txt > > -- > Robin Dunn > Software Craftsman > robin@AllDunn.com Java give you jitters? > http://wxPython.org Relax with wxPython! > > > > > > _______________________________________________ > wxPython-mac mailing list > wxPython-mac@lists.wxwindows.org > http://lists.wxwindows.org/mailman/listinfo/wxpython-mac > From robin@alldunn.com Wed Jan 16 11:20:21 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 19:20:20 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16Qvbg-0007Sp-00 for ; Wed, 16 Jan 2002 11:20:20 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Wed, 16 Jan 2002 11:20:17 -0800 Message-ID: <0e9201c19ec2$d4b6fa50$0214a8c0@Rogue> From: "Robin Dunn" To: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> <003101c19ea2$366d2e20$2101a8c0@kevinnew> <0d3501c19eab$6d597520$0214a8c0@Rogue> <0f4901c19ebd$d0754b40$2501000a@core.advancedconcepts.ch> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 11:21:04 2002 X-Original-Date: Wed, 16 Jan 2002 11:20:16 -0800 > I have the console running, also done a symlink for having python > everywhere, but doubleclicking Python.app launches and quits again, dropping > the primes.py on it gives me the Python interpreter icon on the dock but no > output, is this going to stdout, so that it's ok for me not to see anything > or did I forget something, any tests to find out what I'm missing ? It's going to stdout, and you can see it if you run Applications/Utilities/Console. The other way to run it is from the command line with "python primes.py" -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From zeitlin@lpthe.jussieu.fr Wed Jan 16 11:38:21 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 19:38:21 -0000 Received: from [134.157.0.129] (helo=shiva.jussieu.fr) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16Qvt7-0008U7-00; Wed, 16 Jan 2002 11:38:21 -0800 Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1])g0GJcJYD001826 ; Wed, 16 Jan 2002 20:38:19 +0100 (CET) Received: from seth.lpthe.jussieu.fr (IDENT:root@seth.lpthe.jussieu.fr [134.157.10.7])id g0GJcJj12852 ; Wed, 16 Jan 2002 20:38:19 +0100 (MET) Received: from (zeitlin@localhost) by seth.lpthe.jussieu.fr (8.8.7/jtpda-5.1) id UAA16026 ; Wed, 16 Jan 2002 20:38:19 +0100 Message-Id: <200201161938.UAA16026@seth.lpthe.jussieu.fr> From: Vadim Zeitlin To: wx-dev@lists.wxwindows.org cc: wxpython-mac@lists.wxwindows.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE References: <014f01c19e32$91662b30$6401a8c0@cj622768a> In-Reply-To: <014f01c19e32$91662b30$6401a8c0@cj622768a> X-Mailer: Mahogany 0.64.1 'Sparc', compiled for Linux 2.4.11 i686 Subject: [wxPython-mac] Re: [wx-dev] wxPython for OS X - now with menus! Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 11:39:03 2002 X-Original-Date: Wed, 16 Jan 2002 20:38:19 +0100 (CET) On Tue, 15 Jan 2002 21:07:31 -0500 Kevin & Masako Ollivier wrote: KMO> I've (finally!) been able to get menus working on wxPython for Mac OS X. =) Great! KMO> Of course, I did not forget the obligatory screenshot: KMO> KMO> http://payson.tulane.edu/kollivier/wxPythonMac-menu.JPG Thanks for thinking about the poor Mac-less people! I'm really glad to see that wxPythonMac works better and better - hopefully it will become the last drop which will drown TkInter ;-) Good luck, VZ From csomor@advancedconcepts.ch Wed Jan 16 11:52:14 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 19:52:14 -0000 Received: from [194.230.42.37] (helo=advancedconcepts.ch) by first.cirl.uoregon.edu with smtp (Exim 3.33 #1 (Debian)) id 16Qw6X-0000mT-00 for ; Wed, 16 Jan 2002 11:52:14 -0800 Received: from [195.226.0.170] by advancedconcepts.ch (CommuniGate SMTP 3.1.3) with SMTP id S.0959702746au for ; Wed, 16 Jan 2002 19:42:21 +0100 Message-ID: <0f6b01c19ec5$4a7063b0$2501000a@core.advancedconcepts.ch> From: "Stefan Csomor" To: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> <003101c19ea2$366d2e20$2101a8c0@kevinnew> <0d3501c19eab$6d597520$0214a8c0@Rogue> <0f4901c19ebd$d0754b40$2501000a@core.advancedconcepts.ch> <0e9201c19ec2$d4b6fa50$0214a8c0@Rogue> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 11:53:46 2002 X-Original-Date: Wed, 16 Jan 2002 20:37:37 +0100 Hi Robin > > I have the console running, also done a symlink for having python > > everywhere, but doubleclicking Python.app launches and quits again, > dropping > > the primes.py on it gives me the Python interpreter icon on the dock but > no > > output, is this going to stdout, so that it's ok for me not to see > anything > > or did I forget something, any tests to find out what I'm missing ? > > It's going to stdout, and you can see it if you run > Applications/Utilities/Console. since the read me tells Python.app is a windowed-application, what can I do to see these windows in action - because I need to be sure that its menus, windows etc. are working correctly, otherwise I won't be able to debug the mac wxWindow parts... > The other way to run it is from the command line with "python primes.py" I know, that's what I did to test whether I've got the console things and my ln -s working correctly Thanks for the patience Stefan From kevino@tulane.edu Wed Jan 16 12:13:24 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 20:13:23 -0000 Received: from [129.81.255.235] (helo=trend1.tcs.tulane.edu) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QwR1-0001wx-00 for ; Wed, 16 Jan 2002 12:13:23 -0800 Received: from trend1.tcs.tulane.edu (IDENT:root@localhost [127.0.0.1]) by trend1.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0GKCED01570 for ; Wed, 16 Jan 2002 14:12:14 -0600 Received: from tulane.edu (majestic.tcs.tulane.edu [129.81.224.6]) by trend1.tcs.tulane.edu (8.11.5/8.11.5) with ESMTP id g0GKCEJ01563 for ; Wed, 16 Jan 2002 14:12:14 -0600 Received: from kevinnew (64.83.41.225.dsl225-bus-nova.cavtel.net [64.83.41.225]) (authenticated (0 bits)) by tulane.edu (8.11.4/8.11.4) with ESMTP id g0GKCj916722 for ; Wed, 16 Jan 2002 14:12:46 -0600 (CST) Message-ID: <00a901c19eca$4612bca0$2101a8c0@kevinnew> From: "Kevin Ollivier" To: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> <003101c19ea2$366d2e20$2101a8c0@kevinnew> <0d3501c19eab$6d597520$0214a8c0@Rogue> <0f4901c19ebd$d0754b40$2501000a@core.advancedconcepts.ch> <0e9201c19ec2$d4b6fa50$0214a8c0@Rogue> <0f6b01c19ec5$4a7063b0$2501000a@core.advancedconcepts.ch> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 12:14:03 2002 X-Original-Date: Wed, 16 Jan 2002 15:13:27 -0500 > Hi Robin > > > > I have the console running, also done a symlink for having python > > > everywhere, but doubleclicking Python.app launches and quits again, > > dropping > > > the primes.py on it gives me the Python interpreter icon on the dock but > > no > > > output, is this going to stdout, so that it's ok for me not to see > > anything > > > or did I forget something, any tests to find out what I'm missing ? > > > > It's going to stdout, and you can see it if you run > > Applications/Utilities/Console. > > since the read me tells Python.app is a windowed-application, what can I do > to see these windows in action - because I need to be sure that its menus, > windows etc. are working correctly, otherwise I won't be able to debug the > mac wxWindow parts... If I may jump in here, the reason Python.app keeps appearing and disappearing is that it is designed to quit when the script you're running finishes, so when you run a wxPython script from the finder you should be fine. The Unix Python.app is still a work in progress, and does not have any IDE or shell features yet. It's designed only as a "drop client" for scripts at this point. To test wxPython myself, I tried several of the samples in the wxPython/demo directory, including demo.py. I just double-clicked on it and Python.app popped up and displayed the window (and menu!). Hoe this answers your question! Thanks, Kevin From robin@alldunn.com Wed Jan 16 12:21:36 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 20:21:36 -0000 Received: from [208.129.212.80] (helo=Rogue ident=user100) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QwYy-00024g-00 for ; Wed, 16 Jan 2002 12:21:36 -0800 Received: from [127.0.0.1] by Rogue (ArGoSoft Mail Server, Version 1.61 (1.6.1.2)); Wed, 16 Jan 2002 12:21:35 -0800 Message-ID: <0efa01c19ecb$64d86ee0$0214a8c0@Rogue> From: "Robin Dunn" To: References: <014f01c19e32$91662b30$6401a8c0@cj622768a> <0d5f01c19e63$3c1f9c20$2501000a@core.advancedconcepts.ch> <003101c19ea2$366d2e20$2101a8c0@kevinnew> <0d3501c19eab$6d597520$0214a8c0@Rogue> <0f4901c19ebd$d0754b40$2501000a@core.advancedconcepts.ch> <0e <00a901c19eca$4612bca0$2101a8c0@kevinnew> Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 12:22:03 2002 X-Original-Date: Wed, 16 Jan 2002 12:21:33 -0800 > If I may jump in here, the reason Python.app keeps appearing and > disappearing is that it is designed to quit when the script you're running > finishes, so when you run a wxPython script from the finder you should be > fine. The Unix Python.app is still a work in progress, and does not have any > IDE or shell features yet. It's designed only as a "drop client" for scripts > at this point. To test wxPython myself, I tried several of the samples in > the wxPython/demo directory, including demo.py. I just double-clicked on it > and Python.app popped up and displayed the window (and menu!). I think what Stefan is asking for is a working python script that is not wxPython that will work with this way of building Python.app. For example, a script that does native Carbon calls or whatever. I havn't found one of those yet. Is there one in somewhere in the Python dist Jack? -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython! From Jack.Jansen@oratrix.nl Wed Jan 16 12:44:52 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 20:44:52 -0000 Received: from [192.16.197.220] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QwvT-0002qC-00 for ; Wed, 16 Jan 2002 12:44:52 -0800 Received: from localhost (node10329.a2000.nl [24.132.3.41]) by oratrix.oratrix.nl (Postfix) with ESMTP id 316D1E8451 for ; Wed, 16 Jan 2002 21:44:50 +0100 (MET) Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) From: Jack Jansen To: wxpython-mac@lists.wxwindows.org Content-Transfer-Encoding: 7bit In-Reply-To: <0e9201c19ec2$d4b6fa50$0214a8c0@Rogue> Message-Id: X-Mailer: Apple Mail (2.480) Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 12:45:03 2002 X-Original-Date: Wed, 16 Jan 2002 21:44:20 +0100 On Wednesday, January 16, 2002, at 08:20 PM, Robin Dunn wrote: >> I have the console running, also done a symlink for having python >> everywhere, but doubleclicking Python.app launches and quits again, > dropping >> the primes.py on it gives me the Python interpreter icon on >> the dock but > no >> output, is this going to stdout, so that it's ok for me not to see > anything >> or did I forget something, any tests to find out what I'm missing ? > > It's going to stdout, and you can see it if you run > Applications/Utilities/Console. > > The other way to run it is from the command line with "python > primes.py" > And if you're running Python from the CVS repository there's an even better one (since about 2 weeks): the python inside the python.app framework now understands when it has been passed command line arguments. If that is the case it surmises that it's being called from a terminal window (in stead of from the finder) and it does not do it's AppleEvent magic to create command line arguments. All this means that you can now do /Applications/Python.app/Contents/MacOS/python script.py and have the script run in a fullblown .app (with icon, menubar, etc). The fact that this works leads me to believe that all the magic to make the icon appear in the dock, create the menubar, etc is not contained in the finder but in the program itself: it looks around the location from which it was started and if it looks sufficiently like a .app bundle it'll do the right thing. But note that this whole paragraph is speculation. From Jack.Jansen@oratrix.nl Wed Jan 16 12:44:52 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 20:44:52 -0000 Received: from [192.16.197.220] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16QwvU-0002qF-00 for ; Wed, 16 Jan 2002 12:44:52 -0800 Received: from localhost (node10329.a2000.nl [24.132.3.41]) by oratrix.oratrix.nl (Postfix) with ESMTP id 553DCE8452 for ; Wed, 16 Jan 2002 21:44:51 +0100 (MET) Subject: Re: [wxPython-mac] Mac Menubars Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) From: Jack Jansen To: wxpython-mac@lists.wxwindows.org Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: <9CC0D2D2-0AC0-11D6-B88F-003065517236@oratrix.nl> X-Mailer: Apple Mail (2.480) Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mailman-Version: 2.0.3 Precedence: bulk Reply-To: wxpython-mac@lists.wxwindows.org List-Help: List-Post: List-Subscribe: , List-Id: wxPython on Mac. List-Unsubscribe: , List-Archive: Date: Wed Jan 16 12:45:08 2002 X-Original-Date: Wed, 16 Jan 2002 21:35:43 +0100 On Wednesday, January 16, 2002, at 06:30 PM, Samuel Smith wrote: >> Hi actually you are then modifying somebody elses menubar - >> this is not at >> all a recommended action - event if it works ;-) > > > I don't know if this will help. But I while back I was having problems > with the menubars in macpython with tkinter. The fix was to > save the existing > menubar, create a new one, then restore the old menubar on script exit. > But that is with MacPython, and IIRC the wx stuff is in MachoPython. And MachoPython doesn't do anything with menubars. Hmm, that might be the problem, then: maybe the original menubar (the one you get "for free" when your .app starts) is somehow read-only? From Jack.Jansen@oratrix.nl Wed Jan 16 12:50:19 2002 Received: (qmail 123 invoked by alias); Wed, 16 Jan 2002 20:50:19 -0000 Received: from [192.16.197.220] (helo=oratrix.oratrix.nl) by first.cirl.uoregon.edu with esmtp (Exim 3.33 #1 (Debian)) id 16Qx0l-0002vF-00 for ; Wed, 16 Jan 2002 12:50:19 -0800 Received: from localhost (node10329.a2000.nl [24.132.3.41]) by oratrix.oratrix.nl (Postfix) with ESMTP id DB030E8451 for ; Wed, 16 Jan 2002 21:50:17 +0100 (MET) Subject: Re: [wxPython-mac] wxPython for OS X - now with menus! Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) From: Jack Jansen To: wxpython-mac@lists.wxwindows.org Content-Transfer-Encoding: 7bit In-Reply-To: <0efa01c19ecb$64d86ee0$0214a8c0@Rogue> Message-Id: <94AC1118-0AC2-11D6-B88F-003065517236@oratrix.nl> X-Mailer: Apple Mail (2.480) Sender: wxpython-mac-admin@lists.wxwindows.org Errors-To: wxpython-mac-admin@lists.wxwindows.org X-BeenThere: wxpython-mac@lists.wxwindows.org X-Mai