pyobjc-dev Mailing List for PyObjC (Page 224)
Brought to you by:
ronaldoussoren
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(30) |
May
(18) |
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2002 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
|
Sep
(23) |
Oct
(180) |
Nov
(291) |
Dec
(95) |
2003 |
Jan
(338) |
Feb
(352) |
Mar
(97) |
Apr
(46) |
May
(226) |
Jun
(184) |
Jul
(145) |
Aug
(141) |
Sep
(69) |
Oct
(161) |
Nov
(96) |
Dec
(90) |
2004 |
Jan
(66) |
Feb
(87) |
Mar
(98) |
Apr
(132) |
May
(115) |
Jun
(68) |
Jul
(150) |
Aug
(92) |
Sep
(59) |
Oct
(52) |
Nov
(17) |
Dec
(75) |
2005 |
Jan
(84) |
Feb
(191) |
Mar
(133) |
Apr
(114) |
May
(158) |
Jun
(185) |
Jul
(62) |
Aug
(28) |
Sep
(36) |
Oct
(88) |
Nov
(65) |
Dec
(43) |
2006 |
Jan
(85) |
Feb
(62) |
Mar
(92) |
Apr
(75) |
May
(68) |
Jun
(101) |
Jul
(73) |
Aug
(37) |
Sep
(91) |
Oct
(65) |
Nov
(30) |
Dec
(39) |
2007 |
Jan
(24) |
Feb
(28) |
Mar
(10) |
Apr
(2) |
May
(18) |
Jun
(16) |
Jul
(21) |
Aug
(6) |
Sep
(30) |
Oct
(31) |
Nov
(153) |
Dec
(31) |
2008 |
Jan
(63) |
Feb
(70) |
Mar
(47) |
Apr
(24) |
May
(59) |
Jun
(22) |
Jul
(12) |
Aug
(7) |
Sep
(14) |
Oct
(26) |
Nov
(5) |
Dec
(5) |
2009 |
Jan
(10) |
Feb
(41) |
Mar
(70) |
Apr
(88) |
May
(49) |
Jun
(62) |
Jul
(34) |
Aug
(15) |
Sep
(55) |
Oct
(40) |
Nov
(67) |
Dec
(21) |
2010 |
Jan
(60) |
Feb
(17) |
Mar
(26) |
Apr
(26) |
May
(29) |
Jun
(4) |
Jul
(21) |
Aug
(21) |
Sep
(10) |
Oct
(12) |
Nov
(3) |
Dec
(19) |
2011 |
Jan
(3) |
Feb
(13) |
Mar
(8) |
Apr
(8) |
May
(17) |
Jun
(20) |
Jul
(21) |
Aug
(7) |
Sep
|
Oct
|
Nov
(9) |
Dec
(11) |
2012 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
(4) |
Jun
(14) |
Jul
(5) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(23) |
Dec
(1) |
2013 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
(5) |
Jun
(1) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(12) |
Nov
(10) |
Dec
(3) |
2014 |
Jan
(7) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(2) |
Jun
(11) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(2) |
2015 |
Jan
(9) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(7) |
Jun
|
Jul
(5) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2016 |
Jan
(1) |
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
(21) |
Oct
(17) |
Nov
|
Dec
(36) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
2018 |
Jan
(2) |
Feb
(3) |
Mar
(3) |
Apr
(14) |
May
(2) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
(6) |
2019 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(1) |
2021 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2025 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Zachery B. <zb...@ur...> - 2003-07-23 10:41:55
|
On Wednesday, July 23, 2003, at 01:54 AM, Ronald Oussoren wrote: > On Wednesday, 23 July, 2003, at 03:53, Zachery Bir wrote: > >> Using the TableModel.py example, I've gotten a bit further with the >> GUI aspect of my app. However, when running it, I run across this >> error in the Console: >> >> 2003-07-22 21:50:06.079 ZopeEditManager[8388] An exception has >> occured: >> Traceback (most recent call last): >> File >> "release-dir/package/usr/lib/python2.2/site-packages/PyObjC/ >> PyObjCTools/AppHelper.py", line 32, in runEventLoop >> File >> "/Users/zbir/Developer/ZopeEditManager/build/ZopeEditManager.app/ >> Contents/Resources/ZopeEditController.py", line 147, in >> tableView_objectValueForTableColumn_row_ >> return self.current_edits_data.get((aTableColumn, rowIndex), >> "{%s, %d}" % (col, rowIndex)) >> TypeError: an integer is required >> >> Here's the method (lifted straight from the TableModel.py module): >> >> def tableView_objectValueForTableColumn_row_(self, aTableView, >> aTableColumn, >> rowIndex): >> col = aTableColumn.identifier() >> return self.current_edits_data.get((aTableColumn, rowIndex), >> "{%s, %d}" % (col, >> rowIndex)) >> >> Running the app built from TableModel.py gives the same error. Any >> pointers? > > Are you using PyObjC 0.9? If you do you have to multiple inherit from > NSTableDataSource (IIRC, check the class definition in TableView.py). Nope, this is off CVS. Your TableModel doesn't extend NSTableDataSource, either. Oh, poo. I wonder if I'm using a 1.0b1 example and 0.9. Yup. zbir@gorilla $ python Python 2.2.2 (#1, 03/31/03, 04:38:35) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. mpor>>> import objc >>> objc.__version__ '0.9' Thanks, Zac |
From: Ronald O. <ous...@ci...> - 2003-07-23 05:55:54
|
On Wednesday, 23 July, 2003, at 03:53, Zachery Bir wrote: > Using the TableModel.py example, I've gotten a bit further with the > GUI aspect of my app. However, when running it, I run across this > error in the Console: > > 2003-07-22 21:50:06.079 ZopeEditManager[8388] An exception has occured: > Traceback (most recent call last): > File > "release-dir/package/usr/lib/python2.2/site-packages/PyObjC/ > PyObjCTools/AppHelper.py", line 32, in runEventLoop > File > "/Users/zbir/Developer/ZopeEditManager/build/ZopeEditManager.app/ > Contents/Resources/ZopeEditController.py", line 147, in > tableView_objectValueForTableColumn_row_ > return self.current_edits_data.get((aTableColumn, rowIndex), "{%s, > %d}" % (col, rowIndex)) > TypeError: an integer is required > > Here's the method (lifted straight from the TableModel.py module): > > def tableView_objectValueForTableColumn_row_(self, aTableView, > aTableColumn, > rowIndex): > col = aTableColumn.identifier() > return self.current_edits_data.get((aTableColumn, rowIndex), > "{%s, %d}" % (col, > rowIndex)) > > Running the app built from TableModel.py gives the same error. Any > pointers? Are you using PyObjC 0.9? If you do you have to multiple inherit from NSTableDataSource (IIRC, check the class definition in TableView.py). Ronald |
From: Ronald O. <ous...@ci...> - 2003-07-23 05:54:23
|
On Wednesday, 23 July, 2003, at 03:03, Kaben Nanlohy wrote: > > A possibility is renaming nibclassbuilder to nibclassbuilder-py{22,23}. > I don't know how this would collide with nibclassbuilder's intended > use. It wouldn't, other than possibly confusing users that try to use the tutorials. I don't know if it is possible to tell fink that 2 packages share a file, if it is you can postprocess the script to make sure that both versions have '#!/usr/bin/env python' as their first line. Ronald |
From: Ronald O. <ous...@ci...> - 2003-07-23 05:45:01
|
On Tuesday, 22 July, 2003, at 23:27, Bob Swerdlow wrote: > I hate to be a pain, but AppKit does not seem to include > "NSWIndowDelegate" - get an ImportError: cannot find name > NSWindowDelegate. > I can call setDelegate_ without the multiple inheritence and there is > no > error, but the delegate functions don't respond. :-( I should have checked this in a 0.9 tree, 0.9 doesn't even include a definition of this protocol. That leaves us one alternative: even more explicit markup. Add 'windowShouldClose_ = objc.selector(windowShouldClose_, signature="c@:@")' just below the definition of the method. This will tell the bridge that this method returns a boolean instead of an object. class MyDelegate (AutoBaseClass): # .... def windowShouldClose_(self, sender): return 0 windowShouldClose = objc.selector(windowShouldClose, signature="c@:@") Another thing that will probably work: return None if the window shouldn't close and any other value if it should. Ronald > > > ----- Original Message ----- > From: "Ronald Oussoren" <ous...@ci...> > To: "Bob Swerdlow" <rsw...@tr...> > Cc: <pyo...@li...> > Sent: Tuesday, July 22, 2003 3:41 PM > Subject: Re: [Pyobjc-dev] Returning BOOLs to Cocoa > > >> >> On Tuesday, 22 July, 2003, at 20:38, Bob Swerdlow wrote: >> >>> Ronald - >>> >>> We are using 0.9 and hope to release soon, so I haven't wanted to >>> upgrade to >>> 1.0b1 just yet. However, when I add the call as you describe, Python >>> tells >>> me "No attribute addDelegate_". Is there some module I need to >>> include? >> >> The method is called setDelegate_, sorry about that. The other thing >> you'll >> have to do is multiple inherit the delegate from NSWindowDelegate >> (should be in AppKit), e.g. 'class MyClass (AutoBaseClass, >> NSWindowDelegate)'. >> >> PyObjC 0.9 was the last release where this was necessary. We then came >> to >> our senses and automaticly detected which protocols you're >> implementing >> :-) >> >> Ronald >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: VM Ware >> With VMware you can run multiple operating systems on a single >> machine. >> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at >> the >> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev >> >> > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
From: Zachery B. <zb...@ur...> - 2003-07-23 01:54:02
|
Using the TableModel.py example, I've gotten a bit further with the GUI aspect of my app. However, when running it, I run across this error in the Console: 2003-07-22 21:50:06.079 ZopeEditManager[8388] An exception has occured: Traceback (most recent call last): File "release-dir/package/usr/lib/python2.2/site-packages/PyObjC/ PyObjCTools/AppHelper.py", line 32, in runEventLoop File "/Users/zbir/Developer/ZopeEditManager/build/ZopeEditManager.app/ Contents/Resources/ZopeEditController.py", line 147, in tableView_objectValueForTableColumn_row_ return self.current_edits_data.get((aTableColumn, rowIndex), "{%s, %d}" % (col, rowIndex)) TypeError: an integer is required Here's the method (lifted straight from the TableModel.py module): def tableView_objectValueForTableColumn_row_(self, aTableView, aTableColumn, rowIndex): col = aTableColumn.identifier() return self.current_edits_data.get((aTableColumn, rowIndex), "{%s, %d}" % (col, rowIndex)) Running the app built from TableModel.py gives the same error. Any pointers? Zac |
From: Kaben N. <k_P...@ra...> - 2003-07-23 01:07:27
|
Hullo; Andrea Riciputi noted that fink's pyobjc-py22 and pyobjc-py23 explicitly 'Conflict' with each other. I responded that I meant to do that. The packages would refuse to install at the same time anyway, and I thought that marking them as Conflicting would give the user better feedback. The two packages share the single file /sw/bin/nibclassbuilder, which differs in the first line: #!/sw/bin/python2.2 versus #!/sw/bin/python2.3 or even #!/sw/bin/python fink has packages python, python22, and python23, and the binaries are so-named. Currently nibclassbuilder wants to be run using whatever python was used to build it. Since others have also asked why the two packages can't be installed simultaneously, and I'm getting embarrassed explaining the reason, I thought I'd ask how you would prefer I try fixing this? A possibility is renaming nibclassbuilder to nibclassbuilder-py{22,23}. I don't know how this would collide with nibclassbuilder's intended use. -- Kaben |
From: Bob S. <rsw...@tr...> - 2003-07-22 21:27:38
|
I hate to be a pain, but AppKit does not seem to include "NSWIndowDelegate" - get an ImportError: cannot find name NSWindowDelegate. I can call setDelegate_ without the multiple inheritence and there is no error, but the delegate functions don't respond. :-( ----- Original Message ----- From: "Ronald Oussoren" <ous...@ci...> To: "Bob Swerdlow" <rsw...@tr...> Cc: <pyo...@li...> Sent: Tuesday, July 22, 2003 3:41 PM Subject: Re: [Pyobjc-dev] Returning BOOLs to Cocoa > > On Tuesday, 22 July, 2003, at 20:38, Bob Swerdlow wrote: > > > Ronald - > > > > We are using 0.9 and hope to release soon, so I haven't wanted to > > upgrade to > > 1.0b1 just yet. However, when I add the call as you describe, Python > > tells > > me "No attribute addDelegate_". Is there some module I need to > > include? > > The method is called setDelegate_, sorry about that. The other thing > you'll > have to do is multiple inherit the delegate from NSWindowDelegate > (should be in AppKit), e.g. 'class MyClass (AutoBaseClass, > NSWindowDelegate)'. > > PyObjC 0.9 was the last release where this was necessary. We then came > to > our senses and automaticly detected which protocols you're implementing > :-) > > Ronald > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > |
From: Ronald O. <ous...@ci...> - 2003-07-22 19:42:12
|
On Tuesday, 22 July, 2003, at 20:38, Bob Swerdlow wrote: > Ronald - > > We are using 0.9 and hope to release soon, so I haven't wanted to > upgrade to > 1.0b1 just yet. However, when I add the call as you describe, Python > tells > me "No attribute addDelegate_". Is there some module I need to > include? The method is called setDelegate_, sorry about that. The other thing you'll have to do is multiple inherit the delegate from NSWindowDelegate (should be in AppKit), e.g. 'class MyClass (AutoBaseClass, NSWindowDelegate)'. PyObjC 0.9 was the last release where this was necessary. We then came to our senses and automaticly detected which protocols you're implementing :-) Ronald |
From: Ronald O. <ous...@ci...> - 2003-07-22 19:18:00
|
I just noticed that the interface of the wrapped NSRectFillList is a bit odd. Is anyone using this function at the moment, I'd like to clean up the interface. The current interface accepts a string containing the struct.pack-ed representation of an array of NSRects, it should accept a sequence of NSRects instead. Ronald |
From: Bob S. <rsw...@tr...> - 2003-07-22 18:38:25
|
Ronald - We are using 0.9 and hope to release soon, so I haven't wanted to upgrade to 1.0b1 just yet. However, when I add the call as you describe, Python tells me "No attribute addDelegate_". Is there some module I need to include? Thanks for your help. - Bob ----- Original Message ----- From: "Ronald Oussoren" <ous...@ci...> To: "Bob Swerdlow" <rsw...@tr...> Cc: <pyo...@li...> Sent: Tuesday, July 22, 2003 1:56 PM Subject: Re: [Pyobjc-dev] Returning BOOLs to Cocoa > > On Tuesday, 22 July, 2003, at 18:31, Bob Swerdlow wrote: > > > I seem to be missing something about BOOLs returned from python members > > called for Cocoa delegates. :-( > > > > I implemented a Cocoa delegate for my window to support > > windowShouldClose_( ) since I need to do some checking of user input > > before > > I allow the window to close. However, no matter what I return, the > > window > > always closes. > > > > Originally, I just used: > > return 0 > > but I also tried: > > return objc.NO > > > > I added a print statement for when the code returns objc.NO and it > > printed: > > returning FALSE > > > > What is the proper value to return so that Cocoa knows I don't want it > > to go > > on? > > Returninging 0, False or objc.NO should work. Are you using PyObjC > 1.0b1? If you're using the 0.9 release, you have to tell the bridge > that you intent implement a window delegate. > > I added 'self.tableView.window().addDelegate_(self)' in 'awakeFromNib' > and the following method to the TableView example and that works as > expected. > > def windowShouldClose_(self, sender): > """ Window won't close """ > print "Should Close?" > return 0 > > > Ronald > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > |
From: Ronald O. <ous...@ci...> - 2003-07-22 17:57:42
|
On Tuesday, 22 July, 2003, at 18:31, Bob Swerdlow wrote: > I seem to be missing something about BOOLs returned from python members > called for Cocoa delegates. :-( > > I implemented a Cocoa delegate for my window to support > windowShouldClose_( ) since I need to do some checking of user input > before > I allow the window to close. However, no matter what I return, the > window > always closes. > > Originally, I just used: > return 0 > but I also tried: > return objc.NO > > I added a print statement for when the code returns objc.NO and it > printed: > returning FALSE > > What is the proper value to return so that Cocoa knows I don't want it > to go > on? Returninging 0, False or objc.NO should work. Are you using PyObjC 1.0b1? If you're using the 0.9 release, you have to tell the bridge that you intent implement a window delegate. I added 'self.tableView.window().addDelegate_(self)' in 'awakeFromNib' and the following method to the TableView example and that works as expected. def windowShouldClose_(self, sender): """ Window won't close """ print "Should Close?" return 0 Ronald |
From: Bob S. <rsw...@tr...> - 2003-07-22 16:31:41
|
I seem to be missing something about BOOLs returned from python members called for Cocoa delegates. :-( I implemented a Cocoa delegate for my window to support windowShouldClose_( ) since I need to do some checking of user input before I allow the window to close. However, no matter what I return, the window always closes. Originally, I just used: return 0 but I also tried: return objc.NO I added a print statement for when the code returns objc.NO and it printed: returning FALSE What is the proper value to return so that Cocoa knows I don't want it to go on? Thanks! Bob Swerdlow COO Transpose rsw...@tr... 207-781-8284 http://www.transpose.com ---------------------------------- Fight Spam! Add this link to your signature (as I did): http://wecanstopspam.org Click through to find out more. ---------------------------------- |
From: Zachery B. <zb...@ur...> - 2003-07-22 11:09:19
|
On Tuesday, July 22, 2003, at 05:53 AM, Jack Jansen wrote: > On Monday, Jul 21, 2003, at 22:25 Europe/Amsterdam, Zachery Bir wrote: > >> Hey, all. >> >> I'm about 80% of the way done with my first PyObjC app. I've based it >> on Bill's Cocoa-Python Application template. I've done enough >> tweaking to both the MyAppDelegate and MainMenu.nib, that I think I'm >> off-track a bit. Here is some background info on the app and some >> particular issues I'm facing: > > Zac, > just before 1.0b1 went out I started on a tutorial that is intended to > give a crash-course on understanding Cocoa application structuring to > people with a Python background but no previous experience with Cocoa > (using myself as an example of such a person:-). > > I get the impression you are stumbling against the same hurdles. Could > you help me debug/augment the tutorial? The current state is in > Doc/tutorial_reading.html (or .txt for the ReST version). You bet. I'll look it over today. Thanks, Zac |
From: Jack J. <Jac...@cw...> - 2003-07-22 09:50:48
|
On Monday, Jul 21, 2003, at 22:25 Europe/Amsterdam, Zachery Bir wrote: > Hey, all. > > I'm about 80% of the way done with my first PyObjC app. I've based it > on Bill's Cocoa-Python Application template. I've done enough tweaking > to both the MyAppDelegate and MainMenu.nib, that I think I'm off-track > a bit. Here is some background info on the app and some particular > issues I'm facing: Zac, just before 1.0b1 went out I started on a tutorial that is intended to give a crash-course on understanding Cocoa application structuring to people with a Python background but no previous experience with Cocoa (using myself as an example of such a person:-). I get the impression you are stumbling against the same hurdles. Could you help me debug/augment the tutorial? The current state is in Doc/tutorial_reading.html (or .txt for the ReST version). -- Jack Jansen, <Jac...@cw...>, http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman |
From: Ronald O. <ous...@ci...> - 2003-07-22 05:38:02
|
On Monday, 21 July, 2003, at 22:25, Zachery Bir wrote: > Hey, all. > > I'm about 80% of the way done with my first PyObjC app. I've based it=20= > on Bill's Cocoa-Python Application template. I've done enough tweaking=20= > to both the MyAppDelegate and MainMenu.nib, that I think I'm off-track=20= > a bit. Here is some background info on the app and some particular=20 > issues I'm facing: > > It's a "nativication" of Casey Duncan's zopeedit.py, a client-side=20 > helper app for his External Editor product for Zope [1]. The=20 > server-side method marshalls any editor-worthy Zope object (could be=20= > text, like Python Scripts, Zope Page Templates, DTML Methods, &c or it=20= > could be images, like gif, jpeg, png, &c) and prepends it with several=20= > lines of RFC822 headers of useful metadata. The client side script=20 > strips those off for use internally, writes the remaining file out to=20= > a temp file, and launches an editor based on a lookup of the=20 > content-type/meta-type in an editor mapping. This file zopeedit.py=20 > works fine as a standalone on Linux/Windows, but it seems that Mac=20 > browsers won't accept an arbitrary file (albeit executable) as a valid=20= > helper. This can be somewhat worked around by wrapping the python=20 > script in an AppleScript wrapper and using _that_ as the helper app,=20= > but it doesn't work for all kinds of editors (notably Carbon apps -=20 > with Cocoa apps, I can typically point to the underlying binary in an=20= > app bundle - can't seem to do that with Carbon apps, even if they're=20= > bundled). So I set about writing my own app in PyObjC, so I could=20 > reuse as much code as possible, and extend it where I can to make a=20 > more pleasant UI. After cautiously (and incessantly) pestering Bill, I=20= > was able to create an Application Delegate whose openFile_: method I=20= > overrode to strip the file, look up the appropriate editor (using=20 > NSUserDefaults now instead of ConfigParser), and open the stripped=20 > file with it. Works great. > > Some issues: > > =95=A0Now, unfortunately, I need to fulfill the main loop of the=20 > zopeedit script, and I'm at a bit of a loss on how to do that in the=20= > template I'm using. Its __main__.py just jumps right into=20 > AppHelper.runEventLoop(). Coupled with the desire to have a bit more=20= > control over the event loop, I need to set up some initial app=20 > attributes (my current workaround is ugly and doesn't seem to work=20 > terribly well anyway). There is not much you can do about the runloop, maybe NSRunLoop has=20 methods that allow you to do the outer loop yourself (e.g. while 1:=20 someRunLoop.step()) but that is almost certainly not the right=20 solution. If you only want to setup some global state you can do that before the=20= call to runEventLoop. For timed events look at NSTimer, .... > > =95=A0I'm trying to make a nice UI table of currently open edits = showing=20 > filename and application editing them. I understand the need to=20 > delegate the class that will fulfill the various tableView_...=20 > methods, but I'm not sure a) where to make the connections in the nib=20= > file, and b) where to define their implementation in the project. There is only one connection in the NIB file for this: from the=20 TableView to its data source. The relevant outlet of NSTableView is=20 named dataSource. The TableView example shows you how to implement=20 them. > > Here's a rough breakdown of what I'm looking at: > > =95=A0My app has a data structure of some sort holding current edits=20= > (filename, the app that will edit them, and associated metadata used=20= > for pushing the changes back to the server) I'd like this to be=20 > established in the creation of the app - does this belong in=20 > __main__.py? Originally, I tried establishing this in=20 > applicationDidFinishLaunching_(), but application_openFile_() is=20 > called before that, so I tried moving it to=20 > applicationWillFinishLaunching_(), and still it seems not to have been=20= > made correctly. IIRC applicatonWillFinishLaunching_ is called just before=20 applicationDidFinishLaunching, that won't help. I'd create the initial=20= state before calling runEventLoop, and probably in the same file as the=20= rest of the implementation of the model. > > =95=A0This data structure needs to fulfill the NSTableDataSource = methods=20 > to be set as the data source of the table view. Does this data=20 > structure need to be accounted for in the nib? Or just in Python code=20= > - meaning, does it need to extend NibClassBuilder.AutoBaseClass? See the TableView example. The datastructure itself need not be present=20= in the NIB. I'd keep the model seperate from the controller. The=20 TableView example doesn't do this, I'll fix that. What I find usefull is using a seperate class for storing the state,=20 and using the controller object (which is mentioned in the NIB) to=20 shuffle data to/from that state. > > =95=A0The original script just runs with a while: 1 loop watching = over=20 > the tempfile it creates and pushes the file back to the server when=20 > the mod time changes. I'd prefer to use notifications (seems more=20 > elegant), but if I can extend the main event loop with this behavior,=20= > that would be an acceptable initial concession. You can use timers to check if the modification time changes. I don't=20 know if there is a higher level API for this (like notification). > > That's basically it. It's an exceedingly simple python script, but=20 > turning it into a full Mac OS X app has proved challenging (mostly=20 > because I don't have my Cocoa experience - I'm sure all these feature=20= > requirements are very simple to the initiated) :) Cocoa starts out pretty simple, but most people seem to suffer from a=20 setback soon until they grasp the ideas behind Cocoa. Ronald > > Thanks, > > Zac > > [1] External Editor product:=20 > <http://www.zope.org/Members/Caseman/ExternalEditor> - You don't need=20= > Zope expertise to understand the client-side aspect. > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single = machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at = the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
From: b.bum <bb...@ma...> - 2003-07-22 03:31:22
|
On Monday, July 21, 2003, at 1:12 PM, Ronald Oussoren wrote: > - PyObjCTools.KeyValueCoding should be removed, it is incomplete and > no longer > necessary. Kill it -- it hasn't existed long enough for anyone to have used it for anything significant (I believe) and your implementation is such a vast improvement that everyone should switch. b.bum (Who is extremely grateful to Ronald for picking up KeyValueCoding and running with it. Incredible stuff. Thank you!!!!) |
From: Chris R. <cp...@em...> - 2003-07-21 20:35:01
|
And this is in preparation for Panther, right? (Won't say more than that due to NDAs.) On Monday, July 21, 2003, at 04:12 PM, Ronald Oussoren wrote: > I've just checked in new, and extended, support for the Key-Value > Coding > informal protocol. This is meant as a complete replacement for the > module > PyObjCTools.KeyValueSupport. The new support code consists of three > parts. Cheers! --Chris Ryland / Em Software, Inc. / www.emsoftware.com |
From: Zachery B. <zb...@ur...> - 2003-07-21 20:26:18
|
Hey, all. I'm about 80% of the way done with my first PyObjC app. I've based it=20 on Bill's Cocoa-Python Application template. I've done enough tweaking=20= to both the MyAppDelegate and MainMenu.nib, that I think I'm off-track=20= a bit. Here is some background info on the app and some particular=20 issues I'm facing: It's a "nativication" of Casey Duncan's zopeedit.py, a client-side=20 helper app for his External Editor product for Zope [1]. The=20 server-side method marshalls any editor-worthy Zope object (could be=20 text, like Python Scripts, Zope Page Templates, DTML Methods, &c or it=20= could be images, like gif, jpeg, png, &c) and prepends it with several=20= lines of RFC822 headers of useful metadata. The client side script=20 strips those off for use internally, writes the remaining file out to a=20= temp file, and launches an editor based on a lookup of the=20 content-type/meta-type in an editor mapping. This file zopeedit.py=20 works fine as a standalone on Linux/Windows, but it seems that Mac=20 browsers won't accept an arbitrary file (albeit executable) as a valid=20= helper. This can be somewhat worked around by wrapping the python=20 script in an AppleScript wrapper and using _that_ as the helper app,=20 but it doesn't work for all kinds of editors (notably Carbon apps -=20 with Cocoa apps, I can typically point to the underlying binary in an=20 app bundle - can't seem to do that with Carbon apps, even if they're=20 bundled). So I set about writing my own app in PyObjC, so I could reuse=20= as much code as possible, and extend it where I can to make a more=20 pleasant UI. After cautiously (and incessantly) pestering Bill, I was=20 able to create an Application Delegate whose openFile_: method I=20 overrode to strip the file, look up the appropriate editor (using=20 NSUserDefaults now instead of ConfigParser), and open the stripped file=20= with it. Works great. Some issues: =95=A0Now, unfortunately, I need to fulfill the main loop of the = zopeedit=20 script, and I'm at a bit of a loss on how to do that in the template=20 I'm using. Its __main__.py just jumps right into=20 AppHelper.runEventLoop(). Coupled with the desire to have a bit more=20 control over the event loop, I need to set up some initial app=20 attributes (my current workaround is ugly and doesn't seem to work=20 terribly well anyway). =95=A0I'm trying to make a nice UI table of currently open edits = showing=20 filename and application editing them. I understand the need to=20 delegate the class that will fulfill the various tableView_... methods,=20= but I'm not sure a) where to make the connections in the nib file, and=20= b) where to define their implementation in the project. Here's a rough breakdown of what I'm looking at: =95=A0My app has a data structure of some sort holding current edits=20= (filename, the app that will edit them, and associated metadata used=20 for pushing the changes back to the server) I'd like this to be=20 established in the creation of the app - does this belong in=20 __main__.py? Originally, I tried establishing this in=20 applicationDidFinishLaunching_(), but application_openFile_() is called=20= before that, so I tried moving it to applicationWillFinishLaunching_(),=20= and still it seems not to have been made correctly. =95=A0This data structure needs to fulfill the NSTableDataSource = methods=20 to be set as the data source of the table view. Does this data=20 structure need to be accounted for in the nib? Or just in Python code -=20= meaning, does it need to extend NibClassBuilder.AutoBaseClass? =95=A0The original script just runs with a while: 1 loop watching = over=20 the tempfile it creates and pushes the file back to the server when the=20= mod time changes. I'd prefer to use notifications (seems more elegant),=20= but if I can extend the main event loop with this behavior, that would=20= be an acceptable initial concession. That's basically it. It's an exceedingly simple python script, but=20 turning it into a full Mac OS X app has proved challenging (mostly=20 because I don't have my Cocoa experience - I'm sure all these feature=20 requirements are very simple to the initiated) :) Thanks, Zac [1] External Editor product:=20 <http://www.zope.org/Members/Caseman/ExternalEditor> - You don't need=20 Zope expertise to understand the client-side aspect.= |
From: Ronald O. <ous...@ci...> - 2003-07-21 20:13:18
|
Hi, I've just checked in new, and extended, support for the Key-Value Coding informal protocol. This is meant as a complete replacement for the module PyObjCTools.KeyValueSupport. The new support code consists of three parts. The first part is the end-user API in PyObjCTools.KeyValueCoding. This module contains a number of functions that give a convenient API to use key-value coding with Python objects (both for ObjC classes and unmodified plain python classes). The API currently consists of 4 functions and is modelled on the 'getattr' and 'setattr' functions that can be used to access attributes. The second part is an implementation of the NSKeyValueCoding protocol for the OC_PythonObject class. This makes it possible to use the Key-Value Coding protocol for plain python objects from Objective-C. And the last part is an implementation for the relevant parts of the NSKeyValueCoding protocol for hybrid Python/ObjC objects. This is actually the most complex bit to get right (see below). Documentation is a problem, as usual. There is some documentation in the online documetation but not much more. How do we access attributes through 'keys'? For reading we try an attribute named 'key', if that doesn't exist we try accessor methods (getKey and get_key) and finally we try the attribute '_key'. For writing we first try accessor method ('setKey' and 'set_key'), than the attribute '_key' and finally 'key'. This is roughly simular to the way ObjC works. For hybrid classes we use the Objective-C rules, but check for Python attributes/properties before defering(sp?) to the super-class implementation. The 3 implementations are consistent with each other, thanks to the unitttests. The major advantage over PyObjCTools.KeyValueCodingSupport is that the new support code allows you to use Key-Value Coding with unmodified existing Python classes. This should make it easier to split an application into a platform independent core and a Cocoa GUI layer. Open issues: - Should probably check the accessor 'isKey' as well when reading attributes, but Cocoa doesn't do this, probably due to their naming convention. - I'm not happy with the implementation of Key-Value Coding for hybrid classes. It feels hackish. - The implementation for setting attributes in hybrid classes is not entirely consistant with the default implementation mentioned in the NSKeyValueCoding documentation, I think it is possible to work fix this later on. - We don't access the private instance variables (e.g. __key). IMHO this would be a little too invasive (as well as non-trivial). - PyObjCTools.KeyValueCoding should be removed, it is incomplete and no longer necessary. Ronald |
From: Ebersole< <mak...@ya...> - 2003-07-21 19:21:00
|
***HERE IS AN OFFER YOU DON'T WANT TO MISS!*** Over 1,200 Books, Manuals, And Reports On CD-Rom! Full Reprint Rights! Sell The Entire Collection For As Much $$$ As You Like! Never Pay us any royalty fee! Read them, Sell them and bank the money! The best part is this... You can use all our web pages and marketing material (included) to make a fortune selling these amazing books, reports and manuals. It's a ready made business! You can even sell them on ebay and clean house! >>You will also get a second bonus CD ROM... Including 9 E-Books on how to advertise and start making some real money on the Internet! >>Plus yet another added Bonus... How to make serious money on ebay and other auction sites overnight! To find out more about this Risk Free Offer, Do not respond by email. Instead, Click the link below or copy and paste the web site address into your web browser. Thanks for your time. Cybernet Sales - EMG <br> <A HREF="http://www.vvevvillmakeyoumoney.biz/reports.htm">Click Here For More Information</A><br> http://www.vvevvillmakeyoumoney.biz/reports.htm ______________________________________________________ Want to be REMOVED from our email list? You were sent this email because you used our Opt-in service. We hope you enjoy reading our messages. However, if you'd rather not receive future e-mails from us, Click on the link below. http://www.vvevvillmakeyoumoney.biz/removeme.htm Thank you for your cooperation. ________________________________________________________ |
From: Dinu G. <gh...@da...> - 2003-07-20 11:01:55
|
David Goodger: > I apologize for not replying sooner. I just realized that I haven't > been receiving Doc-SIG mail since June 26 when I reconfigured my email > forwarding address. No problem, I almost just returned from a vacation myself... > Dinu Gherman wrote: > > I'm experimenting with a prototype reST editor on OS X, > > Looks cool! I'm wondering though, isn't it a bit CPU-intensive > to re-process the entire document with every keystroke? ;-) Sure, which is why it now uses timers to trigger the rendering every few seconds and only if the text really changed. Of course, ideally this would be done in a separate task... > Is the software itself available? I use OS X and I'd like to give it > a try. It's really only a proof of concept, but I've made a little "distri- bution" which is available here: http://python.net/~gherman/tmp/ReSTedit1.jpg http://python.net/~gherman/tmp/ReSTedit.tar.gz BTW, you might also want to check the following which does similar things, but in a different context: http://python.net/~gherman/tmp/RegexPlor1.jpg http://python.net/~gherman/tmp/RegexPlor.tar.gz > Are you aware of Gunnar Schwant's DocFactory? It uses wxPython. > <http://docutils.sf.net/sandbox/gschwant/docfactory/doc/> No, I wasn't - thanks, looks very nice! I'm not sure how well wxPython already works on OS X... I definitely like cross-platform programming, but there are a few things that Cocoa gives me that I just don't want to give away, like the Interface Builder and widgets for displaying PDF, which might be an option for ReSTedit, one day... > [other suggestions skipped] Thanks, I'll be happy to look into this over the next weeks... BTW, if DocFactory works really well on multiple platforms it would be very interesting to build something like Hydra, a student project for a collaborative distributed (even wirelessly) editor which re- cently got an Apple design award: http://hydra.globalse.org Regards, Dinu -- Dinu C. Gherman ...................................................................... "It is by the goodness of God that in our country we have these three unspeakably precious things: freedom of speech, freedom of conscience, and the prudence to practice neither." (Mark Twain) |
From: Dr. N. T. <tni...@in...> - 2003-07-20 06:03:03
|
From=3A Dr=2E Nicholas Ted Tel=3A 234-8033074806 fax=3A 234-1-7596714 Email=3Atnicholas4=40eudoramail=2Ecom Dear sir=2FMadam=2C In order to transfer out =28USD 12=2E6 M=29 Twelve million Six Hundred United States Dollars=29 from African Development Bank=2E I have the courage to ask you to look for a reliable and honest person who will be capable for this important business believing that you will never let me down either now or in future=2E I am Dr=2E Nicholas Ted=2C the Chief Auditor of African Development Bank=28ADB=29=2E There is an account opened in this bank in 1998 and since nobody has operated on this account again=2E After going through some old files in the records=2C I discovered that if I do not remit this money out urgently it would be forfeited for nothing=2E The owner of this account is Mr=2ESmith B=2EAndreas=2C a foreigner=2Cand a miner at kruger gold co=2E=2C a geologist by profession and he died since 1998=2E No other person knows about this account or any thing concerning it=2C the account has no other beneficiary and my investigation proved to me as well that this company does not know anything about this account and the amount involved is =28USD 12=2E6M=29 Twelve Million=2C six Hundred United States Dollars million dollars=2E I want to first transfer US$6=2C000=2C000=3A00 Six million United States Dollars from this money into a safe foreigners account abroad before the rest=2C but I don't know any foreigner=2E I am only contacting you as a foreigner because this money cannot be approved to a local bank here=2C but can only be approved to any foreign account because the money is in us dollars and the former owner of the account is Mr=2E Smith B=2EAndreas he is a foreigner too=2E I know that this message will come to you as a surprise as we don't know ourselves before=2E We will sign an agreement=2C but be sure that it is real and a genuine business=2E I only got your contact address from International Business Directory=2Cwith believe in God that you will never let me down in this business=2E You are the only person that I have contacted in this business=3B so please reply urgently so that I will inform you the next step to take immediately=2E Send also your private telephone and fax number including the full details of the account to be used for the deposit=2E I want us to meet face to face or sign a binding agreement to bind us together so that you can receive this money into a foreign account or any account of your choice where the fund will be safe=2E And I will fly to your country for withdrawal and sharing and other investments=2E I am contacting you because of the need to involve a foreigner with foreign account and foreign beneficiary=2E I need your full co-operation to make this work fine because the management is ready to approve this payment to any foreigner=2C who has correct information of this account=2C which I will give to you later immediately=2C if you are able and with capability to handle such amount in strict confidence and trust according to my instructions and advice for our mutual benefit because this opportunity will never come again in my life=2E I need truthful person in this business because I don't want to make mistake I need your strong assurance and trust=2E With my position now in the office I can transfer this money to any foreigner's reliable account=2C which you can provide with assurance that this money will be intact pending my physical arrival in your country for sharing=2E I will destroy all documents of transaction immediately we receive this money leaving no trace to any place=2E You can also come to discuss with me face to face after which I will make this remittance in your presence and two of us will fly to your country at least two days ahead of the money going into the account=2E I will apply for annual leave to get visa immediately I hear from you that you are ready to act and receive thi s fund in your account=2E I will use my position and influence to effect legal approvals and onward transfer of this money to your account with appropriate clearance forms of the ministries and foreign exchange departments=2E At the conclusion of this business=2C you will be given 35% of the total amount=2C 60% will be for me=2C while 5% will be for expenses both parties might have incurred during the process of transferring=2E I look forward to your earliest reply Dr=2E Nicholas Ted |
From: Just v. R. <ju...@le...> - 2003-07-19 02:44:09
|
Ronald Oussoren wrote: > The only problem that I know of is that Panther uses Python 2.3 > instead of Python 2.2. That makes it slightly harder to build binary > distributions that work on both versions of the OS without shipping > python inside your application. Which, fortunately, is trivial with the latest bundlebuilder.py. Just |
From: Ronald O. <ous...@ci...> - 2003-07-18 18:20:05
|
On Friday, 18 July, 2003, at 02:25, Aaron Swartz wrote: > I compiled the latest snapshot and 1.0b1 on Panther, created an > instance of the Cocoa-Python template and tried to compile and run it, > but each time it crashes with a bus error when it gets to > NibClassBuilder.extractClasses("MainMenu"). Here's the CrashReporter > log The templates were developed for PB on Jaguar, there may well be bugs in them w.r.t. Panther support. Please file a bug on SF, and attach the crashing code. This will make it easier to reproduce your problem. Ronald |
From: Ronald O. <ous...@ci...> - 2003-07-18 18:16:17
|
On Friday, 18 July, 2003, at 01:43, Paul Hart wrote: > On Thursday, July 17, 2003, at 05:21 PM, Bob Ippolito wrote: >> On Thursday, Jul 17, 2003, at 16:47 America/New_York, Aaron Swartz >> wrote: >> >>> Are there any plans for PyObjC to support Panther in the near >>> future? Should I just find a 10.2 machine to develop on instead? >> >> Of course, why don't you try and compile it and submit some bug >> reports about what works, what error messages come up, etc. and >> someone will try and fix it. I'm a member of ADC, so I have Panther, >> but it's not on my primary machine and I don't have a whole lot of >> free time to play around at the moment. >> >> -bob > > On a similar note, I'd be interested to know what the differences are > between Jaguar and Panther; I'm about to get knee-deep in PyObjC for a > pet project that I've been mulling over for some time. If there are > problems with building Python-related apps and having them run on both > 10.2 and 10.3, I'd like to know earlier rather than later. The only problem that I know of is that Panther uses Python 2.3 instead of Python 2.2. That makes it slightly harder to build binary distributions that work on both versions of the OS without shipping python inside your application. Just to make this absolutely clear: we will support Panther when it is released, and I don't expect serious problems. Ronald |