pyobjc-dev Mailing List for PyObjC (Page 60)
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: SourceForge.net <no...@so...> - 2008-05-20 17:49:26
|
Bugs item #1968140, was opened at 2008-05-20 10:49 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1968140&group_id=14534 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: "from Foundation import *" breaks Python built-in "super" Initial Comment: Importing in this manner obviously rebinds the name "super" to something other than what it should be as it will always return: <objc.super object at 0x1e53378> rather than the actual parent class. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1968140&group_id=14534 |
|
From: Nicholas R. <nj...@ui...> - 2008-05-19 06:22:03
|
On May 18, 2008, at 11:46 AM, Orestis Markou wrote: > After some investigation, I've learned that nib files are now actually > compiled from xib files, which doesn't happen when I use py2app. > > What step am I missing? xib files are new in Leopard's Interface Builder 3; py2app probably hasn't been updated to work with them. You can use "ibtool foo.xib --compile foo.nib" to compile a nib from the command line as part of your build process, or probably easier, use "Save As" in Interface Builder to save a nib. IB3 works just fine with nibs as well as xib files. It would make sense for py2app to invoke ibtool for you, I guess. -- Nicholas Riley <nj...@ui...> | <http://www.uiuc.edu/ph/www/njriley> |
|
From: Ronald O. <ron...@ma...> - 2008-05-19 06:18:05
|
On 18 May, 2008, at 21:15, Orestis Markou wrote:
> Hi,
>
> I'm trying to bound an NSTableView to a list using an array
> controller. This works fine, as long as I don't mutate the list
> (list.append, for example).
I'm pretty sure this bit is documented somewhere. It is technically
impossible to make PyObjC do the right thing here without patching the
Python interpreter.
>
>
> I have a workaround where I surround changes to the list with:
>
> self.willChangeValueForKey_("selections")
> self.selections.append("new selection")
> self.didChangeValueForKey_("selections")
>
> This works fine for now, but gives me the following messages in the
> Console:
>
> *** Ignoring *** addObserver:forKeyPath:options:context: for
> 'partName' (of <NSTableBinder: 0x3fad90>{object: <NSTableView:
> 0x3eabc0>, bindings: content=arrangedObjects} with 0 in 0x0).
>
> (where partName is an attribute in the object that gets stored in the
> list).
>
> I presume that when I issue the above notifications, the KVO mechanism
> walks the list and tries to observe every object again, but they're
> already observer and thus ignored. Am I missing something obvious or I
> must write my own wrapper around list? I've found the accessor
> decorator in the objc source, but I'm not sure about how should I use
> for lists.
I don't think I've seen this before, but I usually use NSMutableArray
instances when dealing with KVO.
Could you try to reproduce this problem in small script? Ideally this
would be a unittest testcase, but a GUI program would be fine too.
Ronald
|
|
From: Ronald O. <ron...@ma...> - 2008-05-19 06:13:57
|
On 18 May, 2008, at 18:46, Orestis Markou wrote: > So, I've created a project under Xcode, and I'm trying to make it work > using py2app. > > I've moved over all the Python files (including main.m and main.py) > and English.lproj, translated the plist to a python dict (this could > be easily automated), py2app happilly generates the bundle but the > application dies because it can't find the MainMenu nib file. > > After some investigation, I've learned that nib files are now actually > compiled from xib files, which doesn't happen when I use py2app. > > What step am I missing? Someone will have to teach py2app to compile .xib files. There's already code that deals with datamodels for CoreData, enhancing that to deal with .xib files should be fairly easy. The complicating factor is that datamodels are explicitly mentioned in the setup.py file, while nib files are usually copied as resource files. I'll get around to that some time, although it is unlikely that that will happen before WWDC. Ronald |
|
From: Ronald O. <ron...@ma...> - 2008-05-19 06:10:30
|
On 17 May, 2008, at 2:31, Steve Steiner wrote: > Did you ever get an answer as to how to run the latest SVN version of > PyObjc? That's fairly easy: there's a script named '02-develop-all.sh'. That will run the setup.py of all packages that form PyObjC in the right order. As the name suggest it will use "python setup.py develop" to install them, you might want to patch the script to do a proper install instead. This is obviously not as easy as it should be, fixing that is on my todo list. Ronald P.S. I can recommend the "virtualenv" package to anyone that wants to experiment with additional python packages without messing up their main install. > > > Thanks, > > S > > On May 16, 2008, at 8:29 PM, Orestis Markou wrote: > >> Hi all, >> >> I've took the liberty of mirroring the SVN trunk in a Git repository >> hosted here: >> >> http://github.com/orestis/pyobjc/tree >> >> I'll update the repo when check-ins happen. >> >> Regards, >> -- >> Orestis Markou >> or...@or... >> http://orestis.gr/ >> >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Ronald O. <ron...@ma...> - 2008-05-19 06:07:14
|
On 17 May, 2008, at 19:43, Orestis Markou wrote: > Hi, > > I'm trying to follow Apple's example (http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/ > ), but I'm a bit stumped at chapter 5 (http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/Chapter05/chapter_5_section_5.html > ) where they use some weird stuff I can't find anywhere. > > Digging from http://thread.gmane.org/gmane.comp.python.pyobjc.devel/4753/ > , it seems that quickTimeMovieController isn't wrapped yet. Does > that mean that you can only use it in Objective-C but not from Python, > or that it's not usable at all? Could you file a bug about that on SF.net? I almost never use Quicktime myself and without the reminder of a bugreport this is likely to get forgotten. > > > Also, since there are a lot of low level C stuff going on with > QuickTime, I'm wondering if they are usable from PyObjC (perhaps > ctypes will do the correct thing?). I couldn't find any documentation > on that. There's Carbon.Qt, the Quicktime wrappers in the standard library. Those are ancient, but work. Ronald |
|
From: Ronald O. <ron...@ma...> - 2008-05-19 06:04:07
|
On 15 May, 2008, at 15:06, Orestis Markou wrote: > Hi, > > I'm a bit confused. > > I had PyObjC installed in Tiger, then I upgraded to Leopard. I also > have macports installed, and I have an alias named macpython that > points to the built-in Mac OS X python. > > I'm not really sure what's going on, and what version of Python/ > PyObjC is XCode picking up. > > Any ideas about how to clean that up? > > In a related note, how can I use the svn version of PyObjC (or for > that matter, an arbitratry tree of PyObjC that I have on my > harddisk) ? The documentation seems a bit sparse. Xcode uses the 'python' executable on the shell's $PATH. Unless you have changed environment.plist (I can't recall where that's located right now, I'm pretty sure it's described on macosxhints.com) that will be /usr/bin/python. If you had PyObjC installed in Tiger you've probably installed a Python in /Library/Frameworks as well, unless you're developing for Tiger your (IMHO) better of by removing that copy of Python and using the system python instead. /usr/bin/python on Leopard is Python 2.5.1 with some additional patches. Ronald |
|
From: Ronald O. <ron...@ma...> - 2008-05-19 06:00:29
|
On 15 May, 2008, at 1:04, Orestis Markou wrote: > Hi, > > it seems that the documentation available in the website isn't up to > date with the version that is included with Mac OS X 10.5.2 (or it's > difficult to find), and it makes things unnecessarily hard, IME. > > > I'm keen on writing a short tutorial based on my experiences > developing a smallish project in Xcode 3, and I also know that the > CurrencyConverter project is being transitioned to Xcode 3 by s s > (that's the only name I could find). It's very hard to know if I'm > doing things in a recommended way, though. > > I will probably be able to contribute a small QTKit example in a few > days. Both would be greatly appreciated. I don't have a lot of time to work on PyObjC at the moment, and I have currently reallocated most of that time to fine-tuning Python 2.6. Ronald |
|
From: Orestis M. <or...@or...> - 2008-05-18 19:15:24
|
Hi,
I'm trying to bound an NSTableView to a list using an array
controller. This works fine, as long as I don't mutate the list
(list.append, for example).
I have a workaround where I surround changes to the list with:
self.willChangeValueForKey_("selections")
self.selections.append("new selection")
self.didChangeValueForKey_("selections")
This works fine for now, but gives me the following messages in the
Console:
*** Ignoring *** addObserver:forKeyPath:options:context: for
'partName' (of <NSTableBinder: 0x3fad90>{object: <NSTableView:
0x3eabc0>, bindings: content=arrangedObjects} with 0 in 0x0).
(where partName is an attribute in the object that gets stored in the
list).
I presume that when I issue the above notifications, the KVO mechanism
walks the list and tries to observe every object again, but they're
already observer and thus ignored. Am I missing something obvious or I
must write my own wrapper around list? I've found the accessor
decorator in the objc source, but I'm not sure about how should I use
for lists.
Regards,
--
Orestis Markou
or...@or...
http://orestis.gr/
|
|
From: Orestis M. <or...@or...> - 2008-05-18 16:47:36
|
So, I've created a project under Xcode, and I'm trying to make it work using py2app. I've moved over all the Python files (including main.m and main.py) and English.lproj, translated the plist to a python dict (this could be easily automated), py2app happilly generates the bundle but the application dies because it can't find the MainMenu nib file. After some investigation, I've learned that nib files are now actually compiled from xib files, which doesn't happen when I use py2app. What step am I missing? Regards, -- Orestis Markou or...@or... http://orestis.gr/ |
|
From: Orestis M. <or...@or...> - 2008-05-17 17:43:35
|
Hi, I'm trying to follow Apple's example (http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/ ), but I'm a bit stumped at chapter 5 (http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/Chapter05/chapter_5_section_5.html ) where they use some weird stuff I can't find anywhere. Digging from http://thread.gmane.org/gmane.comp.python.pyobjc.devel/4753/ , it seems that quickTimeMovieController isn't wrapped yet. Does that mean that you can only use it in Objective-C but not from Python, or that it's not usable at all? Also, since there are a lot of low level C stuff going on with QuickTime, I'm wondering if they are usable from PyObjC (perhaps ctypes will do the correct thing?). I couldn't find any documentation on that. Regards, -- Orestis Markou or...@or... http://orestis.gr/ |
|
From: Orestis M. <or...@or...> - 2008-05-17 11:20:13
|
I can't find a way to attach a patch to the SF ticket, so I post the patch here. It's generated by git, but any patch program will happily apply it. -- Orestis Markou or...@or... http://orestis.gr/ |
|
From: Orestis M. <or...@or...> - 2008-05-17 00:42:02
|
No, not really. I figured out that much: import objc print objc.__version__ As a side effect, I had MacPython installed in /Library/Framework. It seems that XCode picked that up and I was using PyObjC 1.4. Removing Python.framework made XCode fall back to using the built-in system Python 2.5, so I suspect that installing MacPython and putting PyObjC in the site-packages there will override XCode's PyObjC. That's only useful for developing PyObjC, as it's probably difficult to bundle a whole version of Python and PyObjC with you .app. Best overall to target Leopard, IMO... -- Orestis Markou or...@or... http://orestis.gr/ On 17 Μαϊ 2008, at 1:31 ΠΜ, Steve Steiner wrote: > Did you ever get an answer as to how to run the latest SVN version > of PyObjc? > > Thanks, > > S > > On May 16, 2008, at 8:29 PM, Orestis Markou wrote: > >> Hi all, >> >> I've took the liberty of mirroring the SVN trunk in a Git repository >> hosted here: >> >> http://github.com/orestis/pyobjc/tree >> >> I'll update the repo when check-ins happen. >> >> Regards, >> -- >> Orestis Markou >> or...@or... >> http://orestis.gr/ >> >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
|
From: Steve S. <sst...@ma...> - 2008-05-17 00:31:05
|
Did you ever get an answer as to how to run the latest SVN version of PyObjc? Thanks, S On May 16, 2008, at 8:29 PM, Orestis Markou wrote: > Hi all, > > I've took the liberty of mirroring the SVN trunk in a Git repository > hosted here: > > http://github.com/orestis/pyobjc/tree > > I'll update the repo when check-ins happen. > > Regards, > -- > Orestis Markou > or...@or... > http://orestis.gr/ > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Orestis M. <or...@or...> - 2008-05-17 00:29:29
|
Hi all, I've took the liberty of mirroring the SVN trunk in a Git repository hosted here: http://github.com/orestis/pyobjc/tree I'll update the repo when check-ins happen. Regards, -- Orestis Markou or...@or... http://orestis.gr/ |
|
From: Orestis M. <or...@or...> - 2008-05-17 00:12:42
|
I have created a small hello world application using PyObjC 2, Xcode, IB 3 that uses some basic things that people might have trouble figuring out. It's available here: http://orestis.gr/en/blog/2008/05/17/pyobjc-hello-world/ Please have a look and let me know if I've missed anything obvious, or if there is a better way to do things. Regards, -- Orestis Markou or...@or... http://orestis.gr/ |
|
From: Orestis M. <or...@or...> - 2008-05-15 13:07:06
|
Hi, I'm a bit confused. I had PyObjC installed in Tiger, then I upgraded to Leopard. I also have macports installed, and I have an alias named macpython that points to the built-in Mac OS X python. I'm not really sure what's going on, and what version of Python/PyObjC is XCode picking up. Any ideas about how to clean that up? In a related note, how can I use the svn version of PyObjC (or for that matter, an arbitratry tree of PyObjC that I have on my harddisk) ? The documentation seems a bit sparse. Regards, Orestis |
|
From: Steve S. <sst...@ma...> - 2008-05-15 00:37:32
|
On May 14, 2008, at 7:04 PM, Orestis Markou wrote: > Hi, > > it seems that the documentation available in the website isn't up to > date with the version that is included with Mac OS X 10.5.2 (or it's > difficult to find), and it makes things unnecessarily hard, IME. Yes, the docs have fallen behind. Let's do what we can to bring them up to speed. > I'm keen on writing a short tutorial based on my experiences > developing a smallish project in Xcode 3, and I also know that the > CurrencyConverter project is being transitioned to Xcode 3 by s s > (that's the only name I could find). 'ss' is Steve Steiner who is me. I'm working on the Currency Converter app a bit tonight; not sure I'll get it up today though. > It's very hard to know if I'm doing things in a recommended way, > though. I'm facing the same issue. All we can do is put up our best efforts and see whether anyone 'in the know' can help us get it more right. > I will probably be able to contribute a small QTKit example in a few > days. Cool. S |
|
From: Orestis M. <or...@or...> - 2008-05-14 23:04:32
|
Hi, it seems that the documentation available in the website isn't up to date with the version that is included with Mac OS X 10.5.2 (or it's difficult to find), and it makes things unnecessarily hard, IME. I'm keen on writing a short tutorial based on my experiences developing a smallish project in Xcode 3, and I also know that the CurrencyConverter project is being transitioned to Xcode 3 by s s (that's the only name I could find). It's very hard to know if I'm doing things in a recommended way, though. I will probably be able to contribute a small QTKit example in a few days. Regards, -- Orestis Markou or...@or... http://orestis.gr/ |
|
From: Orestis M. <or...@or...> - 2008-05-14 23:00:50
|
IME, if you define an IBOutlet rather than an ivar, IB will pick that up on save. Is that what you're referring to? -- Orestis Markou or...@or... http://orestis.gr/ On 14 Μαϊ 2008, at 12:51 ΠΜ, s s wrote: > > > > On May 13, 2008, at 7:08 PM, Orestis Markou wrote: > >> Hi, >> >> can you post somewhere the code? I'm struggling with PyObjC and all >> the Google results are very old... > > Yes, I had the same problem, at first. > > I'll put the CurrencyConverter up on my blog and post a link to it > to the list. > > I'm writing quite a bit of stuff about the new ways of doing things > that should help anyone struggling with some of the new ways of > doing things. > > S > > >> >> >> Regards, >> -- >> Orestis Markou >> or...@or... >> http://orestis.gr/ >> >> >> >> >> On 02 Μαϊ 2008, at 4:12 ΠΜ, s s wrote: >> >>> Thanks to Daniel, I got the CurrencyConverter app running without >>> all >>> the PyObjc 1.x cruft and without inheriting from >>> NibClassBuilder.AutoBaseClass. >>> >>> Unfortunately, I seem to have had to go back to the old days of >>> declaring all ObjC ivars manually: >>> >>> class ConverterController (NSObject): >>> dollarField = objc.ivar (u'dollarField') >>> rateField = objc.ivar (u'rateField') >>> totalField = objc.ivar(u'totalField') >>> converter = objc.ivar(u'converter') >>> >>> i.e. the instance vars don't come over from IB as they did when >>> classes inherited from NibClassBuilder.AutoBaseClass. >>> >>> So, my question is: >>> >>> How would one get the same result as inheriting from >>> NibClassBuilder.AutoBaseClass, in XCode/IB 3.x >>> >>> Thanks in advance for any assistance. >>> >>> S >>> >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >>> Don't miss this year's exciting event. There's still time to save >>> $100. >>> Use priority code J8TL2D2. >>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >>> _______________________________________________ >>> Pyobjc-dev mailing list >>> Pyo...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
|
From: s s <li...@in...> - 2008-05-13 23:52:17
|
On May 13, 2008, at 7:08 PM, Orestis Markou wrote: > Hi, > > can you post somewhere the code? I'm struggling with PyObjC and all > the Google results are very old... Yes, I had the same problem, at first. I'll put the CurrencyConverter up on my blog and post a link to it to the list. I'm writing quite a bit of stuff about the new ways of doing things that should help anyone struggling with some of the new ways of doing things. S > > > Regards, > -- > Orestis Markou > or...@or... > http://orestis.gr/ > > > > > On 02 Μαϊ 2008, at 4:12 ΠΜ, s s wrote: > >> Thanks to Daniel, I got the CurrencyConverter app running without all >> the PyObjc 1.x cruft and without inheriting from >> NibClassBuilder.AutoBaseClass. >> >> Unfortunately, I seem to have had to go back to the old days of >> declaring all ObjC ivars manually: >> >> class ConverterController (NSObject): >> dollarField = objc.ivar (u'dollarField') >> rateField = objc.ivar (u'rateField') >> totalField = objc.ivar(u'totalField') >> converter = objc.ivar(u'converter') >> >> i.e. the instance vars don't come over from IB as they did when >> classes inherited from NibClassBuilder.AutoBaseClass. >> >> So, my question is: >> >> How would one get the same result as inheriting from >> NibClassBuilder.AutoBaseClass, in XCode/IB 3.x >> >> Thanks in advance for any assistance. >> >> S >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Orestis M. <or...@or...> - 2008-05-13 23:08:12
|
Hi, can you post somewhere the code? I'm struggling with PyObjC and all the Google results are very old... Regards, -- Orestis Markou or...@or... http://orestis.gr/ On 02 Μαϊ 2008, at 4:12 ΠΜ, s s wrote: > Thanks to Daniel, I got the CurrencyConverter app running without all > the PyObjc 1.x cruft and without inheriting from > NibClassBuilder.AutoBaseClass. > > Unfortunately, I seem to have had to go back to the old days of > declaring all ObjC ivars manually: > > class ConverterController (NSObject): > dollarField = objc.ivar (u'dollarField') > rateField = objc.ivar (u'rateField') > totalField = objc.ivar(u'totalField') > converter = objc.ivar(u'converter') > > i.e. the instance vars don't come over from IB as they did when > classes inherited from NibClassBuilder.AutoBaseClass. > > So, my question is: > > How would one get the same result as inheriting from > NibClassBuilder.AutoBaseClass, in XCode/IB 3.x > > Thanks in advance for any assistance. > > S > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Steve S. <sst...@ma...> - 2008-05-12 01:53:21
|
On May 8, 2008, at 9:44 PM, Bill Bumgarner wrote: > On May 8, 2008, at 5:38 PM, Steve Steiner wrote: >> If someone will just point me to the right resource, I'll blog it >> and >> make it findable by the next poor sot. > > [[NSClassFromString(@"MyPythonClass") alloc] init]; > > Your challenge will be where you define the method prototypes to > keep the compiler happy. > > Personally, I would create a dummy class that has NO methods, then > declare categories against that dummy class that has all of the > methods w/appropriate signature that are needed... then declare the > result of the above to be a pointer to an instance of that class. > > Makes the compiler happy and the runtime doesn't care. That all worked, thanks! I'm finishing up blog entries and will post back to the list when I'm finished. > Unless you are jumping through hoops to declare the method > signatures, everything will be of an object type. > > If you want to provide subclasses of specific objc classes that are > implemented in python, then declare an abstract subclass that > contains all the method declarations and implementations that do > nothing, then subclass that from Python. That'll give the bridge > all (if you run gen_bridge_metadata, if needed) to do the > conversions across the bridge for the types that need it. Even though I went through this all, including the gen_bridge_metadata build step, it turned out that nothing I was doing wouldn't be automatically bridged. Cool! The mistake I made that lead me down this path was that I didn't realize that objc.ivar() just set up a KVC hook and thought I was doing something wrong when I couldn't access my Python ivars. What I realized, as I was working through all of this, is that what I'd really like to do is insure that my Python class implements a protocol. This is a plug-in architecture and I really need to verify that what is claiming to implement required functionality actually does. I've set up: SSDummyProtocol -- with a couple of dummy "- (NSObject) getData;" style declarations SSDummyObject -- declared as implementing the SSDummyProtocol SSDummyObjectPython -- with SSDummyObject as the parent, and I've implemented all the required methods, all in Python. What is the correct way to call conformsToProtocol: on my SSDummyObjectPython instance? I've tried several ways and they all result in (null). Thanks, S |
|
From: Michael V. <m.v...@gm...> - 2008-05-11 01:45:56
|
Hi, I'm working on a (mostly cocoa) application, and want to embed an interactive interpreter into the app. I think I have that working, at least in a Foundation-based test CLI app. (I'm sure it will be more difficult outside of the terminal environment). However, how do I give the interpreter access to the app's objects? Is there some way to pass those objects in, via PyObjC or something else, before calling the PyRun_InteractiveLoop() function? Or is there a way that I can take advantage of introspection to gain access to those objects once I've started the interpreter? There is pyobjc.inject, which seems to be able to do this kind of introspection etc, but it's not working for me on Leopard. Plus, I'd rather explicitly embed the interpreter, rather than the injecting voodoo. (I did try loading the example InjectInterpreter.bundle into my app, but that didn't work either). Thank You, Michael |
|
From: Bill B. <bb...@ma...> - 2008-05-09 01:45:13
|
On May 8, 2008, at 5:38 PM, Steve Steiner wrote: > If someone will just point me to the right resource, I'll blog it and > make it findable by the next poor sot. [[NSClassFromString(@"MyPythonClass") alloc] init]; Your challenge will be where you define the method prototypes to keep the compiler happy. Personally, I would create a dummy class that has NO methods, then declare categories against that dummy class that has all of the methods w/appropriate signature that are needed... then declare the result of the above to be a pointer to an instance of that class. Makes the compiler happy and the runtime doesn't care. Unless you are jumping through hoops to declare the method signatures, everything will be of an object type. If you want to provide subclasses of specific objc classes that are implemented in python, then declare an abstract subclass that contains all the method declarations and implementations that do nothing, then subclass that from Python. That'll give the bridge all (if you run gen_bridge_metadata, if needed) to do the conversions across the bridge for the types that need it. b.bum |