pyobjc-dev Mailing List for PyObjC (Page 68)
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: Kevin A. M. <ka...@ka...> - 2008-01-26 23:35:20
|
It just needs a little bit of glue. You can't directly import a framework,
but you can get objc to load the bundle.
Create a WiiRemote.py like this:
def _load(name, g):
import objc
objc.loadBundle(name, g, bundle_path='WiiRemote.framework')
_load(__name__, globals())
and then you can
$ python
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import WiiRemote
>>> w = WiiRemote.WiiRemote.new()
>>> w
<WiiRemote: 0x6ff830>
If WiiRemote.framework isn't in the current directory, your program will
have to find it. The original template code from a Python app I'm working on
had:
from Foundation import NSBundle
bundle_path = NSBundle.mainBundle().pathForResource_ofType_(unicode(name),
u'bundle')
objc.loadBundle(name, g, bundle_path=bundle_path)
(I'm using PyObjC 1.4 on Python 2.5 on Tiger, but it should work similarly
on Leopard)
Kevin
On 1/26/08, John Stoner <joh...@gm...> wrote:
>
> I am new to Mac/ObjC development, and intermediate in my Python skill.
>
> I have downloaded the Darwiin wii-remote library, and I am trying to
> integrate it with my existing application developed in Python. I'm working
> on a MacBook running Leopard, and I've downloaded XCode 3.0, and fink, and
> vpython, and a few other things. I can run parts of my app through IDLE
> successfully.
>
> In XCode, I get these messages during my build and run:
>
> This GDB was configured as "i386-apple-darwin".warning: Unable to read
> symbols for
> "@executable_path/../Frameworks/WiiRemote.framework/Versions/A/WiiRemote"
> (file not found).
> Program loaded.
> sharedlibrary apply-load-rules all
> Attaching to program:
> `/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants',
> process 8515.
>
> The Debugger has exited with status 0.
> [Session started at 2008-01-22 22:28:09 -0600.]
> objc[8633]: Class WiiRemote is implemented in both
> /Library/Frameworks/WiiRemote.framework/Versions/A/WiiRemote and
> /Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
> Using implementation from
> /Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
> objc[8633]: Class WiiRemoteDiscovery is implemented in both
> /Library/Frameworks/WiiRemote.framework/Versions/A/WiiRemote and
> /Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
> Using implementation from
> /Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
> Traceback (most recent call last):
> File
> "/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/main.py",
> line 17, in <module>
> import boogiepantsAppDelegate
> File
> "/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/boogiepantsAppDelegate.py",
> line 14, in <module>
> from WiiRemote import *
> ImportError: No module named WiiRemote
>
> In Idle, I try importing a bunch of libraries (I like IDLE better):
>
> import sys
> sys.path.extend
> (['/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
>
> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
>
> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python',
>
> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC',
>
> '/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS',
>
> '/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources',
>
> '/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/PyObjC',
> '/Library/Frameworks'],
>
> '/Users/jstoner/Documents/projects/boogiepants/WiiRemoteFramework/build/Release/WiiRemote.framework/'])
> But I still can't seem to find the right file:
>
> import WiiRemote
> ...
> ImportError: No module named WiiRemote
>
> I've screwed around a lot trying to get Python to find this library to no
> avail. Any ideas?
> --
> blog:
> http://www.generosity.org/stoner/
> 'In knowledge is power, in wisdom, humility.'
> -------------------------------------------------------------------------
> 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: John S. <joh...@gm...> - 2008-01-26 22:34:21
|
I am new to Mac/ObjC development, and intermediate in my Python skill.
I have downloaded the Darwiin wii-remote library, and I am trying to
integrate it with my existing application developed in Python. I'm working
on a MacBook running Leopard, and I've downloaded XCode 3.0, and fink, and
vpython, and a few other things. I can run parts of my app through IDLE
successfully.
In XCode, I get these messages during my build and run:
This GDB was configured as "i386-apple-darwin".warning: Unable to read
symbols for
"@executable_path/../Frameworks/WiiRemote.framework/Versions/A/WiiRemote"
(file not found).
Program loaded.
sharedlibrary apply-load-rules all
Attaching to program:
`/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants',
process 8515.
The Debugger has exited with status 0.
[Session started at 2008-01-22 22:28:09 -0600.]
objc[8633]: Class WiiRemote is implemented in both
/Library/Frameworks/WiiRemote.framework/Versions/A/WiiRemote and
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
Using implementation from
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
objc[8633]: Class WiiRemoteDiscovery is implemented in both
/Library/Frameworks/WiiRemote.framework/Versions/A/WiiRemote and
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
Using implementation from
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
Traceback (most recent call last):
File
"/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/main.py",
line 17, in <module>
import boogiepantsAppDelegate
File
"/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/boogiepantsAppDelegate.py",
line 14, in <module>
from WiiRemote import *
ImportError: No module named WiiRemote
In Idle, I try importing a bunch of libraries (I like IDLE better):
import sys
sys.path.extend
(['/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC',
'/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS',
'/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources',
'/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/PyObjC',
'/Library/Frameworks'],
'/Users/jstoner/Documents/projects/boogiepants/WiiRemoteFramework/build/Release/WiiRemote.framework/'])
But I still can't seem to find the right file:
import WiiRemote
...
ImportError: No module named WiiRemote
I've screwed around a lot trying to get Python to find this library to no
avail. Any ideas?
--
blog:
http://www.generosity.org/stoner/
'In knowledge is power, in wisdom, humility.'
|
|
From: st c. <stc...@gm...> - 2008-01-26 19:55:02
|
Sometimes when I call the print function on a WebView it gets into an infinite loop -- it's a WebKit bug. It would be nice if there were a way to call a method but give it a time out: if you take more than 2 seconds, just give up. I assume something like this could be done with threads and setjmp/longjmp/ptrace. I'm aware the state of the webview in question would be dubious afterwards. Has anyone done this? Thanks, Sengan |
|
From: John S. <jo...@sk...> - 2008-01-26 19:43:22
|
I had a similar problem when I upgraded from Tiger to Leopard. fine. Not sure if this helps, but this is what I recall: I had an older install of Python and when I upgraded, an alias to the older custom install of Python was still in /Developer/Library/ Frameworks (I think that was the path). I removed the alias and the _older_ Python, ran the unistall for developer tools, re-installed the developer tools, and then everything worked ok. On Jan 26, 2008, at 11:32 AM, santosh wrote: > I put in the following lines in main.py > > import sys > print sys.version > > The debugger console now shows: > > [Session started at 2008-01-26 11:17:03 -0800.] > 2.4.4 (#1, Oct 18 2006, 10:34:39) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] > Traceback (most recent call last): > File "/Users/oompag/Documents/coolshadow/MacGUI/test/aatest/build/ > Debug/aatest.app/Contents/Resources/main.py", line 12, in ? > import objc > ImportError: No module named objc > > hmmm ... > it is running python 2.4.4 from Xcode. > > typing python at the terminal I get: > Python 2.5.1 (r251:54863, Oct 9 2007, 20:39:46) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > > Santosh > > > > On Jan 25, 2008, at 11:04 PM, Bill Bumgarner wrote: > >> On Jan 25, 2008, at 9:10 PM, ka...@ma... wrote: >>> Following my previous message "Terminating app due to uncaught >>> exception" , I read the experience of santosh (2008-01-23), and I >>> guess mine is similar. More precisely, after Building and running >>> the application, the Xcode window says "GDB program loaded" in the >>> lower bar status. And in the Debugger window appears the message >>> "Terminating app due to uncaught exception". Looking at the >>> Debugger Console window, it looks like : >>> >>> Traceback (most recent call last): >>> File "~/Documents/Python/MySimpleClass/build/Release/ >>> MySimpleClass.app/Contents/Resources/main.py", line 10, in <module> >>> import objc >>> ImportError: No module named objc >>> >>> Is there a problem in installing PyObjC ? The module objc seems >>> not to be available to the application. What can I do ? >> >> Do you have a custom install of Python floating around? Or a >> custom install of PyObjC? >> >> b.bum >> ------------------------------------------------------------------------- >> 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: santosh <phi...@tc...> - 2008-01-26 19:33:41
|
I put in the following lines in main.py
import sys
print sys.version
The debugger console now shows:
[Session started at 2008-01-26 11:17:03 -0800.]
2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)]
Traceback (most recent call last):
File "/Users/oompag/Documents/coolshadow/MacGUI/test/aatest/build/
Debug/aatest.app/Contents/Resources/main.py", line 12, in ?
import objc
ImportError: No module named objc
hmmm ...
it is running python 2.4.4 from Xcode.
typing python at the terminal I get:
Python 2.5.1 (r251:54863, Oct 9 2007, 20:39:46)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Santosh
On Jan 25, 2008, at 11:04 PM, Bill Bumgarner wrote:
> On Jan 25, 2008, at 9:10 PM, ka...@ma... wrote:
>> Following my previous message "Terminating app due to uncaught
>> exception" , I read the experience of santosh (2008-01-23), and I
>> guess mine is similar. More precisely, after Building and running
>> the application, the Xcode window says "GDB program loaded" in the
>> lower bar status. And in the Debugger window appears the message
>> "Terminating app due to uncaught exception". Looking at the
>> Debugger Console window, it looks like :
>>
>> Traceback (most recent call last):
>> File "~/Documents/Python/MySimpleClass/build/Release/
>> MySimpleClass.app/Contents/Resources/main.py", line 10, in <module>
>> import objc
>> ImportError: No module named objc
>>
>> Is there a problem in installing PyObjC ? The module objc seems not
>> to be available to the application. What can I do ?
>
> Do you have a custom install of Python floating around? Or a custom
> install of PyObjC?
>
> b.bum
> -------------------------------------------------------------------------
> 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: Bill B. <bb...@ma...> - 2008-01-26 07:05:16
|
On Jan 25, 2008, at 9:10 PM, ka...@ma... wrote: > Following my previous message "Terminating app due to uncaught > exception" , I read the experience of santosh (2008-01-23), and I > guess mine is similar. More precisely, after Building and running > the application, the Xcode window says "GDB program loaded" in the > lower bar status. And in the Debugger window appears the message > "Terminating app due to uncaught exception". Looking at the Debugger > Console window, it looks like : > > Traceback (most recent call last): > File "~/Documents/Python/MySimpleClass/build/Release/ > MySimpleClass.app/Contents/Resources/main.py", line 10, in <module> > import objc > ImportError: No module named objc > > Is there a problem in installing PyObjC ? The module objc seems not > to be available to the application. What can I do ? Do you have a custom install of Python floating around? Or a custom install of PyObjC? b.bum |
|
From: <ka...@ma...> - 2008-01-26 05:10:23
|
Hi all,
Following my previous message "Terminating app due to uncaught
exception" , I read the experience of santosh (2008-01-23), and I
guess mine is similar. More precisely, after Building and running the
application, the Xcode window says "GDB program loaded" in the lower
bar status. And in the Debugger window appears the message
"Terminating app due to uncaught exception". Looking at the Debugger
Console window, it looks like :
Traceback (most recent call last):
File "~/Documents/Python/MySimpleClass/build/Release/
MySimpleClass.app/Contents/Resources/main.py", line 10, in <module>
import objc
ImportError: No module named objc
Is there a problem in installing PyObjC ? The module objc seems not to
be available to the application. What can I do ?
Thierry |
|
From: Michael M. <mic...@gm...> - 2008-01-25 18:26:35
|
Hi John, from a quick peek at your code, it sounds like the 'rows'
argument in indexSetFromRows_ is None, since it's trying to iterate
it.
And it looks like in tableView_writeRowsWithIndexes_toPasteboard_, you
declare the type but have commented out the setData call:
def tableView_writeRowsWithIndexes_toPasteboard_(self, tv,
rowIndexes, pboard):
typesArray = [MovedRowsType]
data = NSKeyedArchiver.archivedDataWithRootObject_(rowIndexes)
pboard.declareTypes_owner_(typesArray, self)
#pboard.setData_forType_(typesArray, self)
NSLog("boo-yeah")
return YES
I'm guessing your call to setData_forType_ should look something more like this:
pboard.setData_forType_(data, MovedRowsType), and then when you ask
for the data later in acceptDrop:
rows = info.draggingPasteboard().propertyListForType_(MovedRowsType)
you should get something other than None.
HTH,
-mike
On Jan 24, 2008 2:51 PM, John Skidgel <jo...@sk...> wrote:
>
> Hi PyObjC list,
>
> I have a table view that I'd like to add drag and drop support to. I
> borrowed a lot of code from the bookmarks example and some Objective-C
> examples I've found across the net (and I used
> tableView_writeRowsWithIndexes_toPasteboard_ rather than
> tableView_writeRows_toPasteboard_ since I read writeRows is deprecated).
> I've also modified it a little since my application is not document-based.
> Ideally the user would be able to reorder items in the table (I don't
> anticipate the need for copy and paste). I have it almost working--I can
> drag an element, but on drop, I get the following error:
>
> An unexpected error has occurred
> (TypeError: 'NoneType' object is not iterable)
>
> I've implemented the three methods I believe I'm supposed to implement for
> DND table support and I've declared a pasteboard type. I don't know if it's
> because the acceptDrop or validateDrop methods aren't working. Ideas?
>
> My code is below:
>
>
> """
> ApplicationDelegate.py
> Controller class for the application
> """
>
> from Foundation import *
> from AppKit import *
> from PyObjCTools import NibClassBuilder
> import objc
> from objc import YES, NO, IBOutlet, IBAction
>
> from ApplicationModel import *
>
> MovedRowsType = u"MOVED_ROWS_TYPE"
>
> class ApplicationDelegate(NSObject):
> # Outlets
> arrayController = objc.IBOutlet()
> tableView = objc.IBOutlet()
>
> # Class methods
> def init(self):
> self = NSObject.init(self)
> return self
>
> def awakeFromNib(self):
> # register for drag and drop
> self.tableView.registerForDraggedTypes_([MovedRowsType])
>
> def tableView_writeRowsWithIndexes_toPasteboard_(self, tv, rowIndexes,
> pboard):
> typesArray = [MovedRowsType]
> data = NSKeyedArchiver.archivedDataWithRootObject_(rowIndexes)
> pboard.declareTypes_owner_(typesArray, self)
> #pboard.setData_forType_(typesArray, self)
> NSLog("boo-yeah")
> return YES
>
> def tableView_validateDrop_proposedRow_proposedDropOperation_(self, tv,
> info, row, op):
> dragOp = NSDragOperationMove
> tv.setDropRow_dropOperation_(row, NSTableViewDropAbove)
> return dragOp
>
> def tableView_acceptDrop_row_dropOperation_(self, tv, info, row, op):
> if row < 0:
> row = 0
>
> if info.draggingSource() == self.tableView:
> rows = info.draggingPasteboard().propertyListForType_(MovedRowsType)
> indexSet = self.indexSetFromRows_(rows)
> self.moveObjectsInArrangedObjectsFromIndexes_toIndex_(indexSet, row)
>
> rowsAbove = self.rowsAboveRow_inIndexSet_(row, indexSet)
> aRange = NSMakeRange(row - rowsAbove, indexSet.count())
> indexSet = NSIndexSet.indexSetWithIndexesInRange_(aRange)
> self.arrayController.setSelectionIndexes_(indexSet)
> return YES
> return NO
>
> def moveObjectsInArrangedObjectsFromIndexes_toIndex_(self, indexSet,
> insertIndex):
> objects = self.arrayController.arrangedObjects()
> index = indexSet.lastIndex()
> aboveInsertIndexCount = 0
> removeIndex = 0
> while index != NSNotFound:
> if index >= insertIndex:
> removeIndex = index + aboveInsertIndexCount
> aboveInsertIndexCount += 1
> else:
> removeIndex = index
> insertIndex -= 1
> obj = objects.objectAtIndex_(removeIndex)
> self.arrayController.removeObjectAtArrangedObjectIndex_(removeIndex)
> self.arrayController.insertObject_atArrangedObjectIndex_(obj,
> insertIndex)
> index = indexSet.indexLessThanIndex_(index)
>
> def indexSetFromRows_(self, rows):
> indexSet = NSMutableIndexSet.indexSet()
> for row in rows:
> indexSet.addIndex_(row)
> return indexSet
>
> def rowsAboveRow_inIndexSet_(self, row, indexSet):
> currentIndex = indexSet.firstIndex()
> i = 0
> while currentIndex != NSNotFound:
> if currentIndex < row:
> i += 1
> currentIndex = indexSet.indexGreaterThanIndex_(currentIndex)
> return i
> -------------------------------------------------------------------------
> 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
>
>
--
Michael McCracken
UCSD CSE PhD Candidate
research: http://www.cse.ucsd.edu/~mmccrack/
misc: http://michael-mccracken.net/wp/
|
|
From: John S. <jo...@sk...> - 2008-01-24 22:51:21
|
Hi PyObjC list,
I have a table view that I'd like to add drag and drop support to. I
borrowed a lot of code from the bookmarks example and some Objective-C
examples I've found across the net (and I used
tableView_writeRowsWithIndexes_toPasteboard_ rather than
tableView_writeRows_toPasteboard_ since I read writeRows is
deprecated). I've also modified it a little since my application is
not document-based. Ideally the user would be able to reorder items in
the table (I don't anticipate the need for copy and paste). I have it
almost working--I can drag an element, but on drop, I get the
following error:
An unexpected error has occurred
(TypeError: 'NoneType' object is not iterable)
I've implemented the three methods I believe I'm supposed to implement
for DND table support and I've declared a pasteboard type. I don't
know if it's because the acceptDrop or validateDrop methods aren't
working. Ideas?
My code is below:
"""
ApplicationDelegate.py
Controller class for the application
"""
from Foundation import *
from AppKit import *
from PyObjCTools import NibClassBuilder
import objc
from objc import YES, NO, IBOutlet, IBAction
from ApplicationModel import *
MovedRowsType = u"MOVED_ROWS_TYPE"
class ApplicationDelegate(NSObject):
# Outlets
arrayController = objc.IBOutlet()
tableView = objc.IBOutlet()
# Class methods
def init(self):
self = NSObject.init(self)
return self
def awakeFromNib(self):
# register for drag and drop
self.tableView.registerForDraggedTypes_([MovedRowsType])
def tableView_writeRowsWithIndexes_toPasteboard_(self, tv,
rowIndexes, pboard):
typesArray = [MovedRowsType]
data = NSKeyedArchiver.archivedDataWithRootObject_(rowIndexes)
pboard.declareTypes_owner_(typesArray, self)
#pboard.setData_forType_(typesArray, self)
NSLog("boo-yeah")
return YES
def tableView_validateDrop_proposedRow_proposedDropOperation_(self,
tv, info, row, op):
dragOp = NSDragOperationMove
tv.setDropRow_dropOperation_(row, NSTableViewDropAbove)
return dragOp
def tableView_acceptDrop_row_dropOperation_(self, tv, info, row, op):
if row < 0:
row = 0
if info.draggingSource() == self.tableView:
rows =
info.draggingPasteboard().propertyListForType_(MovedRowsType)
indexSet = self.indexSetFromRows_(rows)
self.moveObjectsInArrangedObjectsFromIndexes_toIndex_(indexSet,
row)
rowsAbove = self.rowsAboveRow_inIndexSet_(row, indexSet)
aRange = NSMakeRange(row - rowsAbove, indexSet.count())
indexSet = NSIndexSet.indexSetWithIndexesInRange_(aRange)
self.arrayController.setSelectionIndexes_(indexSet)
return YES
return NO
def moveObjectsInArrangedObjectsFromIndexes_toIndex_(self,
indexSet, insertIndex):
objects = self.arrayController.arrangedObjects()
index = indexSet.lastIndex()
aboveInsertIndexCount = 0
removeIndex = 0
while index != NSNotFound:
if index >= insertIndex:
removeIndex = index + aboveInsertIndexCount
aboveInsertIndexCount += 1
else:
removeIndex = index
insertIndex -= 1
obj = objects.objectAtIndex_(removeIndex)
self.arrayController.removeObjectAtArrangedObjectIndex_(removeIndex)
self.arrayController.insertObject_atArrangedObjectIndex_(obj,
insertIndex)
index = indexSet.indexLessThanIndex_(index)
def indexSetFromRows_(self, rows):
indexSet = NSMutableIndexSet.indexSet()
for row in rows:
indexSet.addIndex_(row)
return indexSet
def rowsAboveRow_inIndexSet_(self, row, indexSet):
currentIndex = indexSet.firstIndex()
i = 0
while currentIndex != NSNotFound:
if currentIndex < row:
i += 1
currentIndex = indexSet.indexGreaterThanIndex_(currentIndex)
return i |
|
From: Ronald O. <ron...@ma...> - 2008-01-24 14:37:54
|
On 18 Jan, 2008, at 12:17, Scotty Delicious wrote: > Hello Pythonian gods and goddesses. > > I am having some trouble with pyObjC in Leopard/Xcode 3/Interface > Builder 3. > I have created a new "Cocoa-Python Applicaion" (over a dozen times > now), added a new python class (sub-class of NSObject) and tried > coding my outlets and actions by hand, instantiating the class in > IB3 and then choosing "Write Class File", I tried starting from IB3 > with a generic object, giving it a name, some outlets and actions, > then writing the file. In every case, The file shows up in Xcode > with all the info It seems I should need (see below), but when I > build and run, I get the error: You have to add 'import MySimpleClass' to the main python file, otherwise your module isn't loaded by the program. Ronald > > Unknown class `MySimpleClass' in nib file, using `NSObject' instead. > Could not connect the action ordain: to target of class NSObject > > Application did finish launching. > > > The contents of MySimpleClass.py: > from Foundation import * > from AppKit import * > import objc > class MySimpleClass (NSObject): > mscTextArea = objc.IBOutlet() > mscWindow = objc.IBOutlet() > > @objc.IBAction > def mscTest_(self, sender): > mscTextArea.setStringValue_(u"A string Value has been set.") > > Please advise. > > -- > -sD- > Dr. Scotty Delicious, DFPA. > Doctor of Fine Pirate Arts. > ------------------------------------------------------------------------- > 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: Thierry D. <ka...@ma...> - 2008-01-24 14:12:29
|
I have difficulties to run any application based on the Xcode (3.0) template Cocoa-Python Application. I have tried the tutorial 'In Control' (http://www.macresearch.org/node/4527 ). It builds normally, but it doesn't launch. When I open the debugger, I get this message ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ in line 43 of the main.m 42: if ( result != 0 ) 43: [NSException raise: NSInternalInconsistencyException 44: format: @"%s:%d main() PyRun_SimpleFile failed with file '%@'. See console for errors.", __FILE__, __LINE__, mainFilePath]; With the PyAverager tutorial of Apple, it works normally, but it follows the old way. When I tried to build it from scratch with the Xcode 3.0 template Cocoa-Python Application, I got the same message in the same file at the same line. Somebody can help me ? Best for all Thierry |
|
From: Ronald O. <ron...@ma...> - 2008-01-23 20:57:16
|
On 23 Jan, 2008, at 17:00, scott herzinger wrote: > In trying to use some bridgesupport files that I generated, I came > across a couple problems that prevented files under /Library or ~/ > Library from being found. > > objc.initFrameworkWrapper throws a NameError when the bridgesupport > file is in /Library/BridgeSupport. It throws an ImportError when the > bridgesupport file is in ~/Library/BridgeSupport. > > The former looks like a typo in objc/_bridgesupport.py where > "framework" is misspelled as "framwork". I think the latter is a > result of not expanding "~" to the user's home directory. Replacing > the path with os.path.expanduser(path) fixes it for me. The patch I'm > using follows. Thanks for the report. I've applied a simular fix to the pyobjc repository, which will some day be pyobjc 2.1. FWIW You'll probably have to add a flag to enable loading bridgesupport files ~/Library/BridgeSupport or /Library/BridgeSupport because the current behaviour makes it too easy to create .app bundles that won't run on other people's machines. IMHO there are two good ways for shipping bridgesupport files: (1) inside the framework itself and (2) as a PyObjC.bridgesupport file inside the python wrapper for the framework. The former has the advantage that other language bridges can also use the file, but can of course only be done by the author of the framework. Ronald |
|
From: SourceForge.net <no...@so...> - 2008-01-23 20:15:58
|
Bugs item #1878469, was opened at 2008-01-23 12:16 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=1878469&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: MacPorts issue with installation Initial Comment: Hey, I tried installing PyObjC for the last two days now. I installed the current version of MacPorts, because I am somewhat lazy about manually installing stuff and such. Furthermore, for I am not the biggest fan of terminals (shame on me :D) I installed Porticus. Porticus returns this upon installing PyObjC: Fetching py-pyobjc Attempting to fetch pyobjc-1.4.tar.gz from http://pyobjc.sourceforge.net/software/ Attempting to fetch pyobjc-1.4.tar.gz from http://svn.macports.org/repository/macports/distfiles/py-pyobjc Attempting to fetch pyobjc-1.4.tar.gz from http://svn.macports.org/repository/macports/distfiles/general/ Attempting to fetch pyobjc-1.4.tar.gz from http://svn.macports.org/repository/macports/downloads/py-pyobjc Error: Target org.macports.fetch returned: fetch failed Error: Status 1 encountered during processing. My System is G4 PowerPC running OS X 10.4.11. Cheers. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1878469&group_id=14534 |
|
From: scott h. <sc...@ya...> - 2008-01-23 17:28:47
|
In trying to use some bridgesupport files that I generated, I came
across a couple problems that prevented files under /Library or ~/
Library from being found.
objc.initFrameworkWrapper throws a NameError when the bridgesupport
file is in /Library/BridgeSupport. It throws an ImportError when the
bridgesupport file is in ~/Library/BridgeSupport.
The former looks like a typo in objc/_bridgesupport.py where
"framework" is misspelled as "framwork". I think the latter is a
result of not expanding "~" to the user's home directory. Replacing
the path with os.path.expanduser(path) fixes it for me. The patch I'm
using follows.
Scott
--- ORIG/_bridgesupport.py 2008-01-22 17:02:42.000000000 -0500
+++ _bridgesupport.py 2008-01-23 10:57:29.000000000 -0500
@@ -151,12 +151,12 @@
# locations
fn = frameworkName + '.bridgesupport'
for dn in _gBridgeSupportDirectories:
- path = os.path.join(dn, fn)
+ path = os.path.expanduser(os.path.join(dn, fn))
if os.path.exists(path):
data = open(path, 'rb').read()
doc = ET.fromstring(data)
- dylib_path = os.path.join(dn, framworkName + '.dylib')
+ dylib_path = os.path.join(dn, frameworkName + '.dylib')
if os.path.exists(dylib_path):
_parseBridgeSupport(data, globals, frameworkName,
dylib_path)
else:
|
|
From: Bill B. <bb...@ma...> - 2008-01-23 16:50:56
|
On Jan 22, 2008, at 5:13 PM, santosh wrote: > I am on a brand new IMac. > > Made a "Cocoa-Python Application" in XCode and tried to Build and run > it. > Xcode tells me that the application is running. > But I don't see the application or it's window. > The Xcode window says "GDB: Program loaded" in the lower status bar > > I tried this on a different Mac with the same results. > > I am rather new to Cocoa. > What am I doing wrong ? Did the icon show up in the dock? Have you installed anything Python related outside of what was already on the system? b.bum |
|
From: John S. <jo...@sk...> - 2008-01-23 06:45:33
|
Hi Ronald, Thanks for the response. I had declared class properties as you listed, but I had also written the accessors in a way that would collide in Python. Since I'm using bindings, I guess I only need to declare the properties and let the bindings do the magic. The second error occurred because I didn't connect the arrayController to the ApplicationDelegate in Interface Builder. Once I did that, everything was fine. Cheers, John On Jan 22, 2008, at 9:41 AM, Ronald Oussoren wrote: > John, > > Could you post the code, that would make discussion easier. > > The first error you're getting is probably because you do something > like this: > > def setFoo_(self, value): > self.foo = value > > > def foo(self): > return self.foo > > > That works in Objective-C, but no in python, the method foo and the > instance variable foo live in the same namespace in Python (more or > less, reality is slightly more complex than that). > > The non-accessor version probably needs a property definition: > > class FileModel (NSObject): > foo = objc.ivar() > > Ronald > > > On 22 Jan, 2008, at 0:08, John Skidgel wrote: > >> Hi All, >> >> Forgive me but I'm new to PyObjC. >> >> I'm trying to add a directory path to an NSTableView programatically. >> >> In Interface builder, I have an NSTableView with columns bound to an >> NSArrayController. It's called arrayController and it's class name is >> FileModel, which is a Python class in my XCode project. >> ArrayController has fileName, and fileLocation as keys. FileModel.py >> has instance variables for both of these. >> >> Below the table, I have an Add and a Remove button. The Add button >> displays an Open panel as a sheet. Upon selecting a file and clicking >> OK, a method named, didEndSheet_returnCode_contextInfo_ creates a >> FileModel object, myFile and uses sheet.filename() to set >> fileLocation >> and sheet.filename().lastPathComponent() to set fileName. I can use >> NSLog and successfully trace these attributes. Where the program >> fails >> is in adding this myFile instance to arrayController instance. >> >> The current flow is: >> 1 The user launches the application >> 2 The user clicks Add button >> 3 The application displays a File Open panel as a sheet >> 4 The user browses to a file and selects it >> 5 The user clicks open >> 6 Error occurs >> >> I've added accessor methods for the FileModel class and I get this >> error at step 6: >> >> (TypeError: cannot change a method) >> >> If I remove the accessor methods, I get the following error dialog in >> step 6: >> >> (AttributeError: 'NoneType' object has no attribute 'addObject_') >> >> I've read a few tutorials on bindings but I'm still fuzzy on whether >> there's a disconnect between the NSArrayController in the Nib file >> and >> code in the delegate or if it's a type conversion problem. >> >> Any ideas? >> >> Cheers, >> >> John >> >> ------------------------------------------------------------------------- >> 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: santosh <phi...@tc...> - 2008-01-23 01:14:07
|
I am on a brand new IMac. Made a "Cocoa-Python Application" in XCode and tried to Build and run it. Xcode tells me that the application is running. But I don't see the application or it's window. The Xcode window says "GDB: Program loaded" in the lower status bar I tried this on a different Mac with the same results. I am rather new to Cocoa. What am I doing wrong ? Any ideas ? ------------------ I tried the same thing with "Cocoa-Ruby Application" Everything works fine. I see the application running. Santosh Philip |
|
From: Ronald O. <ron...@ma...> - 2008-01-22 17:42:15
|
John,
Could you post the code, that would make discussion easier.
The first error you're getting is probably because you do something
like this:
def setFoo_(self, value):
self.foo = value
def foo(self):
return self.foo
That works in Objective-C, but no in python, the method foo and the
instance variable foo live in the same namespace in Python (more or
less, reality is slightly more complex than that).
The non-accessor version probably needs a property definition:
class FileModel (NSObject):
foo = objc.ivar()
Ronald
On 22 Jan, 2008, at 0:08, John Skidgel wrote:
> Hi All,
>
> Forgive me but I'm new to PyObjC.
>
> I'm trying to add a directory path to an NSTableView programatically.
>
> In Interface builder, I have an NSTableView with columns bound to an
> NSArrayController. It's called arrayController and it's class name is
> FileModel, which is a Python class in my XCode project.
> ArrayController has fileName, and fileLocation as keys. FileModel.py
> has instance variables for both of these.
>
> Below the table, I have an Add and a Remove button. The Add button
> displays an Open panel as a sheet. Upon selecting a file and clicking
> OK, a method named, didEndSheet_returnCode_contextInfo_ creates a
> FileModel object, myFile and uses sheet.filename() to set fileLocation
> and sheet.filename().lastPathComponent() to set fileName. I can use
> NSLog and successfully trace these attributes. Where the program fails
> is in adding this myFile instance to arrayController instance.
>
> The current flow is:
> 1 The user launches the application
> 2 The user clicks Add button
> 3 The application displays a File Open panel as a sheet
> 4 The user browses to a file and selects it
> 5 The user clicks open
> 6 Error occurs
>
> I've added accessor methods for the FileModel class and I get this
> error at step 6:
>
> (TypeError: cannot change a method)
>
> If I remove the accessor methods, I get the following error dialog in
> step 6:
>
> (AttributeError: 'NoneType' object has no attribute 'addObject_')
>
> I've read a few tutorials on bindings but I'm still fuzzy on whether
> there's a disconnect between the NSArrayController in the Nib file and
> code in the delegate or if it's a type conversion problem.
>
> Any ideas?
>
> Cheers,
>
> John
>
> -------------------------------------------------------------------------
> 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: John S. <jo...@sk...> - 2008-01-21 23:08:35
|
Hi All, Forgive me but I'm new to PyObjC. I'm trying to add a directory path to an NSTableView programatically. In Interface builder, I have an NSTableView with columns bound to an NSArrayController. It's called arrayController and it's class name is FileModel, which is a Python class in my XCode project. ArrayController has fileName, and fileLocation as keys. FileModel.py has instance variables for both of these. Below the table, I have an Add and a Remove button. The Add button displays an Open panel as a sheet. Upon selecting a file and clicking OK, a method named, didEndSheet_returnCode_contextInfo_ creates a FileModel object, myFile and uses sheet.filename() to set fileLocation and sheet.filename().lastPathComponent() to set fileName. I can use NSLog and successfully trace these attributes. Where the program fails is in adding this myFile instance to arrayController instance. The current flow is: 1 The user launches the application 2 The user clicks Add button 3 The application displays a File Open panel as a sheet 4 The user browses to a file and selects it 5 The user clicks open 6 Error occurs I've added accessor methods for the FileModel class and I get this error at step 6: (TypeError: cannot change a method) If I remove the accessor methods, I get the following error dialog in step 6: (AttributeError: 'NoneType' object has no attribute 'addObject_') I've read a few tutorials on bindings but I'm still fuzzy on whether there's a disconnect between the NSArrayController in the Nib file and code in the delegate or if it's a type conversion problem. Any ideas? Cheers, John |
|
From: Scotty D. <sco...@gm...> - 2008-01-18 11:17:55
|
Hello Pythonian gods and goddesses.
I am having some trouble with pyObjC in Leopard/Xcode 3/Interface Builder 3.
I have created a new "Cocoa-Python Applicaion" (over a dozen times now),
added a new python class (sub-class of NSObject) and tried coding my outlets
and actions by hand, instantiating the class in IB3 and then choosing "Write
Class File", I tried starting from IB3 with a generic object, giving it a
name, some outlets and actions, then writing the file. In every case, The
file shows up in Xcode with all the info It seems I should need (see below),
but when I build and run, I get the error:
*Unknown class `MySimpleClass' in nib file, using `NSObject' instead.*
*Could not connect the action ordain: to target of class NSObject*
*Application did finish launching.*
The contents of MySimpleClass.py:
from Foundation import *
from AppKit import *
import objc
class MySimpleClass (NSObject):
mscTextArea = objc.IBOutlet()
mscWindow = objc.IBOutlet()
@objc.IBAction
def mscTest_(self, sender):
mscTextArea.setStringValue_(u"A string Value has been set.")
Please advise.
--
-sD-
Dr. Scotty Delicious, DFPA.
Doctor of Fine Pirate Arts.
|
|
From: Robert K. <rob...@gm...> - 2008-01-17 20:12:19
|
Ronald Oussoren wrote: > > On 16 Jan, 2008, at 19:56, Barry Wark wrote: > >> I'm unable to build the latest pyobjc trunk from SVN on OS X 10.5.1. >> I'm using the system python and built-in swig (1.3.31 at >> /usr/bin/swig). I tried updating setuptools and pyrex, with no avail. > > That's odd. PyObjC doesn't even use swig. What happesn when you > temporarily uninstall pyrex? Pyrex uses the same mechanism that distutils uses for SWIG. With the Pyrex 0.9.6 release, Greg changed the way he was using it. This broke setuptools' use of the API. Phillip has a fix in SVN. easy_install -U "setuptools==dev06" -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
|
From: Barry W. <bar...@gm...> - 2008-01-17 19:43:42
|
Ronald, Thanks! That did the trick. Weird. barry On Jan 17, 2008 2:06 AM, Ronald Oussoren <ron...@ma...> wrote: > > On 16 Jan, 2008, at 19:56, Barry Wark wrote: > > > I'm unable to build the latest pyobjc trunk from SVN on OS X 10.5.1. > > I'm using the system python and built-in swig (1.3.31 at > > /usr/bin/swig). I tried updating setuptools and pyrex, with no avail. > > That's odd. PyObjC doesn't even use swig. What happesn when you > temporarily uninstall pyrex? > > Ronald > > |
|
From: Ronald O. <ron...@ma...> - 2008-01-17 10:06:31
|
On 16 Jan, 2008, at 19:56, Barry Wark wrote: > I'm unable to build the latest pyobjc trunk from SVN on OS X 10.5.1. > I'm using the system python and built-in swig (1.3.31 at > /usr/bin/swig). I tried updating setuptools and pyrex, with no avail. That's odd. PyObjC doesn't even use swig. What happesn when you temporarily uninstall pyrex? Ronald |
|
From: Barry W. <bar...@gm...> - 2008-01-16 18:56:17
|
I'm unable to build the latest pyobjc trunk from SVN on OS X 10.5.1.
I'm using the system python and built-in swig (1.3.31 at
/usr/bin/swig). I tried updating setuptools and pyrex, with no avail.
>From the pyobjc-core directory:
siegfried:pyobjc-core barry$ rm -rf build;python setup.py build
running build
running build_py
creating build
creating build/lib.macosx-10.3-i386-2.5
creating build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/__init__.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_bindglobals.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_bridges.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_bridgesupport.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_category.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_compat.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_convenience.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_descriptors.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_dyld.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_framework.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_functions.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_gnustep.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_locking.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_protocols.py -> build/lib.macosx-10.3-i386-2.5/objc
copying Lib/objc/_pythonify.py -> build/lib.macosx-10.3-i386-2.5/objc
creating build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/__init__.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/fnd.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/keyvaluehelper.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_allocatebuffer.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_archiving.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_bundleFunctions.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_bundleVariables.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_classandinst.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_clinmeth.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_conversion.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_copying.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_corefoundation.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_ctests.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_exceptions.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_filepointer.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_identity.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_imp.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_initialized.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_ivar.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_keyvalue.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_leaks.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_locking.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_metadata.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_metadata_function.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_metadata_imp.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_metadata_py.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_metadata_py2.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_metadata_py2py.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_methodaccess.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_methodedits.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_methods.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_methods2.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_NULL.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_objc.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_opaque.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_outputinitializer.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_pickle.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_posing.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_protected.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_protocol.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_protocolNamed.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_regr.py -> build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_signatures.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_sockaddr.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_splitsig.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_structpointer.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_structs.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_subclass.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_varargs.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_voidpointer.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
copying Lib/objc/test/test_weakref.py ->
build/lib.macosx-10.3-i386-2.5/objc/test
creating build/lib.macosx-10.3-i386-2.5/PyObjCTools
copying Lib/PyObjCTools/__init__.py ->
build/lib.macosx-10.3-i386-2.5/PyObjCTools
copying Lib/PyObjCTools/KeyValueCoding.py ->
build/lib.macosx-10.3-i386-2.5/PyObjCTools
copying Lib/PyObjCTools/MachSignals.py ->
build/lib.macosx-10.3-i386-2.5/PyObjCTools
copying Lib/PyObjCTools/Signals.py -> build/lib.macosx-10.3-i386-2.5/PyObjCTools
running build_ext
building 'objc._objc' extension
Traceback (most recent call last):
File "setup.py", line 329, in <module>
'': ['*.bridgesupport'],
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py",
line 151, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 974, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 994, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build.py",
line 112, in run
self.run_command(cmd_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/cmd.py",
line 333, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py",
line 994, in run_command
cmd_obj.run()
File "/Library/Python/2.5/site-packages/setuptools-0.6c7-py2.5.egg/setuptools/command/build_ext.py",
line 46, in run
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build_ext.py",
line 290, in run
self.build_extensions()
File "/Library/Python/2.5/site-packages/Pyrex-0.9.6.4-py2.5.egg/Pyrex/Distutils/build_ext.py",
line 82, in build_extensions
self.build_extension(ext)
File "/Library/Python/2.5/site-packages/setuptools-0.6c7-py2.5.egg/setuptools/command/build_ext.py",
line 175, in build_extension
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build_ext.py",
line 453, in build_extension
sources = self.swig_sources(sources, ext)
File "/Library/Python/2.5/site-packages/setuptools-0.6c7-py2.5.egg/setuptools/command/build_ext.py",
line 77, in swig_sources
TypeError: swig_sources() takes exactly 3 arguments (2 given)
Can any of the Leopard/pyobjc/swig gurus offer any suggestions?
Thanks!
Barry
|
|
From: SourceForge.net <no...@so...> - 2008-01-13 15:49:46
|
Bugs item #1870380, was opened at 2008-01-13 07: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=1870380&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: typo in 'Get Buddy Info' example Initial Comment: Line 16 of /Developer/Examples/Python/PyObjC/Automator/Get Buddy Info/GetBuddyInfo.py reads: personDescriptor = input.desciptorAtIndex_(i) but should read: personDescriptor = input.descriptorAtIndex_(i) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1870380&group_id=14534 |