pyobjc-dev Mailing List for PyObjC (Page 40)
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: Ronald O. <ron...@ma...> - 2009-09-08 07:37:11
|
Hi, I had hoped to finish the next 2.2 beta last weekend, but worked on CPython instead because there were some build-related issues with all Python versions on Snow Leopard. I need to finish three tasks before the next release: 1) Some of the CoreText testcases cause a hard crash 2) The Quartz bindings aren't completely done yet w.r.t SL support 3) We need to package the Xcode templates because Xcode no longer ships with PyObjC templates Ronald |
From: Ronald O. <ron...@ma...> - 2009-09-08 07:26:45
|
On 8 Sep, 2009, at 3:06, Rob wrote: > One more bit of information: > > if I call the threaded bit with: worker.run() instead of worker.start > () the FTP works as I want it, but it hangs the UI while doing the > transfer. That was to be expected, 'worker.run' doesn't start a new thread but just runs the run method of the thread object in the current thread. This does show that the actual FTP code is correct though. Could you try to create a small demo program that has the same problem (such as a program with a single button that triggers a download from some public FTP site)? I cannot determine what's going on here from your description, it seems to me that your code should work even though it obviously doesn't. Another thing you might try to check if the problem is Cocoa related is to create a command-line tool that calls worker.start to start the FTP transaction in a background thread (don't forget to add code that waits until the background thread is done). Ronald > > > On Tue, Sep 8, 2009 at 10:49 AM, Rob <rob...@gm...> wrote: > My apologies if this has already been discussed / answered, but I > couldn't figure out how to search the archives. > > I am writing a Cocoa based FTP uploading application using ftplib > and threading and I've hit a bit of a snag. I am sure it is > something I am doing wrong, but I wanted to check to see if I am way > off. > > What appears to be happening is when I run the application within > the Cocoa GUI the FTP uploading part hangs when it tries to do the > upload (staring it's own thread I am assuming). I am guessing it's > a "thread in a thread" issue? (total guess obviously) > > When I run the threaded library directly from __main__ on the > command line, with FTP set to debug I get the following: > > *cmd* 'TYPE I' > *put* 'TYPE I\r\n' > *get* '200 Type set to I\r\n' > *resp* '200 Type set to I' > *cmd* 'PASV' > *put* 'PASV\r\n' > *get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)\r\n' > *resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)' > *cmd* 'STOR TestFile.mov' > *put* 'STOR TestFile.mov\r\n' > *get* '150 Connection accepted\r\n' > *resp* '150 Connection accepted' > *get* '226 Transfer OK\r\n' > *resp* '226 Transfer OK' > *cmd* 'QUIT' > *put* 'QUIT\r\n' > *get* '221 Goodbye\r\n' > *resp* '221 Goodbye' > Done. > > However when I run the same code within Cocoa I get the following: > > *cmd* 'TYPE I' > *put* 'TYPE I\r\n' > *get* '200 Type set to I\r\n' > *resp* '200 Type set to I' > *cmd* 'PASV' > *put* 'PASV\r\n' > *get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)\r\n' > *resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)' > > And it just hangs there. It never gets to the next line. > > The library that does this is a threaded class: class FTPFile > (Thread): that just runs a typical ftp connection and upload in the > run method: > > def run(self): > ftp = FTP( > self.config.server, > self.config.username, > self.config.password) > etc, etc > > I can FTP via the command line "ftp" application, and, like I said, > when I run the library directly so I don't think it's a server > problem. Is there something I may have missed when creating the > Cocoa app? Do I have to explicitly allow FTP connections or > something (I also have the firewall off)? Or is this a known issue > with Cocoa+Python? > > Thanks for any help, > rob > > -- > http://robrohan.com > http://twitter.com/robrohan > > > > -- > http://robrohan.com > http://twitter.com/robrohan > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Rob <rob...@gm...> - 2009-09-08 04:41:04
|
Bit more... Thinking this is a threading issue, I tried to write a facade that extends NSObject and my FTPFile(thread) object (e.g. class FTPFileFacade(NSObject, FTPFile):) and tried to call self.performSelectorInBackground_withObject_('startUpload:', None) to try to use NSThread instead (I think). Doing this results in the same behavior where it gets to the upload step in FTP, and then just hangs. If, however, I use self.performSelectorOnMainThread_withObject_waitUntilDone_('startUpload:',None, False) The FTP works properly, but again hangs the UI until the file is uploaded (because I am using the main thread I would imagine). I have to be missing something easy - any suggestions? (I don't want to have to scrap this projects use of python and re-write the mac client in objective-c as that defeats the whole purpose of us using python in the first place) Thanks for any help, rob On Tue, Sep 8, 2009 at 11:06 AM, Rob <rob...@gm...> wrote: > One more bit of information: > if I call the threaded bit with: worker.run() instead of worker.start() > the FTP works as I want it, but it hangs the UI while doing the transfer. > > > > On Tue, Sep 8, 2009 at 10:49 AM, Rob <rob...@gm...> wrote: > >> My apologies if this has already been discussed / answered, but I >> couldn't figure out how to search the archives. >> I am writing a Cocoa based FTP uploading application using ftplib and >> threading and I've hit a bit of a snag. I am sure it is something I am >> doing wrong, but I wanted to check to see if I am way off. >> >> What appears to be happening is when I run the application within the >> Cocoa GUI the FTP uploading part hangs when it tries to do the upload >> (staring it's own thread I am assuming). I am guessing it's a "thread in a >> thread" issue? (total guess obviously) >> >> When I run the threaded library directly from __main__ on the command >> line, with FTP set to debug I get the following: >> >> *cmd* 'TYPE I' >> *put* 'TYPE I\r\n' >> *get* '200 Type set to I\r\n' >> *resp* '200 Type set to I' >> *cmd* 'PASV' >> *put* 'PASV\r\n' >> *get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)\r\n' >> *resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)' >> *cmd* 'STOR TestFile.mov' >> *put* 'STOR TestFile.mov\r\n' >> *get* '150 Connection accepted\r\n' >> *resp* '150 Connection accepted' >> *get* '226 Transfer OK\r\n' >> *resp* '226 Transfer OK' >> *cmd* 'QUIT' >> *put* 'QUIT\r\n' >> *get* '221 Goodbye\r\n' >> *resp* '221 Goodbye' >> Done. >> >> However when I run the same code within Cocoa I get the following: >> >> **cmd* 'TYPE I'* >> >> **put* 'TYPE I\r\n'* >> >> **get* '200 Type set to I\r\n'* >> >> **resp* '200 Type set to I'* >> >> **cmd* 'PASV'* >> >> **put* 'PASV\r\n'* >> >> **get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)\r\n'* >> >> **resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)'* >> >> And it just hangs there. It never gets to the next line. >> >> The library that does this is a threaded class: class FTPFile(Thread): >> that just runs a typical ftp connection and upload in the run method: >> >> def run(self): >> >> ftp = FTP( >> >> self.config.server, >> >> self.config.username, >> >> self.config.password) >> >> etc, etc >> >> I can FTP via the command line "ftp" application, and, like I said, when I >> run the library directly so I don't think it's a server problem. Is there >> something I may have missed when creating the Cocoa app? Do I have to >> explicitly allow FTP connections or something (I also have the firewall >> off)? Or is this a known issue with Cocoa+Python? >> >> Thanks for any help, >> rob >> >> -- >> http://robrohan.com >> http://twitter.com/robrohan >> > > > > -- > http://robrohan.com > http://twitter.com/robrohan > -- http://robrohan.com http://twitter.com/robrohan |
From: Rob <rob...@gm...> - 2009-09-08 01:06:27
|
One more bit of information: if I call the threaded bit with: worker.run() instead of worker.start() the FTP works as I want it, but it hangs the UI while doing the transfer. On Tue, Sep 8, 2009 at 10:49 AM, Rob <rob...@gm...> wrote: > My apologies if this has already been discussed / answered, but I couldn't > figure out how to search the archives. > I am writing a Cocoa based FTP uploading application using ftplib and > threading and I've hit a bit of a snag. I am sure it is something I am > doing wrong, but I wanted to check to see if I am way off. > > What appears to be happening is when I run the application within the Cocoa > GUI the FTP uploading part hangs when it tries to do the upload (staring > it's own thread I am assuming). I am guessing it's a "thread in a thread" > issue? (total guess obviously) > > When I run the threaded library directly from __main__ on the command line, > with FTP set to debug I get the following: > > *cmd* 'TYPE I' > *put* 'TYPE I\r\n' > *get* '200 Type set to I\r\n' > *resp* '200 Type set to I' > *cmd* 'PASV' > *put* 'PASV\r\n' > *get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)\r\n' > *resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)' > *cmd* 'STOR TestFile.mov' > *put* 'STOR TestFile.mov\r\n' > *get* '150 Connection accepted\r\n' > *resp* '150 Connection accepted' > *get* '226 Transfer OK\r\n' > *resp* '226 Transfer OK' > *cmd* 'QUIT' > *put* 'QUIT\r\n' > *get* '221 Goodbye\r\n' > *resp* '221 Goodbye' > Done. > > However when I run the same code within Cocoa I get the following: > > **cmd* 'TYPE I'* > > **put* 'TYPE I\r\n'* > > **get* '200 Type set to I\r\n'* > > **resp* '200 Type set to I'* > > **cmd* 'PASV'* > > **put* 'PASV\r\n'* > > **get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)\r\n'* > > **resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)'* > > And it just hangs there. It never gets to the next line. > > The library that does this is a threaded class: class FTPFile(Thread): > that just runs a typical ftp connection and upload in the run method: > > def run(self): > > ftp = FTP( > > self.config.server, > > self.config.username, > > self.config.password) > > etc, etc > > I can FTP via the command line "ftp" application, and, like I said, when I > run the library directly so I don't think it's a server problem. Is there > something I may have missed when creating the Cocoa app? Do I have to > explicitly allow FTP connections or something (I also have the firewall > off)? Or is this a known issue with Cocoa+Python? > > Thanks for any help, > rob > > -- > http://robrohan.com > http://twitter.com/robrohan > -- http://robrohan.com http://twitter.com/robrohan |
From: Rob <rob...@gm...> - 2009-09-08 00:49:38
|
My apologies if this has already been discussed / answered, but I couldn't figure out how to search the archives. I am writing a Cocoa based FTP uploading application using ftplib and threading and I've hit a bit of a snag. I am sure it is something I am doing wrong, but I wanted to check to see if I am way off. What appears to be happening is when I run the application within the Cocoa GUI the FTP uploading part hangs when it tries to do the upload (staring it's own thread I am assuming). I am guessing it's a "thread in a thread" issue? (total guess obviously) When I run the threaded library directly from __main__ on the command line, with FTP set to debug I get the following: *cmd* 'TYPE I' *put* 'TYPE I\r\n' *get* '200 Type set to I\r\n' *resp* '200 Type set to I' *cmd* 'PASV' *put* 'PASV\r\n' *get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)\r\n' *resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,3)' *cmd* 'STOR TestFile.mov' *put* 'STOR TestFile.mov\r\n' *get* '150 Connection accepted\r\n' *resp* '150 Connection accepted' *get* '226 Transfer OK\r\n' *resp* '226 Transfer OK' *cmd* 'QUIT' *put* 'QUIT\r\n' *get* '221 Goodbye\r\n' *resp* '221 Goodbye' Done. However when I run the same code within Cocoa I get the following: **cmd* 'TYPE I'* **put* 'TYPE I\r\n'* **get* '200 Type set to I\r\n'* **resp* '200 Type set to I'* **cmd* 'PASV'* **put* 'PASV\r\n'* **get* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)\r\n'* **resp* '227 Entering Passive Mode (xxx,xxx,xxx,212,4,4)'* And it just hangs there. It never gets to the next line. The library that does this is a threaded class: class FTPFile(Thread): that just runs a typical ftp connection and upload in the run method: def run(self): ftp = FTP( self.config.server, self.config.username, self.config.password) etc, etc I can FTP via the command line "ftp" application, and, like I said, when I run the library directly so I don't think it's a server problem. Is there something I may have missed when creating the Cocoa app? Do I have to explicitly allow FTP connections or something (I also have the firewall off)? Or is this a known issue with Cocoa+Python? Thanks for any help, rob -- http://robrohan.com http://twitter.com/robrohan |
From: Mani G. <ma...@tu...> - 2009-09-07 02:41:19
|
Here's what I did: 1) Copy all the Python templates from an installation of the previous Xcode to a folder "PythonApplications" 2) zip up this folder 3) Copy this to "~/Library/Application Support/Developer/Shared/Xcode/Project Templates" and unzip Here's my zip file so you can skip steps 1&2: http://bit.ly/150NUx It works for me, let us know how it goes. Cheers, Mani On Fri, Sep 4, 2009 at 4:15 PM, Ronald Oussoren<ron...@ma...> wrote: > The templates are only in the repository. Until now we didn't have to > release them seperately. > > Ronald > > > > On 4 sep 2009, at 20:29, Nicholas Cole <nic...@gm...> wrote: > >> On Fri, Sep 4, 2009 at 2:21 PM, Nicholas >> Cole<nic...@gm...> wrote: >>> I've just upgraded to Snow Leopard and installed the new Xcode, and >>> the "New Project" window doesn't seem to list a pyobc template >>> anywhere. Have they removed it, or is it hiding somewhere? >> >> Ah! Just found this thread: >> >> http://www.cocoabuilder.com/archive/message/xcode/2009/9/1/30260 >> >> Which says that Apple have remove the Templates from xcode, and >> recommend downloading them from the pyobj website. >> >> What is the recommended way to install them, or do I need to download >> the whole release? >> >> Best wishes, >> >> Nicholas >> >> --- >> --- >> --- >> --------------------------------------------------------------------- >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and >> focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > -- Mani Ghasemlou, Team Lead, Tungle w. +1.514.678.9181 m.+1.514.839.6264 Accelerate your calendar. Get Tungle at www.tungle.com. - - - - - This e-mail is privileged, confidential, and subject to copyright. Any unauthorized use or disclosure is prohibited. |
From: Ronald O. <ron...@ma...> - 2009-09-04 20:16:01
|
The templates are only in the repository. Until now we didn't have to release them seperately. Ronald On 4 sep 2009, at 20:29, Nicholas Cole <nic...@gm...> wrote: > On Fri, Sep 4, 2009 at 2:21 PM, Nicholas > Cole<nic...@gm...> wrote: >> I've just upgraded to Snow Leopard and installed the new Xcode, and >> the "New Project" window doesn't seem to list a pyobc template >> anywhere. Have they removed it, or is it hiding somewhere? > > Ah! Just found this thread: > > http://www.cocoabuilder.com/archive/message/xcode/2009/9/1/30260 > > Which says that Apple have remove the Templates from xcode, and > recommend downloading them from the pyobj website. > > What is the recommended way to install them, or do I need to download > the whole release? > > Best wishes, > > Nicholas > > --- > --- > --- > --------------------------------------------------------------------- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Nicholas C. <nic...@gm...> - 2009-09-04 18:29:26
|
On Fri, Sep 4, 2009 at 2:21 PM, Nicholas Cole<nic...@gm...> wrote: > I've just upgraded to Snow Leopard and installed the new Xcode, and > the "New Project" window doesn't seem to list a pyobc template > anywhere. Have they removed it, or is it hiding somewhere? Ah! Just found this thread: http://www.cocoabuilder.com/archive/message/xcode/2009/9/1/30260 Which says that Apple have remove the Templates from xcode, and recommend downloading them from the pyobj website. What is the recommended way to install them, or do I need to download the whole release? Best wishes, Nicholas |
From: Nicholas C. <nic...@gm...> - 2009-09-04 18:22:05
|
I've just upgraded to Snow Leopard and installed the new Xcode, and the "New Project" window doesn't seem to list a pyobc template anywhere. Have they removed it, or is it hiding somewhere? Best, Nicholas |
From: Mani G. <ma...@tu...> - 2009-09-01 14:07:46
|
On Tue, Sep 1, 2009 at 2:26 AM, Ronald Oussoren<ron...@ma...> wrote: > > On 1 Sep, 2009, at 6:23, Jason Foreman wrote: > >> On Aug 31, 2009, at 10:12 PM, Mani Ghasemlou wrote: >>> >>> I have an NSImageView, whose Hidden state is bound to a variable of my >>> app delegate. Clicking the "Show" button sets this value to False, and >>> "Hide" sets this value to True. >>> >>> Using Snow Leopard, the NSImageView's Hidden state does not change >>> when clicking these buttons. Using Leopard, the image shows and hides >>> itself depending on the button pressed. >>> >>> Can someone help me understand what I might be doing wrong? >> >> >> I'm sure someone with more PyObjC experience can give you a better answer, >> but here's my findings: >> >> There seems to be an issue with the way you initialize your app delegate >> and KVC/KVO. If you change your calls like "self.hideComputer = False" to >> "self.setValue_forKey_(False, 'hideComputer')" it starts working. >> Similarly, you can override the app delegate's init method, and this seems >> to setup KVC correctly for the hideComputer field: >> >> class BindingsUITestAppDelegate(NSObject): >> # hideComputer = ivar('hideComputer') >> def init(self): >> self.hideComputer = False >> return self >> .... etc >> >> >> I don't have any idea why this is, and am anxious myself to hear an >> explanation from the gurus. But in the meantime this might be a suitable >> workaround for you. > > This will be fixed in the next release of PyObjC. A collegue ran into the > same issue a while back, and it turns out that the machinery that should > ensure that the right KVO methods are called didn't work properly anymore. > > There are two workarounds for this: > 1) Use setValue_forKey_ (or self._.hideComputer = False) > 2) Explicitly call willChangeValueForKey_ and didChangeValueForKey_ > > I haven't committed the proper fix because the fix is in my SL tree and I > haven't had time after the SL release to actually commit the code. The > commit, and the next PyObjC 2.2 beta release, will happen sometime this week > (the release will probably be done in the weekend). > > Ronald >> >> >> Jason >> >> >> Gentlemen, thank you for the quick replies. I will go ahead and implement the workaround. Regards, Mani |
From: Ronald O. <ron...@ma...> - 2009-09-01 08:34:22
|
On 1 Sep, 2009, at 10:20, James R Eagan wrote: > Hi Ronald, > > I've taken a quick scan of the document and made some comments > inline, prefixed with "JRE:" at the beginning of a paragraph. > (Also, in case it ends up evolving into official documentation, I've > corrected a couple of spelling mistakes, too (grep for "(sp)").) > > Overall, I really like the idea. I've only suggested a couple of > minor tweaks and nits. > > Also, does "kvo_property" make the most sense as a name, since it > seems to me the KVO-compatibility, while the primary impetus for > this feature, is actually a side-effect. Really we're just talking > about objc properties. But obj.property won't work for obvious > reasons, and I like objc.objc_property even less. objc.property would work, but could be confusing (especially when people do 'from objc import *'). W.r.t. your comments in the document: * name is the first argument to kvo_property to be consistent with the definition of objc.ivar. I'll update the document to mention that the intended use is to always use keyword arguments, although that might not be enforceable. * I'm not to happy about the 'rw' argument myself, but like the open- style mode string even less. I might change this to a readonly argument, defaulting to False, because that way we stay closer to the objc interface: @property(readonly) foo; * I like the 'mutableCopy' variation, although I'll have to think about a proper interface for this. This won't add too much complexity to the implementation, I'll have to implement the setter method anyway. * I don't understand you question about dynamicly detecting the defining class. BTW. I'm not 100% sure that the set of decorator attributes is complete, I'm pretty sure that I came up with an additional one after writing the document but cannot remember that now :-( Ronald > > Please take everything with a grain of salt. :-) > > Cheers, > James > > <25properties-jre.txt> > > Le 1 sept. 2009 à 08:36, Ronald Oussoren a écrit : > >> Hi, >> >> A while back I mentioned that it should be possible to add code to >> PyObjC to make working with KVO properties easier. In the long run >> this should enable using all Objective-C properties using regular >> attribute access rather than using getter/setter methods. >> >> I've attached a document that describes the interface for this and >> I'm interested to know if the interface is sane and usable. I don't >> know when I'll get around to actually implement this though, and >> the interface might need to be changed when I actually start >> working on the implementation and testcases. >> >> Ronald >> >> >> < >> 25properties >> .txt >> > >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports >> 2008 30-Day >> trial. Simplify your report design, integration and deployment - >> and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
From: James R E. <Jam...@lr...> - 2009-09-01 08:21:06
|
Hi Ronald, I've taken a quick scan of the document and made some comments inline, prefixed with "JRE:" at the beginning of a paragraph. (Also, in case it ends up evolving into official documentation, I've corrected a couple of spelling mistakes, too (grep for "(sp)").) Overall, I really like the idea. I've only suggested a couple of minor tweaks and nits. Also, does "kvo_property" make the most sense as a name, since it seems to me the KVO-compatibility, while the primary impetus for this feature, is actually a side-effect. Really we're just talking about objc properties. But obj.property won't work for obvious reasons, and I like objc.objc_property even less. Please take everything with a grain of salt. :-) Cheers, James |
From: Ronald O. <ron...@ma...> - 2009-09-01 06:37:02
|
Hi, A while back I mentioned that it should be possible to add code to PyObjC to make working with KVO properties easier. In the long run this should enable using all Objective-C properties using regular attribute access rather than using getter/setter methods. I've attached a document that describes the interface for this and I'm interested to know if the interface is sane and usable. I don't know when I'll get around to actually implement this though, and the interface might need to be changed when I actually start working on the implementation and testcases. Ronald |
From: Ronald O. <ron...@ma...> - 2009-09-01 06:26:42
|
On 1 Sep, 2009, at 6:23, Jason Foreman wrote: > On Aug 31, 2009, at 10:12 PM, Mani Ghasemlou wrote: >> I have an NSImageView, whose Hidden state is bound to a variable of >> my >> app delegate. Clicking the "Show" button sets this value to False, >> and >> "Hide" sets this value to True. >> >> Using Snow Leopard, the NSImageView's Hidden state does not change >> when clicking these buttons. Using Leopard, the image shows and hides >> itself depending on the button pressed. >> >> Can someone help me understand what I might be doing wrong? > > > I'm sure someone with more PyObjC experience can give you a better > answer, but here's my findings: > > There seems to be an issue with the way you initialize your app > delegate and KVC/KVO. If you change your calls like > "self.hideComputer = False" to "self.setValue_forKey_(False, > 'hideComputer')" it starts working. Similarly, you can override the > app delegate's init method, and this seems to setup KVC correctly > for the hideComputer field: > > class BindingsUITestAppDelegate(NSObject): > # hideComputer = ivar('hideComputer') > def init(self): > self.hideComputer = False > return self > .... etc > > > I don't have any idea why this is, and am anxious myself to hear an > explanation from the gurus. But in the meantime this might be a > suitable workaround for you. This will be fixed in the next release of PyObjC. A collegue ran into the same issue a while back, and it turns out that the machinery that should ensure that the right KVO methods are called didn't work properly anymore. There are two workarounds for this: 1) Use setValue_forKey_ (or self._.hideComputer = False) 2) Explicitly call willChangeValueForKey_ and didChangeValueForKey_ I haven't committed the proper fix because the fix is in my SL tree and I haven't had time after the SL release to actually commit the code. The commit, and the next PyObjC 2.2 beta release, will happen sometime this week (the release will probably be done in the weekend). Ronald > > > Jason > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Jason F. <ja...@th...> - 2009-09-01 04:50:15
|
On Aug 31, 2009, at 10:12 PM, Mani Ghasemlou wrote: > I have an NSImageView, whose Hidden state is bound to a variable of my > app delegate. Clicking the "Show" button sets this value to False, and > "Hide" sets this value to True. > > Using Snow Leopard, the NSImageView's Hidden state does not change > when clicking these buttons. Using Leopard, the image shows and hides > itself depending on the button pressed. > > Can someone help me understand what I might be doing wrong? I'm sure someone with more PyObjC experience can give you a better answer, but here's my findings: There seems to be an issue with the way you initialize your app delegate and KVC/KVO. If you change your calls like "self.hideComputer = False" to "self.setValue_forKey_(False, 'hideComputer')" it starts working. Similarly, you can override the app delegate's init method, and this seems to setup KVC correctly for the hideComputer field: class BindingsUITestAppDelegate(NSObject): # hideComputer = ivar('hideComputer') def init(self): self.hideComputer = False return self .... etc I don't have any idea why this is, and am anxious myself to hear an explanation from the gurus. But in the meantime this might be a suitable workaround for you. Jason |
From: Mani G. <ma...@tu...> - 2009-09-01 04:17:53
|
Hi all, I've attached a very simple Xcode project, that works in Leopard (PyObjC 2.0) but does not work properly in Snow Leopard (PyObjC 2.2b3). I have an NSImageView, whose Hidden state is bound to a variable of my app delegate. Clicking the "Show" button sets this value to False, and "Hide" sets this value to True. Using Snow Leopard, the NSImageView's Hidden state does not change when clicking these buttons. Using Leopard, the image shows and hides itself depending on the button pressed. Can someone help me understand what I might be doing wrong? Thanks very much, Mani |
From: Mani G. <ma...@tu...> - 2009-09-01 03:56:18
|
On Mon, Aug 31, 2009 at 11:12 PM, Mani Ghasemlou<ma...@tu...> wrote: > Hi all, > > I've attached a very simple Xcode project, that works in Leopard > (PyObjC 2.0) but does not work properly in Snow Leopard (PyObjC > 2.2b3). > > I have an NSImageView, whose Hidden state is bound to a variable of my > app delegate. Clicking the "Show" button sets this value to False, and > "Hide" sets this value to True. > > Using Snow Leopard, the NSImageView's Hidden state does not change > when clicking these buttons. Using Leopard, the image shows and hides > itself depending on the button pressed. > > Can someone help me understand what I might be doing wrong? > > Thanks very much, > Mani > Had trouble attaching the file, here is a direct link: http://bit.ly/3pIgOW Regards, Mani |
From: Mani G. <ma...@tu...> - 2009-08-31 21:46:49
|
The host machine is using 2.2b3 (ships with Snow Leopard), and the machine the app is built on is using 2.0 (ships with Leopard). I've built an app that does a simple connect/disconnect to Sync Service, and my issue did not reproduce on Snow Leopard. So, there is more digging for me to do -- there is more I will do to match the configuration of my app that is failing. Hopefully this means that the issue is in my code and not in PyObjC and/or SyncServices. Thank you, Mani On Mon, Aug 31, 2009 at 4:55 PM, Aahz<aa...@py...> wrote: > On Mon, Aug 31, 2009, Mani Ghasemlou wrote: >> >> I have some code that stopped working with Snow Leopard. I am >> investigating the issue now to find out whether it is a problem with >> my code, or if something has changed in PyObjc and/or Sync Services >> with Snow Leopard. >> >> I am getting the following error: >> >> error: ISyncServerUnavailableException - Lost connection to the sync >> server: NSInvalidReceivePortException: connection went invalid while >> waiting for a reply ((null)) > > What version of PyObjC? > -- > Aahz (aa...@py...) <*> http://www.pythoncraft.com/ > > "I support family values -- Addams family values" --www.nancybuttons.com > -- Mani Ghasemlou, Team Lead, Tungle w. +1.514.678.9181 m.+1.514.839.6264 Accelerate your calendar. Get Tungle at www.tungle.com. - - - - - This e-mail is privileged, confidential, and subject to copyright. Any unauthorized use or disclosure is prohibited. |
From: Aahz <aa...@py...> - 2009-08-31 20:55:46
|
On Mon, Aug 31, 2009, Mani Ghasemlou wrote: > > I have some code that stopped working with Snow Leopard. I am > investigating the issue now to find out whether it is a problem with > my code, or if something has changed in PyObjc and/or Sync Services > with Snow Leopard. > > I am getting the following error: > > error: ISyncServerUnavailableException - Lost connection to the sync > server: NSInvalidReceivePortException: connection went invalid while > waiting for a reply ((null)) What version of PyObjC? -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "I support family values -- Addams family values" --www.nancybuttons.com |
From: Mani G. <ma...@tu...> - 2009-08-31 20:05:58
|
Hi all, I have some code that stopped working with Snow Leopard. I am investigating the issue now to find out whether it is a problem with my code, or if something has changed in PyObjc and/or Sync Services with Snow Leopard. I am getting the following error: error: ISyncServerUnavailableException - Lost connection to the sync server: NSInvalidReceivePortException: connection went invalid while waiting for a reply ((null)) When calling the function: "ISyncSession.beginSessionWithClient_entityNames_beforeDate_" The code in question works consistently with 10.5.x. Does anybody have any ideas with regards to this? I will be putting together a simple Xcode project to demonstrate the error, but for now was hoping somebody would know what is going on here. TIA & Kind regards, Mani |
From: Jofell G. <jo...@xa...> - 2009-08-22 02:11:06
|
I dunno if this has already been asked before (SF's mailing list search is non-existing). I've been loving PyObjC for the past 6 months until Snow Leopard's news of release came out (and so we need to ensure we're coming out with Snow Leopard). I'm just curious if and when will SL support be. I'm currently doing workarounds especially now that I'm seeing a bunch of deprecated stuff from the build logs. Or maybe I could help in any way I could? Thanks a lot, and wish you guys the best of luck for your project. |
From: Ronald O. <ron...@ma...> - 2009-08-11 14:43:49
|
On 11 Aug, 2009, at 14:41, Alexander Mail wrote: > Hi, > I build a simple project to manage all my Application's Serials. I > write it in Xcode 3.1.3 > with Python(PyObjC) and pysqlite2. > But I have this problem. If I run my application on my develop > system, all run perfectly. > But if I run my application on a new OS, (the same OS 10.5), but > without Xcode, my > application does not work. > I tried to implement in my application pysqlite2, but I have the > same result. > So what i need to do for distributing my pyobjc application? You need to add "logic" to your Xcode project that will copy all required Python files into the application bundle, such as by using an shell-script phase. An alternative is to use py2app to automaticly copy the required files, but that doesn't play nice with Xcode at the moment. Ronald |
From: Ronald O. <ron...@ma...> - 2009-08-11 14:42:53
|
On 11 Aug, 2009, at 13:43, James R Eagan wrote: > Hi Dan, > > I actually use objc.inject for a few projects, and it's a great > debugging tool. I believe that your problem looks more like a bug > in the InjectInterpreter code rather than in the lower-level > objc.inject code (which works great!). In particular, try changing > line 365 of InjectInterpreterPlugin.py from NSAnyEventMask to > NSUIntegerMax. Objc.inject will go away in PyObjC 2.2. There are two reasons for that (as noted a while back): 1) objc.inject does not support 64-bit targets, and I don't have the time or inclination to try to add that support. Adding this requires low-level ABI hackery. 2) objc.inject doesn't really belong in PyObjC anyway, its functionality is orthogonal to the rest of PyObjC. > > Logically, the use of NSAnyEventMask is correct in the above code. > On the PyObjC side, however, it's a signed integer (at least in the > PyObjC that comes with Leopard) instead of an unsigned integer. > That's why NSUIntegerMax is functionally correct (even if logically > incorrect) here. As for why NSAnyEventMask is signed instead of > unsigned, that might be a bug in PyObjC. Maybe. > > >>> NSUIntegerMax > 4294967295L > >>> NSAnyEventMask > -1 > >>> struct.unpack('L', struct.pack('l', NSAnyEventMask))[0] # cast > to unsigned > 4294967295L Cocoa's header files are terribly confused about the semantics of 'enum' values. In particular, AFAIK the C standard says that enum's are basicly an alias for 'int' while the Cocoa header files assume that you can define unsigned or "long long" constants using enum definitions, e.g.: enum { NSAnyEventMask = 0xffffffffU }; The Cocoa headers seem to assume that 'NSAnyEventMask' is an unsigned value, while in reality this is a signed value as can be seen by compiling a test program like this: /* printtype.m */ #include <stdio.h> #import <Cocoa/Cocoa.h> int main(void) { printf("typestr: %s\n", @encode(__typeof__(NSAnyEventMask))); return 0; } /* EOF */ Luckily PyObjC knows about this problem and should automaticly do the right thing here, that is: it will automaticly perform the cast to unsigned where needed. Ronald > > Cheers! > James > > Le 29 juil. 09 à 18:18, Daniel Ashbrook a écrit : > >> Re: "does anyone use objc.inject" from a few months ago, I think I >> would like to. I'm hoping to get at the internals of a program and >> extract some hard-to-get-at information. However, trying the >> InjectInterpreter example code doesn't seem to work, so any hints >> would be appreciated. Doing: >> >> sudo python test.py 71755 >> >> (where 7155 is the pid of TextEdit) returns without comment, but >> prints to the system log: >> >> TextEdit[71755]: InjectInterpreterPlugin has encountered a fatal >> error, and will now terminate. >> TextEdit[71755]: An uncaught exception was raised during execution of >> the main script:^M^MSystemError: NULL result without error in >> PyObject_Call^M^MThis may mean that an unexpected error has occurred, >> or that you do not have all of the dependencies for this bundle. >> [0x0-0x48d48d].com.apple.TextEdit[71755]: Traceback (most recent call >> last): >> [0x0-0x48d48d].com.apple.TextEdit[71755]: File "/tmp/ >> InjectInterpreter/dist/InjectInterpreterPlugin.plugin/Contents/ >> Resources/__boot__.py", line 23, in <module> >> [0x0-0x48d48d].com.apple.TextEdit[71755]: >> _run('InjectInterpreterPlugin.py') >> [0x0-0x48d48d].com.apple.TextEdit[71755]: File "/tmp/ >> InjectInterpreter/dist/InjectInterpreterPlugin.plugin/Contents/ >> Resources/__boot__.py", line 20, in _run >> [0x0-0x48d48d].com.apple.TextEdit[71755]: execfile(path, >> globals(), globals()) >> [0x0-0x48d48d].com.apple.TextEdit[71755]: File "/tmp/ >> InjectInterpreter/dist/InjectInterpreterPlugin.plugin/Contents/ >> Resources/InjectInterpreterPlugin.py", line 187, in <module> >> [0x0-0x48d48d].com.apple.TextEdit[71755]: class >> PyInterpreter(NSTextView): >> [0x0-0x48d48d].com.apple.TextEdit[71755]: SystemError: NULL result >> without error in PyObject_Call >> >> Any hints? >> >> Thanks, >> >> >> dan >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports >> 2008 30-Day >> trial. Simplify your report design, integration and deployment - >> and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Alexander M. <ale...@gm...> - 2009-08-11 13:48:13
|
Thanks for you answer. Do you have documentation about the first method? I'm new in PyObjC/ Cocoa development! Thank a lot! Marco Il giorno 11/ago/09, alle ore 15:43, Ronald Oussoren ha scritto: > > On 11 Aug, 2009, at 14:41, Alexander Mail wrote: > >> Hi, I build a simple project to manage all my Application's >> Serials. I write it in Xcode 3.1.3 with Python(PyObjC) and >> pysqlite2. But I have this problem. If I run my application on my >> develop system, all run perfectly. But if I run my application on a >> new OS, (the same OS 10.5), but without Xcode, my application does >> not work. I tried to implement in my application pysqlite2, but I >> have the same result. So what i need to do for distributing my >> pyobjc application? > > You need to add "logic" to your Xcode project that will copy all > required Python files into the application bundle, such as by using > an shell-script phase. > > An alternative is to use py2app to automaticly copy the required > files, but that doesn't play nice with Xcode at the moment. > > Ronald |
From: Alexander M. <ale...@gm...> - 2009-08-11 12:41:40
|
Hi, I build a simple project to manage all my Application's Serials. I write it in Xcode 3.1.3 with Python(PyObjC) and pysqlite2. But I have this problem. If I run my application on my develop system, all run perfectly. But if I run my application on a new OS, (the same OS 10.5), but without Xcode, my application does not work. I tried to implement in my application pysqlite2, but I have the same result. So what i need to do for distributing my pyobjc application? Thanks. Marco |