pyobjc-dev Mailing List for PyObjC (Page 54)
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
(1) |
Nov
|
Dec
|
|
From: Ian B. <ian...@ya...> - 2009-02-19 18:25:23
|
I recently upgraded to Leopard and XCode3 and I'm in the process of porting my main pyObjC/py2app project to a python-cocoa project in XCode. I have a few questions: 1. It seems like a python-cocoa project is reliant on the user's installation of python... is this correct? Is their a way to make a self contained bundle that includes it's own python installation. I'm actually fine with using the current apple installation of python with Leopard, but I'm worried about compatibility issues. What is the difference between a python-cocoa project and a pyObjc project in XCode now? 2. My understanding is that we define an IBOutlet as a class attribute and then the @IBAction decorator provides access to these outlets in the action methods name space, is this correct? Does this necessarily prevent access to outlets in non action methods such as "awakeFromNib", or am I missing something entirely here :) 3. Previously I had been using a combination of XCode and Idle to work on my projects. I mainly debug by printing messages to the console. If my goal is just to work with XCode or another integrated developement environment, what is the best method to develop and debug python cocoa projects and to get access to the python terminal from time to time. Thanks in advance for your help. Ian Bloom |
|
From: Mani G. <ma...@tu...> - 2009-02-19 15:29:11
|
Ok, I'll put together some simplified code and post my results as soon as I can (might be a couple days). In the meantime, here is the protocol in question: ISyncSessionDriverDataSource (http://developer.apple.com/documentation/Cocoa/Reference/ISyncSessionDriverDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intf/ISyncSessionDriverDataSource) Kind regards, Mani On Thu, Feb 19, 2009 at 2:11 AM, Ronald Oussoren <ron...@ma...> wrote: > > On 19 Feb, 2009, at 5:16, Mani Ghasemlou wrote: > >> Thanks so much. Then, there must be something wrong with my code, >> because I keep getting a crash when hitting this code. This however >> rules out that my overall approach is wrong. > > Can you reproduce your crash in a smaller program? That would allow us to > look at the code and could help pintpoint the issue (either something in > your code or a bug in PyObjC). > > Is the method your writing overriding an existing method, or implementing an > informal protocol? PyObjC cannot deduce the right signature for methods > with output arguments without that information. An easy way to check if > that's your problem is to add some decoration[1] to your code that > explicitly sets the signature: > > def returnIntWithError_(self, outError): > pass # body goes here > returnIntWithError_ = objc.selector(returnIntWithError_, > signature='@@:o^@') > > Ronald > > [1] the reason for this strange formulation is that I wanted to write "a > decorator", but noticed that the required decorator isn't actually part of > PyObjC yet. > >> >> >> Kind regards, >> Mani >> >> On Wed, Feb 18, 2009 at 4:17 PM, Ronald Oussoren <ron...@ma...> >> wrote: >>> >>> Hi, >>> >>> You're approach is correct. >>> >>>>> def returnIntWithError_(self, outError): >>>>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1', >>>>> objc.nil) >>>>> myReturnVal = 1 >>>>> return myReturnVal, myError >>>> >>> >>> As an optimization you could check if "outError is objc.NULL", if it is >>> the >>> caller isn't interested in the error value and you could return >>> (myReturnVal, objc.NULL) instead of (myReturnVal, myError). That's not >>> really an issue here, but could help when it is hard to calculate the >>> value >>> of the output argument. >>> >>> BTW. Use "None" instead of "objc.nil", both have the same value and >>> "objc.nil" is basicly only present to make it easier to translate ObjC >>> code >>> into Python. The same is true for objc.YES and objc.NO, those are aliases >>> for True and False. >>> >>> Ronald >>> >>> >>> On 17 Feb, 2009, at 20:51, Mani Ghasemlou wrote: >>> >>>> Just wanted to raise this question again, as I still haven't found a >>>> solution. >>>> >>>> I've posted the same question on Cocoa-dev, also with no response: >>>> http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229316 >>>> >>>> Would greatly appreciate any insights! >>>> >>>> Kind regards, >>>> Mani >>>> >>>> On Mon, Feb 2, 2009 at 9:34 AM, Mani Ghasemlou <ma...@tu...> wrote: >>>>> >>>>> Hi all, >>>>> >>>>> From what I understand of the PyObjc documentation, "out" pointer >>>>> variables (such as "NSError **outError") are actually appended to the >>>>> list of return values for a bridge function. >>>>> >>>>> For example: >>>>> >>>>> int returnIntWithError: NSError **outError >>>>> >>>>> from Python would be invoked as: >>>>> >>>>> returned_int, returned_error = returnIntWithError_(None) >>>>> >>>>> I hope that my understanding of the above is correct. >>>>> >>>>> Now, my real question is to extend the above concept to the Python >>>>> side, when we want to implement an informal protocol. Let's say the >>>>> protocol says that I have to implement the returnIntWithError: >>>>> function as described above. How do I implement this function? Is the >>>>> code below enough? >>>>> >>>>> def returnIntWithError_(self, outError): >>>>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1', >>>>> objc.nil) >>>>> myReturnVal = 1 >>>>> return myReturnVal, myError >>>>> >>>>> Note that I am completely ignoring the "outError" parameter. Does this >>>>> look kosher? >>>>> >>>>> Thanks in advance for any help! >>>>> >>>>> Cheers, >>>>> Mani >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Open Source Business Conference (OSBC), March 24-25, 2009, San >>>> Francisco, >>>> CA >>>> -OSBC tackles the biggest issue in open source: Open Sourcing the >>>> Enterprise >>>> -Strategies to boost innovation and cut costs with open source >>>> participation >>>> -Receive a $600 discount off the registration fee with the source code: >>>> SFAD >>>> http://p.sf.net/sfu/XcvMzF8H >>>> _______________________________________________ >>>> Pyobjc-dev mailing list >>>> Pyo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev >>> >>> > > |
|
From: Ronald O. <ron...@ma...> - 2009-02-19 07:12:13
|
On 19 Feb, 2009, at 5:16, Mani Ghasemlou wrote:
> Thanks so much. Then, there must be something wrong with my code,
> because I keep getting a crash when hitting this code. This however
> rules out that my overall approach is wrong.
Can you reproduce your crash in a smaller program? That would allow us
to look at the code and could help pintpoint the issue (either
something in your code or a bug in PyObjC).
Is the method your writing overriding an existing method, or
implementing an informal protocol? PyObjC cannot deduce the right
signature for methods with output arguments without that information.
An easy way to check if that's your problem is to add some
decoration[1] to your code that explicitly sets the signature:
def returnIntWithError_(self, outError):
pass # body goes here
returnIntWithError_ = objc.selector(returnIntWithError_,
signature='@@:o^@')
Ronald
[1] the reason for this strange formulation is that I wanted to write
"a decorator", but noticed that the required decorator isn't actually
part of PyObjC yet.
>
>
> Kind regards,
> Mani
>
> On Wed, Feb 18, 2009 at 4:17 PM, Ronald Oussoren <ron...@ma...
> > wrote:
>> Hi,
>>
>> You're approach is correct.
>>
>>>> def returnIntWithError_(self, outError):
>>>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1',
>>>> objc.nil)
>>>> myReturnVal = 1
>>>> return myReturnVal, myError
>>>
>>
>> As an optimization you could check if "outError is objc.NULL", if
>> it is the
>> caller isn't interested in the error value and you could return
>> (myReturnVal, objc.NULL) instead of (myReturnVal, myError).
>> That's not
>> really an issue here, but could help when it is hard to calculate
>> the value
>> of the output argument.
>>
>> BTW. Use "None" instead of "objc.nil", both have the same value and
>> "objc.nil" is basicly only present to make it easier to translate
>> ObjC code
>> into Python. The same is true for objc.YES and objc.NO, those are
>> aliases
>> for True and False.
>>
>> Ronald
>>
>>
>> On 17 Feb, 2009, at 20:51, Mani Ghasemlou wrote:
>>
>>> Just wanted to raise this question again, as I still haven't found a
>>> solution.
>>>
>>> I've posted the same question on Cocoa-dev, also with no response:
>>> http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229316
>>>
>>> Would greatly appreciate any insights!
>>>
>>> Kind regards,
>>> Mani
>>>
>>> On Mon, Feb 2, 2009 at 9:34 AM, Mani Ghasemlou <ma...@tu...>
>>> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> From what I understand of the PyObjc documentation, "out" pointer
>>>> variables (such as "NSError **outError") are actually appended to
>>>> the
>>>> list of return values for a bridge function.
>>>>
>>>> For example:
>>>>
>>>> int returnIntWithError: NSError **outError
>>>>
>>>> from Python would be invoked as:
>>>>
>>>> returned_int, returned_error = returnIntWithError_(None)
>>>>
>>>> I hope that my understanding of the above is correct.
>>>>
>>>> Now, my real question is to extend the above concept to the Python
>>>> side, when we want to implement an informal protocol. Let's say
>>>> the
>>>> protocol says that I have to implement the returnIntWithError:
>>>> function as described above. How do I implement this function? Is
>>>> the
>>>> code below enough?
>>>>
>>>> def returnIntWithError_(self, outError):
>>>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1',
>>>> objc.nil)
>>>> myReturnVal = 1
>>>> return myReturnVal, myError
>>>>
>>>> Note that I am completely ignoring the "outError" parameter. Does
>>>> this
>>>> look kosher?
>>>>
>>>> Thanks in advance for any help!
>>>>
>>>> Cheers,
>>>> Mani
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Open Source Business Conference (OSBC), March 24-25, 2009, San
>>> Francisco,
>>> CA
>>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>>> Enterprise
>>> -Strategies to boost innovation and cut costs with open source
>>> participation
>>> -Receive a $600 discount off the registration fee with the source
>>> code:
>>> SFAD
>>> http://p.sf.net/sfu/XcvMzF8H
>>> _______________________________________________
>>> Pyobjc-dev mailing list
>>> Pyo...@li...
>>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>>
>>
|
|
From: Mani G. <ma...@tu...> - 2009-02-19 04:16:44
|
Thanks so much. Then, there must be something wrong with my code,
because I keep getting a crash when hitting this code. This however
rules out that my overall approach is wrong.
Kind regards,
Mani
On Wed, Feb 18, 2009 at 4:17 PM, Ronald Oussoren <ron...@ma...> wrote:
> Hi,
>
> You're approach is correct.
>
>>> def returnIntWithError_(self, outError):
>>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1',
>>> objc.nil)
>>> myReturnVal = 1
>>> return myReturnVal, myError
>>
>
> As an optimization you could check if "outError is objc.NULL", if it is the
> caller isn't interested in the error value and you could return
> (myReturnVal, objc.NULL) instead of (myReturnVal, myError). That's not
> really an issue here, but could help when it is hard to calculate the value
> of the output argument.
>
> BTW. Use "None" instead of "objc.nil", both have the same value and
> "objc.nil" is basicly only present to make it easier to translate ObjC code
> into Python. The same is true for objc.YES and objc.NO, those are aliases
> for True and False.
>
> Ronald
>
>
> On 17 Feb, 2009, at 20:51, Mani Ghasemlou wrote:
>
>> Just wanted to raise this question again, as I still haven't found a
>> solution.
>>
>> I've posted the same question on Cocoa-dev, also with no response:
>> http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229316
>>
>> Would greatly appreciate any insights!
>>
>> Kind regards,
>> Mani
>>
>> On Mon, Feb 2, 2009 at 9:34 AM, Mani Ghasemlou <ma...@tu...> wrote:
>>>
>>> Hi all,
>>>
>>> From what I understand of the PyObjc documentation, "out" pointer
>>> variables (such as "NSError **outError") are actually appended to the
>>> list of return values for a bridge function.
>>>
>>> For example:
>>>
>>> int returnIntWithError: NSError **outError
>>>
>>> from Python would be invoked as:
>>>
>>> returned_int, returned_error = returnIntWithError_(None)
>>>
>>> I hope that my understanding of the above is correct.
>>>
>>> Now, my real question is to extend the above concept to the Python
>>> side, when we want to implement an informal protocol. Let's say the
>>> protocol says that I have to implement the returnIntWithError:
>>> function as described above. How do I implement this function? Is the
>>> code below enough?
>>>
>>> def returnIntWithError_(self, outError):
>>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1',
>>> objc.nil)
>>> myReturnVal = 1
>>> return myReturnVal, myError
>>>
>>> Note that I am completely ignoring the "outError" parameter. Does this
>>> look kosher?
>>>
>>> Thanks in advance for any help!
>>>
>>> Cheers,
>>> Mani
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Pyobjc-dev mailing list
>> Pyo...@li...
>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
>
|
|
From: Ronald O. <ron...@ma...> - 2009-02-18 21:18:05
|
Hi,
You're approach is correct.
>> def returnIntWithError_(self, outError):
>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1',
>> objc.nil)
>> myReturnVal = 1
>> return myReturnVal, myError
>
As an optimization you could check if "outError is objc.NULL", if it
is the caller isn't interested in the error value and you could return
(myReturnVal, objc.NULL) instead of (myReturnVal, myError). That's
not really an issue here, but could help when it is hard to calculate
the value of the output argument.
BTW. Use "None" instead of "objc.nil", both have the same value and
"objc.nil" is basicly only present to make it easier to translate ObjC
code into Python. The same is true for objc.YES and objc.NO, those are
aliases for True and False.
Ronald
On 17 Feb, 2009, at 20:51, Mani Ghasemlou wrote:
> Just wanted to raise this question again, as I still haven't found a
> solution.
>
> I've posted the same question on Cocoa-dev, also with no response:
> http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229316
>
> Would greatly appreciate any insights!
>
> Kind regards,
> Mani
>
> On Mon, Feb 2, 2009 at 9:34 AM, Mani Ghasemlou <ma...@tu...>
> wrote:
>> Hi all,
>>
>> From what I understand of the PyObjc documentation, "out" pointer
>> variables (such as "NSError **outError") are actually appended to the
>> list of return values for a bridge function.
>>
>> For example:
>>
>> int returnIntWithError: NSError **outError
>>
>> from Python would be invoked as:
>>
>> returned_int, returned_error = returnIntWithError_(None)
>>
>> I hope that my understanding of the above is correct.
>>
>> Now, my real question is to extend the above concept to the Python
>> side, when we want to implement an informal protocol. Let's say the
>> protocol says that I have to implement the returnIntWithError:
>> function as described above. How do I implement this function? Is the
>> code below enough?
>>
>> def returnIntWithError_(self, outError):
>> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1',
>> objc.nil)
>> myReturnVal = 1
>> return myReturnVal, myError
>>
>> Note that I am completely ignoring the "outError" parameter. Does
>> this
>> look kosher?
>>
>> Thanks in advance for any help!
>>
>> Cheers,
>> Mani
>>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source
> code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
|
|
From: Ronald O. <ron...@ma...> - 2009-02-18 20:20:37
|
On 18 Feb, 2009, at 10:12, Orestis Markou wrote: > The website doesn't reflect reality, I'm afraid. > > PyObjC is _bundled_ with Leopard, so if you haven't installed any > other Python you should be able to just import objc or Foundation and > things should work as expected. > > Development still goes on, from the commits I've seen Ronald is aiming > to have full test coverage of all the major frameworks for 10.5. I > think 10.4 support is somewhere there, but I'm not sure. I've no idea > about Python 3.0, but I would expect it to be far away for now. My current plan is to have test coverage for the API bindings for the frameworks in 10.5 before doing the next release. The reason for wanting to have those is that I've run into a number of occassions where the API bindings worked during beta releases and stopped working afterwards without anyone noticing. Having unittests ensures that this won't happen again in the future, and furthermore ensures that the bridge is actually capable of wrapping all these API's. As you might expect this is rather boring work, which explains the rather slow progress. I'm getting closer to my goal though. To be honest, a 10.4 port does not have a high priority at the moment. That doesn't mean PyObjC won't work on 10.4, last time I checked pyobjc-core did compile on 10.4 and actually passed it's tests there. Support for Python 3.x is on my todo list but is non-trivial to achieve. PyObjC contains a large amount of pretty low-level C code, getting the details w.r.t. to the changes in 3.0 right is not easy. I have looked into a Python 3.x port and this should be fairly easy, but it's still a couple of days work. I'm not planning to work on that before the next release of PyObjC, that's way too long overdue as it is. Ronald > > > Orestis > -- > or...@or... > http://orestis.gr/ > > > > > On 18 Feb 2009, at 04:57, Darren Minifie wrote: > >> Hi Everyone >> >> I was thinking of giving PyObjC another go in a future project I'm >> working on. I noticed from the website that things are starting to >> get a bit dated. Is Leopard 10.5 supported? How about plans for >> Python 3.0? Thanks for an update. >> >> Darren >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San >> Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the >> Enterprise >> -Strategies to boost innovation and cut costs with open source >> participation >> -Receive a $600 discount off the registration fee with the source >> code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: David B. <db3...@gm...> - 2009-02-18 19:37:24
|
Orestis Markou <or...@or...> writes: > Development still goes on, from the commits I've seen Ronald is aiming > to have full test coverage of all the major frameworks for 10.5. I > think 10.4 support is somewhere there, but I'm not sure. I've no idea > about Python 3.0, but I would expect it to be far away for now. For me the 10.4/10.5 divide (PyObjC 1.4 / PyObjC 2.x) has been a bit of a pain, so it may be something for the OP to be aware of. I don't have many spare OSX systems, so I've held off upgrading my main development machine to 10.5 so that I could keep it at 10.4 for building my application. I also chose a while back to block the 10.4 system update (so I'm still at 10.4.10), since it included an incompatible WebKit update and my app uses WebKit. I suspect if you're developing on 10.5 and aiming for 10.5 clients that things are also consistent, but crossing the divide still seems tricky. I've seen some mixed comments here about using a 10.5 system to build applications that are compatible with 10.4 (one reason I've opted not to upgrade my development box), particularly across the WebKit change. The latter may be less of an issue now than it was when the upgrade first came out, but I'm still not sure that all my users of the app have systems that have installed all the 10.4 upgrades. -- David |
|
From: Orestis M. <or...@or...> - 2009-02-18 09:13:03
|
The website doesn't reflect reality, I'm afraid. PyObjC is _bundled_ with Leopard, so if you haven't installed any other Python you should be able to just import objc or Foundation and things should work as expected. Development still goes on, from the commits I've seen Ronald is aiming to have full test coverage of all the major frameworks for 10.5. I think 10.4 support is somewhere there, but I'm not sure. I've no idea about Python 3.0, but I would expect it to be far away for now. Orestis -- or...@or... http://orestis.gr/ On 18 Feb 2009, at 04:57, Darren Minifie wrote: > Hi Everyone > > I was thinking of giving PyObjC another go in a future project I'm > working on. I noticed from the website that things are starting to > get a bit dated. Is Leopard 10.5 supported? How about plans for > Python 3.0? Thanks for an update. > > Darren > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Michael V. <m.v...@gm...> - 2009-02-18 09:12:06
|
Hi Darren, Leopard (10.5.x) has PyObjC on the system Python (2.5.1) by default, and Xcode has templates for PyObjC based projects. Works great! You can of course build / install a newer Python, but PyObjC isn't currently on Python 3.0 -mv On Tue, Feb 17, 2009 at 8:57 PM, Darren Minifie <min...@gm...> wrote: > Hi Everyone > > I was thinking of giving PyObjC another go in a future project I'm > working on. I noticed from the website that things are starting to > get a bit dated. Is Leopard 10.5 supported? How about plans for > Python 3.0? Thanks for an update. > > Darren > > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
|
From: Darren M. <min...@gm...> - 2009-02-18 04:57:26
|
Hi Everyone I was thinking of giving PyObjC another go in a future project I'm working on. I noticed from the website that things are starting to get a bit dated. Is Leopard 10.5 supported? How about plans for Python 3.0? Thanks for an update. Darren |
|
From: Orestis M. <or...@or...> - 2009-02-17 20:37:00
|
Hello, I'm afraid that I don't know the answer, but it seems to me that what you describe should be a valid approach - I mean that it seems like the most reasonable syntax for this job. I assume that you've tried it and it doesn't work. Could you share what the output is? Orestis -- or...@or... http://orestis.gr/ On 17 Feb 2009, at 19:51, Mani Ghasemlou wrote: > Just wanted to raise this question again, as I still haven't found a > solution. > > I've posted the same question on Cocoa-dev, also with no response: > http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229316 > > Would greatly appreciate any insights! > > Kind regards, > Mani > > On Mon, Feb 2, 2009 at 9:34 AM, Mani Ghasemlou <ma...@tu...> > wrote: >> Hi all, >> >> From what I understand of the PyObjc documentation, "out" pointer >> variables (such as "NSError **outError") are actually appended to the >> list of return values for a bridge function. >> >> For example: >> >> int returnIntWithError: NSError **outError >> >> from Python would be invoked as: >> >> returned_int, returned_error = returnIntWithError_(None) >> >> I hope that my understanding of the above is correct. >> >> Now, my real question is to extend the above concept to the Python >> side, when we want to implement an informal protocol. Let's say the >> protocol says that I have to implement the returnIntWithError: >> function as described above. How do I implement this function? Is the >> code below enough? >> >> def returnIntWithError_(self, outError): >> myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1', >> objc.nil) >> myReturnVal = 1 >> return myReturnVal, myError >> >> Note that I am completely ignoring the "outError" parameter. Does >> this >> look kosher? >> >> Thanks in advance for any help! >> >> Cheers, >> Mani >> > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Mani G. <ma...@tu...> - 2009-02-17 19:51:31
|
Just wanted to raise this question again, as I still haven't found a solution. I've posted the same question on Cocoa-dev, also with no response: http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229316 Would greatly appreciate any insights! Kind regards, Mani On Mon, Feb 2, 2009 at 9:34 AM, Mani Ghasemlou <ma...@tu...> wrote: > Hi all, > > From what I understand of the PyObjc documentation, "out" pointer > variables (such as "NSError **outError") are actually appended to the > list of return values for a bridge function. > > For example: > > int returnIntWithError: NSError **outError > > from Python would be invoked as: > > returned_int, returned_error = returnIntWithError_(None) > > I hope that my understanding of the above is correct. > > Now, my real question is to extend the above concept to the Python > side, when we want to implement an informal protocol. Let's say the > protocol says that I have to implement the returnIntWithError: > function as described above. How do I implement this function? Is the > code below enough? > > def returnIntWithError_(self, outError): > myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1', objc.nil) > myReturnVal = 1 > return myReturnVal, myError > > Note that I am completely ignoring the "outError" parameter. Does this > look kosher? > > Thanks in advance for any help! > > Cheers, > Mani > |
|
From: Will L. <le...@gm...> - 2009-02-14 00:16:33
|
I haven't personally done this, but it is possible to build against the 2.3 library and thus maintain backwards compatibility with system with 2.3 system Python. Or at least this blog entry suggests it is: http://www.dashingfalcon.com/blog-entry/2008/02/16/backwards-compatible-pyobjc-development-leopard -Will On Feb 13, 2009, at 7:14 PM, Greg Ewing wrote: > Red wrote: >> Is there a way to force it to use whatever Python framework is >> installed? > > Even if there were, it probably wouldn't be a good idea. > The ABI of the Python library can change from one version > of Python to another, so extensions are linked against a > particular version of it. > > -- > Greg > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Greg E. <gre...@ca...> - 2009-02-14 00:12:35
|
Red wrote: > Is there a way to force it to use whatever Python framework is > installed? Even if there were, it probably wouldn't be a good idea. The ABI of the Python library can change from one version of Python to another, so extensions are linked against a particular version of it. -- Greg |
|
From: Red <re...@pa...> - 2009-02-14 00:02:19
|
Fairly newbie here, but I'm having a similar problem to what David saw last October: David Eppstein wrote on 2008-10-05: ------------------------------------------------------- >If I have a PyObjC application built using XCode with the default >Python installation and default XCode templates under OS X version >10.5 (example: http://www.ics.uci.edu/~eppstein/LaTeX_Unicodifier.dmg.gz , >although I actually care about a more complex app I'm working on that >is not yet ready for public release), the built app does not include >any of the standard Python framework or libraries and will therefore >not run under earlier versions of the OS that did not come with PyObjC >preinstalled. Is there an easy way to convince XCode to make a more >universal application? It seems that under 10.5, the compiled app wants to look for Python 2.5. I have verified this by launching the app on a 10.4 system and looking at the crashlog. For the life of me, I cannot figure out how to get XCode to utilize the Python.Framework and not just the version 2.5 Python. Is there a way to force it to use whatever Python framework is installed? (I'm not doing anything fancy....so I could even go back as far as Python 2.3 and this app should still run). Anybody out there found a way to tweak the build settings? Thanks! |
|
From: Luc H. <lu...@ho...> - 2009-02-13 14:16:38
|
On 13 févr. 09, at 14:01, Armando Rivera wrote: > In ObjC, whenever you .alloc something, you're supposed to either > release it or set it to autorelease. Unless you're using GC, of > course. > > Is that the case with PyObjc also? No. PyObjC takes care of this for you, you don't have to retain or release. -- Luc Heinrich - lu...@ho... |
|
From: Armando R. <air...@gm...> - 2009-02-13 13:02:05
|
On Fri, Feb 13, 2009 at 3:35 AM, Luc Heinrich <lu...@ho...> wrote: > On 13 févr. 09, at 03:12, Armando Rivera wrote: > >> I'm trying to play an mp3 file use QTMovie's .play() method, and no >> matter what I've tried I only get approximately 2 seconds of output. >> Is there something that I'm missing? > > A run loop, like this for example: > <snip> Thank you, Luc. If I may, I have one more question: In ObjC, whenever you .alloc something, you're supposed to either release it or set it to autorelease. Unless you're using GC, of course. Is that the case with PyObjc also? The examples I've seen haven't done this, and I just want to be sure I'm not leaking memory. Again, thank you for the NSRunLoop tip! Armando Rivera. -- "Programming is like Poetry. Sometimes the words just escape you..." -me, to my manager. http://www.recursivemedia.net |
|
From: Luc H. <lu...@ho...> - 2009-02-13 08:55:46
|
On 13 févr. 09, at 03:12, Armando Rivera wrote:
> I'm trying to play an mp3 file use QTMovie's .play() method, and no
> matter what I've tried I only get approximately 2 seconds of output.
> Is there something that I'm missing?
A run loop, like this for example:
=======================
#!/usr/bin/env python
from QTKit import QTMovie
from AppKit import NSSound, NSRunLoop
from Foundation import NSDate
movie, error = QTMovie.movieWithFile_error_("Happy.mp3", None)
if movie is not None:
duration = movie.duration().timeValue / movie.duration().timeScale
print "QTMovie Media Length is %d Seconds." % duration
movie.play()
while movie.isPlaying():
NSRunLoop
.currentRunLoop().runUntilDate_(NSDate.dateWithTimeIntervalSinceNow_(1))
print movie.currentTime().timeValue /
movie.currentTime().timeScale
=======================
> If I uncomment the print
> movie.currentTime() call, I continue to receive the current position
> of the file, but no sound.
>
> Here is the code I'm trying:
>
> ================
> #!/usr/bin/env python
> from QTKit import QTMovie
> from AppKit import NSSound
>
> movie, error = QTMovie.movieWithFile_error_("Happy.mp3", None)
>
> if movie:
> print "QTMovie Media Length
> is",movie.duration().timeValue/movie.duration().timeScale,"Seconds."
> movie.play()
> while movie.isPlaying():
> # print movie.currentTime()
> pass
> else:
> print "Error Playing Media"
>
> #sound =
> NSSound.alloc().initWithContentsOfFile_byReference_("test.mp3", True)
> ##sound.retain()
>
> #if sound:
> # print "NSSound Media Length is",sound.duration(),"Seconds."
> # sound.setVolume_(100.0)
> # sound.play()
> # while sound.isPlaying():
> # print sound.currentTime()
> ================
>
> The commented section that uses NSSound works fine, and plays the mp3
> to the end.
>
> I need to use QTKit because I'll be generating clips from the source
> audio and exporting to new files.
>
> Thanks for any help.
>
> Armando Rivera
> --
> "Programming is like Poetry. Sometimes the words just escape you..."
> -me, to my manager.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source
> code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
|
|
From: Armando R. <air...@gm...> - 2009-02-13 02:12:24
|
I'm trying to play an mp3 file use QTMovie's .play() method, and no
matter what I've tried I only get approximately 2 seconds of output.
Is there something that I'm missing? If I uncomment the print
movie.currentTime() call, I continue to receive the current position
of the file, but no sound.
Here is the code I'm trying:
================
#!/usr/bin/env python
from QTKit import QTMovie
from AppKit import NSSound
movie, error = QTMovie.movieWithFile_error_("Happy.mp3", None)
if movie:
print "QTMovie Media Length
is",movie.duration().timeValue/movie.duration().timeScale,"Seconds."
movie.play()
while movie.isPlaying():
# print movie.currentTime()
pass
else:
print "Error Playing Media"
#sound = NSSound.alloc().initWithContentsOfFile_byReference_("test.mp3", True)
##sound.retain()
#if sound:
# print "NSSound Media Length is",sound.duration(),"Seconds."
# sound.setVolume_(100.0)
# sound.play()
# while sound.isPlaying():
# print sound.currentTime()
================
The commented section that uses NSSound works fine, and plays the mp3
to the end.
I need to use QTKit because I'll be generating clips from the source
audio and exporting to new files.
Thanks for any help.
Armando Rivera
--
"Programming is like Poetry. Sometimes the words just escape you..."
-me, to my manager.
|
|
From: Ronald O. <ron...@ma...> - 2009-02-03 14:50:50
|
I forgot to send this to the pyobjc-dev list as well (in case anyone here doesn't read the pythonmac-sig list) Begin forwarded message: > From: Ronald Oussoren <ron...@ma...> > Date: 3 February, 2009 14:27:58 GMT+01:00 > To: Pythonmac-sig mac <pyt...@py...> > Subject: [Pythonmac-SIG] MacPython sprint at PyCon'09? > > Hi, > > I'm going to Pycon this year and I'm wondering if anyone is > interested in doing a MacPython related sprint afterwards. Possible > topics: > > * Investigate OSX-integration issues (such as the "rocket icon" that > sometimes appears) > > * Get Py2app development going again > > * Packaging 3th-party extensions (especially those using non-system > C libraries) for OSX. That is, how to do the package collection on > pythonmac.org correctly. > > * PyObjC > > Ronald_______________________________________________ > Pythonmac-SIG maillist - Pyt...@py... > http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
From: Ronald O. <ron...@ma...> - 2009-02-03 13:14:42
|
This is short update on the current status of PyObjC 2.x. Development of PyObjC is still moving forward, although much slower than I'd like. The primary reason for the lack of progress is that I'm working on test coverage for the framework wrappers, which is necessary but very unrewarding work. I'm getting ever closer to finishing that task, and therefore closer to a release... The current status: Most frameworks now have full test coverage for API's defined in header files. That is, all functions defined in header files are called, as well as methods with difficult signatures (buffer arguments, in/out/inout arguments, ...). Furthermore constant definitions are checked as well. Adding these tests is timeconsuming, but necessary because it is the only way to know if the framework wrappers are actually working. While adding these tests I've fixed a number of bugs, both in the framework wrappers and the core. The major frameworks that don't have full test coverage yet are Cocoa, Quartz and WebKit. All of them are large and contain a lot of functionality that needs actual testing. Plans for the near future: I hope to finish the test coverage before PyCon'09. The next PyObjC (and the first one in a very long time) will be done when test coverage is finished. There is still a lot of work to do for releases beyond that: * All examples need to be tested and cleaned up. All references to PyObjCTools.AutoBaseClass should be removed from example code. * The documentation and website need some loving, most information is there but not in necessarily in a easily findable or comprehensible manner. * Py2app needs work as well. It should be way more egg-aware and should contain better hooks for adding functionality (such as a way to add "recipes" from external packages). * PyObjC 2.x should already support Tiger, but I'm not testing that support because I don't need it. I haven't even looked at supporting Snow Leopard yet. With some luck this only needs updated framework wrappers, and some support for new language features. Ronald |
|
From: Ronald O. <ron...@ma...> - 2009-02-03 13:00:29
|
On 19 Oct, 2008, at 1:44, Dav Clark wrote: > Hi there, > > I spent quite a bit of time scouring the internet for answers, and > there don't seem to be any... so now I put these to you: > > 1) The pyobjc website says Leopard users should install from svn > trunk. Why? What (bad) happens if I use pyobjc 1.4 + python 2.5.2 > (Framework, non-System) + Leopard (OSX 10.5.x)? Nobody has tested pyobjc 1.4 on Leopard. Furthermore bits of the framework wrapper (specifically the WebKit wrappers) don't compile on Leopard (and appearently not on recent Tiger releases either). > > > 2) Is there anything that's simply an amazing improvement in 2.0 (for > existing code that already works with 1.4)? 2.x contains various bugfixes and enhancements (see the NEWS file on the website). One of these days there will be an actual release, I'm slowly getting to the point where I'm happy with test coverage of the framework wrappers. Ronald |
|
From: Ronald O. <ron...@ma...> - 2009-02-03 12:56:30
|
On 13 Oct, 2008, at 4:13, Greg Ewing wrote: > Joe Strout wrote: > >> But whether this applies to IBOutlets, I >> have no idea -- I don't understand what they are or how they work. > > I think the IBOutlet is just a marker indicating > that the attribute in question is an outlet, and > it doesn't hold any state -- in which case sharing > it between instances is fine. I haven't read pyobjc-dev for a while (for various reasons). objc.IBOutlet and objc.ivar define fields in the Objective-C class and *must* be used at the class level. They basicly claim space in the memory layout of the ObjC instances and are somewhat comparible to the __slots__ attribute in pure Python classes. That is: class MyClass (NSObject): foo = objc.IBOutlet() bar = objc.ivar() This code results in an ObjC class that has two instance variables, "foo" and "bar", that can contain references to arbitrary object. The objc.IBOutlet is intented to be used from Interface builder and will automaticly show up in IB when you create an instance of the class there. Ronald > > > -- > Greg > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Ian B. <ia...@on...> - 2009-02-02 16:07:06
|
I've been having this exact problem, as I detailed on this list a month or so ago: http://tinyurl.com/admeub I found plenty of resources on calling an Objective-C function from Python that asks for an **NSError parameter, but no information about how to implement an Objective-C protocol in Python that handles an **NSError correctly. I persistently got "Uncaught system extension" errors, and have yet to find a solution. I sincerely hope you have more luck than I, and if you do find a solution, please share! Ian On Feb 2, 2009, at 6:34 AM, Mani Ghasemlou wrote: > Hi all, > >> From what I understand of the PyObjc documentation, "out" pointer > variables (such as "NSError **outError") are actually appended to the > list of return values for a bridge function. > > For example: > > int returnIntWithError: NSError **outError > > from Python would be invoked as: > > returned_int, returned_error = returnIntWithError_(None) > > I hope that my understanding of the above is correct. > > Now, my real question is to extend the above concept to the Python > side, when we want to implement an informal protocol. Let's say the > protocol says that I have to implement the returnIntWithError: > function as described above. How do I implement this function? Is the > code below enough? > > def returnIntWithError_(self, outError): > myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1', > objc.nil) > myReturnVal = 1 > return myReturnVal, myError > > Note that I am completely ignoring the "outError" parameter. Does this > look kosher? > > Thanks in advance for any help! > > Cheers, > Mani > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev —————————————————— Ian Beck ia...@on... Tagamac: simple mac tagging http://tagamac.com |
|
From: Mani G. <ma...@tu...> - 2009-02-02 14:59:16
|
Hi all,
>From what I understand of the PyObjc documentation, "out" pointer
variables (such as "NSError **outError") are actually appended to the
list of return values for a bridge function.
For example:
int returnIntWithError: NSError **outError
from Python would be invoked as:
returned_int, returned_error = returnIntWithError_(None)
I hope that my understanding of the above is correct.
Now, my real question is to extend the above concept to the Python
side, when we want to implement an informal protocol. Let's say the
protocol says that I have to implement the returnIntWithError:
function as described above. How do I implement this function? Is the
code below enough?
def returnIntWithError_(self, outError):
myError = NSError.errorWithDomain_code_userInfo_('myDomain', '1', objc.nil)
myReturnVal = 1
return myReturnVal, myError
Note that I am completely ignoring the "outError" parameter. Does this
look kosher?
Thanks in advance for any help!
Cheers,
Mani
|