pyobjc-dev Mailing List for PyObjC (Page 187)
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: burris e. <bu...@gi...> - 2004-05-12 20:53:49
|
Am I the only person that hasn't been able to build cvs in a week? I get an error like this: File "setup.py", line 96, in create_cached_class_list m = __import__(name) File "build/lib.darwin-7.3.0-Power_Macintosh-2.3/AppKit/__init__.py", line 13, in ? from _AppKit import * RuntimeError: Wrong version of PyObjC C API thanks, burris |
From: David R. <da...@it...> - 2004-05-12 20:07:06
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12 maj 2004, at 21.45, Bob Ippolito wrote: > > On May 12, 2004, at 3:12 PM, David Remahl wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 12 maj 2004, at 19.35, Bob Ippolito wrote: >> >>> As long as you don't want SSL support. >>> >>> -bob >> >> Hmm, really? Compiling with --enable-ssl and --with-ssl worked for >> me, I think. > > The problem is that it's neon that requires those flags, not the > toplevel configure script. The toplevel configure script doesn't pass > flags down to neon, at least last time I tried. > > In any case, double clicking a binary installer is quicker than > compiling something yourself even if the configuration was > straightforward. > > -bob It does now. According to my experience, and according to the documentation (INSTALL): With Unix-based systems, you can enable support for SSL from the Subversion build provided that you are building Neon in the "./neon/" directory as described above in section I.4. You also need OpenSSL installed on your system. Just add "--with-ssl" as a parameter when you run Subversion's "./configure", and it will be passed on to the Neon build system. If your OpenSSL installation is hard for Neon to find, you may need to use "--with-libs=/path/to/lib" in addition. The zlib library is included in Neon by default, but you can also specify a path to the library using "--with-libs". Consult the Neon documentation for more information on how to use these parameters and versions of libraries you need. Perhaps you were using a version from trunk where that functionality was temporarily broken? I still agree that the binary installer by Mr. Ott is excellent, and unless one wants to build an Apache2 server with Subversion support there is little reason to bother with the source. / Regards, David - --- PGP key information--- pub 1024D/ 87256085 2003/06/12 David Remahl <da...@re...> Web: http://ittpoi.com/david_remahl.asc Fingerprint: 0C38 293C 86A9 7756 9CEA 4ED6 1651 620E 8725 6085 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFAooPUFlFiDoclYIURArWyAJ9X3JjAs5hecg4jo2ey0Q06zpr+yACeK5MR 7cXheeK/uNT5+J7iHEWzo7g= =UTv3 -----END PGP SIGNATURE----- |
From: Bob I. <bo...@re...> - 2004-05-12 19:45:21
|
On May 12, 2004, at 3:12 PM, David Remahl wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 12 maj 2004, at 19.35, Bob Ippolito wrote: > >> As long as you don't want SSL support. >> >> -bob > > Hmm, really? Compiling with --enable-ssl and --with-ssl worked for me, > I think. The problem is that it's neon that requires those flags, not the toplevel configure script. The toplevel configure script doesn't pass flags down to neon, at least last time I tried. In any case, double clicking a binary installer is quicker than compiling something yourself even if the configuration was straightforward. -bob |
From: Bob I. <bo...@re...> - 2004-05-12 17:35:11
|
On May 12, 2004, at 1:00 PM, Michael Hudson wrote: > Ronald Oussoren <ron...@ma...> writes: > >> On 12-mei-04, at 17:41, b.bum wrote: >> >>> On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: >>>> Would it be possible to host PyObjC there? >>> >>> Yes. I will set it up this evening. How can I get a hold of an >>> image of the PyObjC raw repository? I should be able to convert >>> that in a fashion that preserves the history. >> >> I'd prefer to do the conversion after the 1.1 release, which should be >> as soon as possible. >> >> BTW. What's the easiest way to get a SVN client on my mac? > > The pristine sources compile just fine. As long as you don't want SSL support. -bob |
From: b.bum <bb...@ma...> - 2004-05-12 17:01:52
|
On May 12, 2004, at 9:20 AM, Bob Ippolito wrote: >> On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: >>> Would it be possible to host PyObjC there? >> >> Yes. I will set it up this evening. How can I get a hold of an >> image of the PyObjC raw repository? I should be able to convert that >> in a fashion that preserves the history. >> > > actually, now that I've thought about it, since subversion's whole > repository is in one big bsddb file, you can't really separate them > unless it is its own distinct repository (which may or may not be the > route they choose). > > In the case where it is its own distinct repository, you would > probably want a regular copy of svnadmin dump (perhaps an incremental > one, to be nice). > > Maybe there are other replication solutions for svn, that will just > use svn update to build a repository mirror (that preserves everything > but subversion revision numbers, I guess)? No -- I want the whole CVS repository for conversion.... > I'd prefer to do the conversion after the 1.1 release, which should be > as soon as possible. OK. > BTW. What's the easiest way to get a SVN client on my mac? http://www.pycs.net/bbum/2004/4/20/#200404201 Also -- http://svn.red-bean.com/scplugin/ contains a very nice Finder plugin for Subversion. > A snapshot of the complete CVS repository is here: > <http://cvs.sourceforge.net/cvstarballs/pyobjc-cvsroot.tar.bz2> Cool. Thanks. b.bum |
From: Michael H. <mw...@py...> - 2004-05-12 17:00:29
|
Ronald Oussoren <ron...@ma...> writes: > On 12-mei-04, at 17:41, b.bum wrote: > >> On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: >>> Would it be possible to host PyObjC there? >> >> Yes. I will set it up this evening. How can I get a hold of an >> image of the PyObjC raw repository? I should be able to convert >> that in a fashion that preserves the history. > > I'd prefer to do the conversion after the 1.1 release, which should be > as soon as possible. > > BTW. What's the easiest way to get a SVN client on my mac? The pristine sources compile just fine. Cheers, mwh -- Exam invigilation - it doesn't come much harder than that, esp if the book you're reading turns out to be worse than expected. -- Dirk Bruere, sci.physics.research |
From: Bob I. <bo...@re...> - 2004-05-12 16:59:33
|
On May 12, 2004, at 12:45 PM, Ronald Oussoren wrote: > > On 12-mei-04, at 17:41, b.bum wrote: > >> On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: >>> Would it be possible to host PyObjC there? >> >> Yes. I will set it up this evening. How can I get a hold of an >> image of the PyObjC raw repository? I should be able to convert that >> in a fashion that preserves the history. > > I'd prefer to do the conversion after the 1.1 release, which should be > as soon as possible. > > BTW. What's the easiest way to get a SVN client on my mac? The most painless way to get a working svn client installed is *definitely* this: http://www.codingmonkeys.de/mbo/ -bob |
From: Ronald O. <ron...@ma...> - 2004-05-12 16:45:44
|
On 12-mei-04, at 17:41, b.bum wrote: > On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: >> Would it be possible to host PyObjC there? > > Yes. I will set it up this evening. How can I get a hold of an image > of the PyObjC raw repository? I should be able to convert that in a > fashion that preserves the history. I'd prefer to do the conversion after the 1.1 release, which should be as soon as possible. BTW. What's the easiest way to get a SVN client on my mac? A snapshot of the complete CVS repository is here: <http://cvs.sourceforge.net/cvstarballs/pyobjc-cvsroot.tar.bz2> Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |
From: Bob I. <bo...@re...> - 2004-05-12 16:20:15
|
On May 12, 2004, at 11:41 AM, b.bum wrote: > On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: >> Would it be possible to host PyObjC there? > > Yes. I will set it up this evening. How can I get a hold of an image > of the PyObjC raw repository? I should be able to convert that in a > fashion that preserves the history. > actually, now that I've thought about it, since subversion's whole repository is in one big bsddb file, you can't really separate them unless it is its own distinct repository (which may or may not be the route they choose). In the case where it is its own distinct repository, you would probably want a regular copy of svnadmin dump (perhaps an incremental one, to be nice). Maybe there are other replication solutions for svn, that will just use svn update to build a repository mirror (that preserves everything but subversion revision numbers, I guess)? -bob |
From: b.bum <bb...@ma...> - 2004-05-12 15:41:20
|
On May 12, 2004, at 8:20 AM, Ronald Oussoren wrote: > Would it be possible to host PyObjC there? Yes. I will set it up this evening. How can I get a hold of an image of the PyObjC raw repository? I should be able to convert that in a fashion that preserves the history. b.bum |
From: Ronald O. <ron...@ma...> - 2004-05-12 15:20:41
|
On 12-mei-04, at 17:01, b.bum wrote: > On May 12, 2004, at 1:08 AM, Ronald Oussoren wrote: >> Do they have an easy method for making backups of the repository? I >> have a daily backup of the CVS repository on my linux box at home, >> just in case SF screws up. If we'd move to red-bean.com I'd >> definitely want something simular. > > They do. > > http://www.red-bean.com/people.html I had noticed this page, but that doesn't tell me anything (although at least some of the names sound familiar). > This does: > Red-bean was created by a group of engineers because they needed a > reliable set of hosting and server solutions that wouldn't change over > time as their employment conditions changed. The members of red-bean > contain a good chunk of the apache crew, the subversion engineers, and > contributors to apache, WebDAV (spec and implementation) and other > critical bits of open source software. Would it be possible to host PyObjC there? BTW. I'd still like to have a way to make backups of the repository, just in case something goes wrong. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |
From: b.bum <bb...@ma...> - 2004-05-12 15:01:37
|
On May 12, 2004, at 1:08 AM, Ronald Oussoren wrote: > Do they have an easy method for making backups of the repository? I > have a daily backup of the CVS repository on my linux box at home, > just in case SF screws up. If we'd move to red-bean.com I'd definitely > want something simular. They do. http://www.red-bean.com/people.html Red-bean was created by a group of engineers because they needed a reliable set of hosting and server solutions that wouldn't change over time as their employment conditions changed. The members of red-bean contain a good chunk of the apache crew, the subversion engineers, and contributors to apache, WebDAV (spec and implementation) and other critical bits of open source software. b.bum |
From: Ronald O. <ron...@ma...> - 2004-05-12 08:08:27
|
On 12-mei-04, at 9:52, Bob Ippolito wrote: > > On May 12, 2004, at 3:30 AM, Ronald Oussoren wrote: > >> >> On 12-mei-04, at 0:58, Bob Ippolito wrote: >> >>> Not to beat a dead horse here, but I propose that we move to >>> Subversion after this release. Bill said he can get us a http >>> repository at svn.red-bean.com. >> >> I agree. However... what/who is red-bean.com? Their site is very >> unclear about that. > > I'm not entirely sure. I believe that they are personal acquaintances > of Bill's. red-bean.com hosts the Subversion book, SCPlugin (the > Subversion Contextual Menu plugin), Bill's personal open source > repository, my personal open source repository (that I haven't > bothered to migrate to yet, but it is definitely configured properly), > among other things. Do they have an easy method for making backups of the repository? I have a daily backup of the CVS repository on my linux box at home, just in case SF screws up. If we'd move to red-bean.com I'd definitely want something simular. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |
From: Bob I. <bo...@re...> - 2004-05-12 07:52:54
|
On May 12, 2004, at 3:30 AM, Ronald Oussoren wrote: > > On 12-mei-04, at 0:58, Bob Ippolito wrote: > >> Not to beat a dead horse here, but I propose that we move to >> Subversion after this release. Bill said he can get us a http >> repository at svn.red-bean.com. > > I agree. However... what/who is red-bean.com? Their site is very > unclear about that. I'm not entirely sure. I believe that they are personal acquaintances of Bill's. red-bean.com hosts the Subversion book, SCPlugin (the Subversion Contextual Menu plugin), Bill's personal open source repository, my personal open source repository (that I haven't bothered to migrate to yet, but it is definitely configured properly), among other things. -bob |
From: Ronald O. <ron...@ma...> - 2004-05-12 07:41:04
|
On 12-mei-04, at 4:20, Bob Ippolito wrote: > I think it's about time to start considering the ability to grab > symbols from bundles and frameworks. The particular use case I'm > thinking of is extern constant NSStrings and integers, so we can make > it more painless to wrap existing frameworks and defer more ObjC code > to Python. > > What kind of interface do you all think this should have? > > This would be my proposal: > objc.loadSymbols(str moduleName, dict dictToUpdate str binaryPath, > dict symbolNamesToSignatures) -> dict symbolNamesToObjects That should be easy enough, this is register_variableList in wrapper-const-table.h. This function whould have to be moved into the core and made available to python code. > > Ronald, what's your schedule for the release? As soon as possible, the only reason I haven't done a release yet is that the unittests cause a crash on 10.2. I checked in a change that might fix that, but I have not yet checked this. > Would it be possible to get this in beforehand? Do you want to write > it or should I? Feel free to add it, if you include some unittests and documentation. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |
From: Ronald O. <ron...@ma...> - 2004-05-12 07:30:43
|
On 12-mei-04, at 0:58, Bob Ippolito wrote: > Not to beat a dead horse here, but I propose that we move to > Subversion after this release. Bill said he can get us a http > repository at svn.red-bean.com. I agree. However... what/who is red-bean.com? Their site is very unclear about that. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |
From: Dr. K. <no...@e-...> - 2004-05-12 07:20:40
|
No text version was provided |
From: Bob I. <bo...@re...> - 2004-05-12 02:20:58
|
I think it's about time to start considering the ability to grab symbols from bundles and frameworks. The particular use case I'm thinking of is extern constant NSStrings and integers, so we can make it more painless to wrap existing frameworks and defer more ObjC code to Python. What kind of interface do you all think this should have? This would be my proposal: objc.loadSymbols(str moduleName, dict dictToUpdate str binaryPath, dict symbolNamesToSignatures) -> dict symbolNamesToObjects Ronald, what's your schedule for the release? Would it be possible to get this in beforehand? Do you want to write it or should I? -bob |
From: Bob I. <bo...@re...> - 2004-05-11 22:58:53
|
Not to beat a dead horse here, but I propose that we move to Subversion after this release. Bill said he can get us a http repository at svn.red-bean.com. -bob |
From: Pierre T. <p.t...@bi...> - 2004-05-11 03:43:38
|
Hello, I don't know if this is the good place to ask but I would like some help to install pyobjc on my machine. This is the error I'm having from PackageManager: Warning: database version 0.3 does not match 0.1 Warning: PyObjC_Extras: unknown key Systemwide-only PimpPackage_binary installPackageOnly PimpPackage_binary installPackageOnly + cd "/"; zcat "/tmp/pyobjc-1.0.darwin-7.0.0-Power_Macintosh.tar.gz" | tar -xf - tar: ./System/Library/Frameworks/Python.framework/Versions/2.3/bin/ nibclassbuilder: Cannot open: (null) tar: Error exit delayed from previous errors I am on OS 10.3.3. I've tried to install from: http://pyobjc.sf.net/packman/pyobjc-stable-7.0-Power_Macintosh.plist". What should I do? Regards. --------------------- Pierre |
From: <har...@fr...> - 2004-05-09 06:41:51
|
<html> <body> <p align="center"> <img src="cid:86990DF0.3BE09474.9264DE66.D13CA1B7_csseditor"><p align="center"> </p> <p align="center"><font color="#FDFDFD" size="1">этого не стоит сейчас говорить. Японские силы -- хотя их не нужно</font></p> <p align="center"><font color="#FBFBFB" size="1">разрешения посмотреть этот уникальный чек. Чек на миллион долларов! Он</font></p> </body> </html> |
From: Home <no...@e-...> - 2004-05-08 17:02:51
|
No text version was provided |
From: b.bum <bb...@ma...> - 2004-05-08 06:59:15
|
On May 7, 2004, at 11:30 PM, Winston Wolff wrote: > Ah yes, your description definitely helps. Also this line here fixes > my problem, thank you so much: > >> Neither, it is unfrozen by NSBundle.loadNibNamed_owner_ > > But that raises another question. The above line works to unfreeze > your second NIB file, but in all the example code, where is the first > NIB file unfrozen, i.e. MainMenu.nib? Is it hidden somewhere in > AppHelper.runEventLoop(argv=[]) It is a part of standard Cocoa. Open up any random Cocoa App's wrapper and have a look at the Info.plist. You will find an entry with a key/value pair like... <key>NSMainNibFile</key> <string>Edit</string> ... that, in this case, means that NSApplication will automatically load Edit.nib as a part of startup (the above came from TextEdit.app/Contents/Info.plist. Document based apps do something similar, but there is a method that you can override on your NSDocument subclass to return the NIB name (or you can override -makeWindowControllers and set everything up by hand, if that floats your boat). b.bum |
From: Winston W. <cj...@ob...> - 2004-05-08 06:30:57
|
Ah yes, your description definitely helps. Also this line here fixes my problem, thank you so much: > Neither, it is unfrozen by NSBundle.loadNibNamed_owner_ But that raises another question. The above line works to unfreeze your second NIB file, but in all the example code, where is the first NIB file unfrozen, i.e. MainMenu.nib? Is it hidden somewhere in AppHelper.runEventLoop(argv=[]) -Winston On May 7, 2004, at 11:24 PM, Ronald Oussoren wrote: > > On 8-mei-04, at 7:58, Winston Wolff wrote: > >> That's one thing I don't understand. In Obj C, I would call >> [NSBundle loadNibNamed: "myModelPanel owner: self] and this will >> connect 'self' to the outlets and actions for the nib. I.e. 'self' >> is the owner of the NIB. But with Python, you don't specify any >> owner. How do you choose which object gets to be the owner of the >> NIB file? >> >> For example, if I have: >> NibClassBuilder.extractClasses("MyModalPanel") >> myModal = MyModalPanel.alloc().init() > > That won't work :-) > > NibClassBuilder.extractClasses is a function that extracts class > definitions from NIB files. That information is *only* used by > NibClassBuilder.AutoBaseClass. > >> >> Now MyModelPanel is a NIB file which specifies a >> MyModelPanelController object. So when the NIB file is unfrozen, it >> will create an instance of MyModelPanelController. First of all, >> where exactly is the NIB file unfrozen? Is it in extractClasses() or >> in MyModelPanel.alloc().init()? Second, how do I get a reference to >> MyModelPanelController? > > Neither, it is unfrozen by NSBundle.loadNibNamed_owner_ > >> Normally I would say you attach it to an outlet of the NIB File's >> Owner, but where do I get a reference to the Owner? >> >> Does this make any sense? > > A slightly longer explanation... > > You can define classes in Interface Builder (Classes -> Subclass > <SomeClass>). Doesn't doesn't really define a class, but creates a > note in the NIB file that the program that will load the NIB will > contain a definition of the class. E.g. you promise IB that you will > implement the class in your program. > > IB can create empty Objective-C implementation files for the classes > you "define" in IB, but that will overwrite any existing > implementation files for those classes. These are not usefull for > python anyway (wrong language). > > You can use NibClassBuilder as a script and then it will behave the > same as 'Classes -> Create Files for <SomeClass>' in Interface > Builder. > > This is useful for creating the initial (empty) implementation of > classes, but cannot be used when you change the class in Interface > Builder (add another action or outlet) because the script will always > create an empty implementation (just like the Create Files command of > IB). If you add a new outlet to the class you must therefore manually > add this to your class definition. > > This is where NibClassBuilder.AutoBaseClass and > NibClassBuilder.extractClasses come into play. These two are used to > extract information about the classes you declared in IB from the NIB > file and automaticly add outlet definitions to your class. You must > still add actions to your class, but you would have to do that anyway > because the NIB doesn't contain imformation about the behaviour of the > action. > > Say to define MyController inside IB, with outlet myWindow and action > myAction:. > > NibClassBuilder.extractClasses("MyNib") > > class MyController (NibClassBuilder.AutoBaseClass): > > def myAction_(self, sender): > print self.myWindow > > > NibClassBuilder.AutoBaseClass is a magic base class that will look up > 'MyController' in the information extracted from the NIB file(s). It > will then replace itself by the actual base class (as defined in the > NIB) and add an outlet definition for the outlets. > > You could also have written: > > class MyController (NSObject): > myWindow = objc.IBOutlet("myWindow") > > def myAction_(self, sender): > print self.myWindow > > > I hope this helps you understand what is going on, > > Ronald > |
From: Ronald O. <ron...@ma...> - 2004-05-08 06:24:44
|
On 8-mei-04, at 7:58, Winston Wolff wrote: > That's one thing I don't understand. In Obj C, I would call [NSBundle > loadNibNamed: "myModelPanel owner: self] and this will connect 'self' > to the outlets and actions for the nib. I.e. 'self' is the owner of > the NIB. But with Python, you don't specify any owner. How do you > choose which object gets to be the owner of the NIB file? > > For example, if I have: > NibClassBuilder.extractClasses("MyModalPanel") > myModal = MyModalPanel.alloc().init() That won't work :-) NibClassBuilder.extractClasses is a function that extracts class definitions from NIB files. That information is *only* used by NibClassBuilder.AutoBaseClass. > > Now MyModelPanel is a NIB file which specifies a > MyModelPanelController object. So when the NIB file is unfrozen, it > will create an instance of MyModelPanelController. First of all, > where exactly is the NIB file unfrozen? Is it in extractClasses() or > in MyModelPanel.alloc().init()? Second, how do I get a reference to > MyModelPanelController? Neither, it is unfrozen by NSBundle.loadNibNamed_owner_ > Normally I would say you attach it to an outlet of the NIB File's > Owner, but where do I get a reference to the Owner? > > Does this make any sense? A slightly longer explanation... You can define classes in Interface Builder (Classes -> Subclass <SomeClass>). Doesn't doesn't really define a class, but creates a note in the NIB file that the program that will load the NIB will contain a definition of the class. E.g. you promise IB that you will implement the class in your program. IB can create empty Objective-C implementation files for the classes you "define" in IB, but that will overwrite any existing implementation files for those classes. These are not usefull for python anyway (wrong language). You can use NibClassBuilder as a script and then it will behave the same as 'Classes -> Create Files for <SomeClass>' in Interface Builder. This is useful for creating the initial (empty) implementation of classes, but cannot be used when you change the class in Interface Builder (add another action or outlet) because the script will always create an empty implementation (just like the Create Files command of IB). If you add a new outlet to the class you must therefore manually add this to your class definition. This is where NibClassBuilder.AutoBaseClass and NibClassBuilder.extractClasses come into play. These two are used to extract information about the classes you declared in IB from the NIB file and automaticly add outlet definitions to your class. You must still add actions to your class, but you would have to do that anyway because the NIB doesn't contain imformation about the behaviour of the action. Say to define MyController inside IB, with outlet myWindow and action myAction:. NibClassBuilder.extractClasses("MyNib") class MyController (NibClassBuilder.AutoBaseClass): def myAction_(self, sender): print self.myWindow NibClassBuilder.AutoBaseClass is a magic base class that will look up 'MyController' in the information extracted from the NIB file(s). It will then replace itself by the actual base class (as defined in the NIB) and add an outlet definition for the outlets. You could also have written: class MyController (NSObject): myWindow = objc.IBOutlet("myWindow") def myAction_(self, sender): print self.myWindow I hope this helps you understand what is going on, Ronald |