pyobjc-dev Mailing List for PyObjC (Page 49)
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: Johan R. <joh...@gm...> - 2009-04-14 16:58:00
|
BTW, how do Cocoa know to seach inside English.lproj? Is there defined search order for resources? On Tue, Apr 14, 2009 at 9:40 AM, Ronald Oussoren <ron...@ma...> wrote: > > On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: > >> Odd, because I've seen people just add English.lproj to data_files. >> For example, look at >> /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. > > Adding English.lproj to data_files should just work, if it doesn't you have > found a bug in py2app. > > Ronald > > |
|
From: Ronald O. <ron...@ma...> - 2009-04-14 08:37:56
|
On 14 Apr, 2009, at 10:28, Johan Rydberg wrote: > I'll try that. Thanks for the suggestion. > > Can I modify my setup.py to automaticly convert my xib's to nibs, > using ibtool? > I suppose I need to hook up in the build phase. There is a hook in the build phase, but that hook is not yet used in alias mode. If you don't mind waiting a little longer during builds you can use "python setup.py py2app" instead of "python setup.py py2app -A" and then the XIB file should automaticly be converted once you install the version of py2app that's in the subversion repository at http://svn.pythonmac.org/py2app/py2app/trunk. I want to finish some work I've done at Pycon sometime soon, which is rather invasive and would require changes for alias mode as well. I'll fix the file conversion hooks during that merge as well. I am afraid that the work I need to finish is one of those "80% done in 20% of the time"-jobs, which means I don't have a estimate on when this will be finished. You could always add a bit of Python code to your setup.py file that calls ibtool to convert the xib files and include the converted files as your resource_data. That's not as clean as proper support in py2app, but would keep you going for now. > > I have a feeling that XIB's work better with my version control > software (bazaar). IIRC bazaar has one metadata directory at the toplevel of a project, rather than a metadata directory in every directory in your project (which subversion uses), which means both XIB's and NIB's should work just fine with bazaar. Ronald > > > > On Tue, Apr 14, 2009 at 9:51 AM, Ronald Oussoren <ron...@ma... > > wrote: >> >> On 14 Apr, 2009, at 9:46, Johan Rydberg wrote: >> >>> Looking in the dist/Foo.app/Resources, English.lproj is there and it >>> contains the MainMenu.xib file. >>> How does the code know to look into the English.lproj directory? >>> >>> When I get back from work I'll try to assemble a small tarball >>> with a >>> non-working example. >> >> Could you try if converting the ".xib" file to a ".nib" file works >> (IIRC you >> can use Save As... in Interface Builder for that, otherwise it is a >> property >> in the NIB settings)? >> >> The ".xib" files cannot be loaded directly by Cocoa but need to be >> compiled >> before they can be used. Xcode automaticly does this for you, >> released >> versions of py2app do no yet do that. The version of py2app in >> subversion >> fixes this issue for regular builds, but not for alias builds (the - >> A flag). >> >> Ronald >> >>> >>> On Tue, Apr 14, 2009 at 9:40 AM, Ronald Oussoren <ron...@ma... >>> > >>> wrote: >>>> >>>> On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: >>>> >>>>> Odd, because I've seen people just add English.lproj to >>>>> data_files. >>>>> For example, look at >>>>> /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. >>>> >>>> Adding English.lproj to data_files should just work, if it >>>> doesn't you >>>> have >>>> found a bug in py2app. >>>> >>>> Ronald >>>> >>>> >> >> |
|
From: Johan R. <joh...@gm...> - 2009-04-14 08:28:48
|
I'll try that. Thanks for the suggestion. Can I modify my setup.py to automaticly convert my xib's to nibs, using ibtool? I suppose I need to hook up in the build phase. I have a feeling that XIB's work better with my version control software (bazaar). On Tue, Apr 14, 2009 at 9:51 AM, Ronald Oussoren <ron...@ma...> wrote: > > On 14 Apr, 2009, at 9:46, Johan Rydberg wrote: > >> Looking in the dist/Foo.app/Resources, English.lproj is there and it >> contains the MainMenu.xib file. >> How does the code know to look into the English.lproj directory? >> >> When I get back from work I'll try to assemble a small tarball with a >> non-working example. > > Could you try if converting the ".xib" file to a ".nib" file works (IIRC you > can use Save As... in Interface Builder for that, otherwise it is a property > in the NIB settings)? > > The ".xib" files cannot be loaded directly by Cocoa but need to be compiled > before they can be used. Xcode automaticly does this for you, released > versions of py2app do no yet do that. The version of py2app in subversion > fixes this issue for regular builds, but not for alias builds (the -A flag). > > Ronald > >> >> On Tue, Apr 14, 2009 at 9:40 AM, Ronald Oussoren <ron...@ma...> >> wrote: >>> >>> On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: >>> >>>> Odd, because I've seen people just add English.lproj to data_files. >>>> For example, look at >>>> /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. >>> >>> Adding English.lproj to data_files should just work, if it doesn't you >>> have >>> found a bug in py2app. >>> >>> Ronald >>> >>> > > |
|
From: Ronald O. <ron...@ma...> - 2009-04-14 07:51:20
|
On 14 Apr, 2009, at 9:46, Johan Rydberg wrote: > Looking in the dist/Foo.app/Resources, English.lproj is there and it > contains the MainMenu.xib file. > How does the code know to look into the English.lproj directory? > > When I get back from work I'll try to assemble a small tarball with a > non-working example. Could you try if converting the ".xib" file to a ".nib" file works (IIRC you can use Save As... in Interface Builder for that, otherwise it is a property in the NIB settings)? The ".xib" files cannot be loaded directly by Cocoa but need to be compiled before they can be used. Xcode automaticly does this for you, released versions of py2app do no yet do that. The version of py2app in subversion fixes this issue for regular builds, but not for alias builds (the -A flag). Ronald > > On Tue, Apr 14, 2009 at 9:40 AM, Ronald Oussoren <ron...@ma... > > wrote: >> >> On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: >> >>> Odd, because I've seen people just add English.lproj to data_files. >>> For example, look at >>> /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. >> >> Adding English.lproj to data_files should just work, if it doesn't >> you have >> found a bug in py2app. >> >> Ronald >> >> |
|
From: Johan R. <joh...@gm...> - 2009-04-14 07:46:32
|
Looking in the dist/Foo.app/Resources, English.lproj is there and it contains the MainMenu.xib file. How does the code know to look into the English.lproj directory? When I get back from work I'll try to assemble a small tarball with a non-working example. On Tue, Apr 14, 2009 at 9:40 AM, Ronald Oussoren <ron...@ma...> wrote: > > On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: > >> Odd, because I've seen people just add English.lproj to data_files. >> For example, look at >> /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. > > Adding English.lproj to data_files should just work, if it doesn't you have > found a bug in py2app. > > Ronald > > |
|
From: Ronald O. <ron...@ma...> - 2009-04-14 07:40:27
|
On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: > Odd, because I've seen people just add English.lproj to data_files. > For example, look at > /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. Adding English.lproj to data_files should just work, if it doesn't you have found a bug in py2app. Ronald |
|
From: Ronald O. <ron...@ma...> - 2009-04-14 07:39:06
|
On 13 Apr, 2009, at 23:20, Paul Thomas wrote: > I have a category on NSNumber that I'm using and I can't access it > from Python when the NSNumber holds a bool because I get a builtin > bool rather than a proxy. > > for example: > >>>> type( NSNumber.numberWithInt_(1) ) > <class 'objc._pythonify.OC_PythonInt'> >>>> type( NSNumber.numberWithBool_(1) ) > <type 'bool'> > > What gives? Is this intentional? Any idea how to work around it? This is intentional. The proxy automaticly translates the Cocoa boolean singletons to the Python boolean singletons and vice versa. Ronald > > Paul. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Johan R. <joh...@gm...> - 2009-04-14 06:55:13
|
Odd, because I've seen people just add English.lproj to data_files. For example, look at /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. Thanks for your code example. On Tue, Apr 14, 2009 at 2:57 AM, Ian Beck <ia...@on...> wrote: > Hey Johan, > > The problem is likely with your data_files declaration. You can't > just toss data_files a folder and have it intelligently include > everything in it. You have to give it a complete file list of > everything you want included in your project. > > Here's the code that I'm using to automatically populate data_files; > it may have issues (probably should be modified to exclude .svn > folders if you're using SVN, for instance), but at least it's an > example of the kind of thing you'll need to do: > > import os > > # Sets what directory to crawl for files to include > # Relative to location of setup.py; leave off trailing slash > includes_dir = 'src' > > # Set the root directory for included files > # Relative to the bundle's Resources folder, so '../../' targets > bundle root > includes_target = '../../' > > # Initialize an empty list so we can use list.append() > includes = [] > > # Walk the includes directory and include all the files > for root, dirs, filenames in os.walk(includes_dir): > if root is includes_dir: > final = includes_target > else: > final = includes_target + root[len(includes_dir)+1:] + '/' > files = [] > for file in filenames: > if (file[0] != '.'): > files.append(os.path.join(root, file)) > includes.append((final, files)) > > setup( > name='Foo', > app = ['main.py'], > data_files = includes, > ) > > Ian > > On Apr 13, 2009, at 1:23 PM, Johan Rydberg wrote: > >> I've created a PyObjC project using Xcode, and everything works just >> fine when I hit Build and Go. >> >> But it happens that I'm better suited for using emacs and command-line >> tools, so I tried to write up >> a simple setup.py; >> >> #... >> setup( >> name="Foo", >> app=["main.py"], >> data_files=["English.lproj"], >> ) >> >> Running setup.py py2app -A creates the dist and build directories. >> The problem starts when trying >> to run the executable: >> >> 2009-04-13 22:22:29.513 Foo[46645:10b] Unable to load nib file: >> MainMenu, exiting >> >> Has I missed anything in my setup.py file? >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > —————————————————— > Ian Beck > ia...@on... > > Tagamac: simple mac tagging > http://tagamac.com > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
|
From: Ian B. <ia...@on...> - 2009-04-14 00:57:56
|
Hey Johan,
The problem is likely with your data_files declaration. You can't
just toss data_files a folder and have it intelligently include
everything in it. You have to give it a complete file list of
everything you want included in your project.
Here's the code that I'm using to automatically populate data_files;
it may have issues (probably should be modified to exclude .svn
folders if you're using SVN, for instance), but at least it's an
example of the kind of thing you'll need to do:
import os
# Sets what directory to crawl for files to include
# Relative to location of setup.py; leave off trailing slash
includes_dir = 'src'
# Set the root directory for included files
# Relative to the bundle's Resources folder, so '../../' targets
bundle root
includes_target = '../../'
# Initialize an empty list so we can use list.append()
includes = []
# Walk the includes directory and include all the files
for root, dirs, filenames in os.walk(includes_dir):
if root is includes_dir:
final = includes_target
else:
final = includes_target + root[len(includes_dir)+1:] + '/'
files = []
for file in filenames:
if (file[0] != '.'):
files.append(os.path.join(root, file))
includes.append((final, files))
setup(
name='Foo',
app = ['main.py'],
data_files = includes,
)
Ian
On Apr 13, 2009, at 1:23 PM, Johan Rydberg wrote:
> I've created a PyObjC project using Xcode, and everything works just
> fine when I hit Build and Go.
>
> But it happens that I'm better suited for using emacs and command-line
> tools, so I tried to write up
> a simple setup.py;
>
> #...
> setup(
> name="Foo",
> app=["main.py"],
> data_files=["English.lproj"],
> )
>
> Running setup.py py2app -A creates the dist and build directories.
> The problem starts when trying
> to run the executable:
>
> 2009-04-13 22:22:29.513 Foo[46645:10b] Unable to load nib file:
> MainMenu, exiting
>
> Has I missed anything in my setup.py file?
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
——————————————————
Ian Beck
ia...@on...
Tagamac: simple mac tagging
http://tagamac.com
|
|
From: Paul T. <spo...@ma...> - 2009-04-13 21:20:41
|
I have a category on NSNumber that I'm using and I can't access it from Python when the NSNumber holds a bool because I get a builtin bool rather than a proxy. for example: >>> type( NSNumber.numberWithInt_(1) ) <class 'objc._pythonify.OC_PythonInt'> >>> type( NSNumber.numberWithBool_(1) ) <type 'bool'> What gives? Is this intentional? Any idea how to work around it? Paul. |
|
From: Johan R. <joh...@gm...> - 2009-04-13 20:24:20
|
I've created a PyObjC project using Xcode, and everything works just
fine when I hit Build and Go.
But it happens that I'm better suited for using emacs and command-line
tools, so I tried to write up
a simple setup.py;
#...
setup(
name="Foo",
app=["main.py"],
data_files=["English.lproj"],
)
Running setup.py py2app -A creates the dist and build directories.
The problem starts when trying
to run the executable:
2009-04-13 22:22:29.513 Foo[46645:10b] Unable to load nib file:
MainMenu, exiting
Has I missed anything in my setup.py file?
|
|
From: Ronald O. <ron...@ma...> - 2009-04-13 14:46:09
|
On 13 Apr, 2009, at 16:10, Orestis Markou wrote: > Thanks - is that something you are going to do for b2 or is it > something we should patch ourselves? This will be fixed by the time 2.2b2 is released. I have no timeline for when 2.2b2 will be released, may plan's for the near future: * 2.2b2: all examples have been verified to work correctly with 2.2 on Leopard, unittests for frameworks are complete and pass * 2.2b3: fix a number of issues on my private bugtracker, check for memoryleaks, check with Shark if there are obvious performance issues, test with 64-bit builds. * 2.2: migrate PyObjC website to Trac Somewhere in between I want to finish work I did during the sprints at PyCon: I have at 90% of the code that's needed to properly support eggs in py2app, but need to properly integrate that code. The hard part is reverse engeneering py2app & friends to find the right way to do that integration without completely rewriting py2app. BTW. In the long run you should use "from Quartz import *" rather than from "Quartz.QuartzCore import *", the latter are there as a grouping mechanism for PyObjC itself while the former better reflects the official name. Ronald > -- > or...@or... > http://orestis.gr/ > > > > > On 8 Apr 2009, at 08:46, Ronald Oussoren wrote: > >> I had noticed the issue with CoreVideo, but haven't had time yet to >> do anything about it. >> >> The easiest workaround for the QuartzCore issue is to remove the >> import of CoreVideo from its __init__.py file. >> >> Ronald >> >> On 8 Apr, 2009, at 1:16, Orestis Markou wrote: >> >>> Just easy_installed PyObjC 2.2b1 into a fresh virtualenv. >>> >>> Other than the issue that 'from Quartz import *' that I know is >>> fixed >>> in trunk, CoreVideo seems to be broken: >>> >>>>>> from Quartz.CoreVideo import * >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- >>> packages/pyobjc_framework_Quartz-2.2b1-py2.5-macosx-10.5-i386.egg/ >>> Quartz/CoreVideo/__init__.py", line 17, in <module> >>> scan_classes=False) >>> File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- >>> packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/ >>> _bridgesupport.py", line 144, in initFrameworkWrapper >>> _parseBridgeSupport(data, globals, frameworkName, >>> inlineTab=inlineTab) >>> File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- >>> packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/ >>> _bridgesupport.py", line 57, in _parseBridgeSupport >>> objc.parseBridgeSupport(data, globals, frameworkName, *args, >>> **kwds) >>> objc.internal_error: PyObjCRT_SkipTypeSpec: Unhandled type '65' >>> encode(CVTimeStamp*) >>> >>> This also breaks QuartzCore (which imports CoreVideo), which >>> contains >>> a lot of CoreAnimation constants, and it's a showstopper for our >>> adoption of PyObjC 2.2 (we'd quite like to use it, we're using the >>> Leopard version currently). >>> >>> Not sure if this is fixed on the trunk - didn't see anything >>> relevant >>> in the commit logs. Any documentation on building from trunk so we >>> can >>> help with bug reports? With virtualenv it's very easy to run an >>> application on both 2.0 and 2.2 and report breakage. >>> >>> Orestis >>> -- >>> or...@or... >>> http://orestis.gr/ >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by: >>> High Quality Requirements in a Collaborative Environment. >>> Download a free trial of Rational Requirements Composer Now! >>> http://p.sf.net/sfu/www-ibm-com >>> _______________________________________________ >>> Pyobjc-dev mailing list >>> Pyo...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev >> > |
|
From: Orestis M. <or...@or...> - 2009-04-13 14:10:22
|
Thanks - is that something you are going to do for b2 or is it something we should patch ourselves? -- or...@or... http://orestis.gr/ On 8 Apr 2009, at 08:46, Ronald Oussoren wrote: > I had noticed the issue with CoreVideo, but haven't had time yet to > do anything about it. > > The easiest workaround for the QuartzCore issue is to remove the > import of CoreVideo from its __init__.py file. > > Ronald > > On 8 Apr, 2009, at 1:16, Orestis Markou wrote: > >> Just easy_installed PyObjC 2.2b1 into a fresh virtualenv. >> >> Other than the issue that 'from Quartz import *' that I know is fixed >> in trunk, CoreVideo seems to be broken: >> >>>>> from Quartz.CoreVideo import * >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- >> packages/pyobjc_framework_Quartz-2.2b1-py2.5-macosx-10.5-i386.egg/ >> Quartz/CoreVideo/__init__.py", line 17, in <module> >> scan_classes=False) >> File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- >> packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/ >> _bridgesupport.py", line 144, in initFrameworkWrapper >> _parseBridgeSupport(data, globals, frameworkName, >> inlineTab=inlineTab) >> File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- >> packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/ >> _bridgesupport.py", line 57, in _parseBridgeSupport >> objc.parseBridgeSupport(data, globals, frameworkName, *args, >> **kwds) >> objc.internal_error: PyObjCRT_SkipTypeSpec: Unhandled type '65' >> encode(CVTimeStamp*) >> >> This also breaks QuartzCore (which imports CoreVideo), which contains >> a lot of CoreAnimation constants, and it's a showstopper for our >> adoption of PyObjC 2.2 (we'd quite like to use it, we're using the >> Leopard version currently). >> >> Not sure if this is fixed on the trunk - didn't see anything relevant >> in the commit logs. Any documentation on building from trunk so we >> can >> help with bug reports? With virtualenv it's very easy to run an >> application on both 2.0 and 2.2 and report breakage. >> >> Orestis >> -- >> or...@or... >> http://orestis.gr/ >> >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> High Quality Requirements in a Collaborative Environment. >> Download a free trial of Rational Requirements Composer Now! >> http://p.sf.net/sfu/www-ibm-com >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
|
From: Orestis M. <or...@or...> - 2009-04-13 08:04:32
|
Hi, There's no reason to import the class in main.py - you're not going to use it there anyway. You only need to import modules that contain classes that you have used in the NIB. For example, I have put an NSView subclass in my AppDelegate.py file (that's imported by default) and everything's ticking along happily. Orestis -- or...@or... http://orestis.gr/ On 13 Apr 2009, at 10:53, Johan Rydberg wrote: > Hi > > I have yet to write my first PyObj-C program, so I'm still poking > through examples and reading > tutorials. > > One thing that strikes me as odd is that if people refer to a class > called Foo in their NIB, they > do a import "Foo" in their main.py file. If you refer to a class in a > NIB file, does that translate > to module.Class where module and Class has the same name? > > For me it's more natural to write "from module import Class". Will > that work? > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Johan R. <joh...@gm...> - 2009-04-13 07:54:01
|
Hi I have yet to write my first PyObj-C program, so I'm still poking through examples and reading tutorials. One thing that strikes me as odd is that if people refer to a class called Foo in their NIB, they do a import "Foo" in their main.py file. If you refer to a class in a NIB file, does that translate to module.Class where module and Class has the same name? For me it's more natural to write "from module import Class". Will that work? |
|
From: Greg E. <gre...@ca...> - 2009-04-13 01:25:13
|
PyGUI 2.0.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes some problems in setup.py affecting installation on Linux and Windows. What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gregory Ewing gre...@ca... http://www.cosc.canterbury.ac.nz/greg.ewing/ |
|
From: Greg E. <gre...@ca...> - 2009-04-12 23:53:30
|
James Eagan wrote: > You can use a delegate method on a NSMenu to update > the menu items before it is shown : > > <http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSMenu_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/menuNeedsUpdate:> Yep, that works fine, thanks. -- Greg |
|
From: Daniel L. <da...@br...> - 2009-04-12 17:06:05
|
> > Anyone have any ideas how I can detect a mouse down event in the menu bar? Most objects that a user or the system interacts with provide delegate methods allowing your application to be notified of ahead of a state changes and after a state changes. The delegation (Observer) design pattern is a recurring pattern in Cocoa (as it is in Java) and other OOP frameworks I don't do much more than simple apps with PyObjC preferring ObjC-C++ for my work but an invaluable Cocoa resource, besides the usual instructional books like Hillegass 3rd, the dated Anguish, Buck et all, etc., etc., is AppKiDo ( http://homepage.mac.com/aglee/downloads/appkido.html). It's free and indispensible for me. In AppKiDo, if you select AppKit and then NSMenu, you'll see a tab for the delegate methods which provides a good list of what is available. - daniel |
|
From: Ronald O. <ron...@ma...> - 2009-04-12 11:38:12
|
Mani, I just commited a framework wrapper for CFNetwork: pyobjc-framework- CFNetwork. This also wraps the function CFNetworkCopyProxiesForAutoConfigurationScript. These bindings are not entire complete yet, I haven't implemented the C code that's needed for the asynchronous interface yet (such as CFNetworkExecuteProxyAutoConfigurationScript). The bindings are not yet published on pypi, you'll have to download them from the subversion repository if you want to use them. The bindings require PyObjC 2.2b1 (or later), the setup.py requires pyobjc- framework-Cocoa from the repository as well but should work with 2.2b1 as well if you edit setup.py. Ronald On 30 Mar, 2009, at 20:43, Mani Ghasemlou wrote: > Hi all, > CFNetworkCopyProxiesForAutoConfigurationScript is a new API available > in 10.5: http://developer.apple.com/releasenotes/Networking/RN-CFNetwork/index.html#/ > /apple_ref/doc/uid/TP40000990-DontLinkElementID_3 > > However, I don't think it is supported by PyObjC (doesn't show up in > the namespace after importing Foundation or CoreFoundation). > > Any way I can work around this? > > I have an app built using PyObjC, using Python's urllib2 for HTTP > access. urllib2 handles "manual" proxies as configured in System > Preferences, but not PAC file proxy configurations. I would like to > support PAC files in my application and > CFNetworkCopyProxiesForAutoConfigurationScript seemed like the answer, > but now I'm struggling. > > Any ideas greatly appreciated. > > Cheers, > Mani > > ------------------------------------------------------------------------------ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Greg E. <gre...@ca...> - 2009-04-11 11:09:26
|
PyGUI 2.0 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Highlights of this release: * Native Windows implementation, based on pywin32 and ctypes. * Full set of Postscript-style path construction operators available on all platforms. * Mouse and keyboard events can be intercepted for all component classes. Plus numerous minor improvements, see CHANGES on the website for details. What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. Acknowledgements ---------------- Thanks are due to Patrick Forget and Erez-Sh for getting me started on the Windows implementation. Even though I didn't use much of their code in the end, I appreciate their efforts and may draw more from it in the future. -- Gregory Ewing gre...@ca... http://www.cosc.canterbury.ac.nz/greg.ewing/ |
|
From: Ronald O. <ron...@ma...> - 2009-04-09 09:44:41
|
AFAIK NSMenu has a delegate method that gets called just before the menu is shown. Implementing "menuNeedsUpdate_" in an NSMenu delegate should do the trick, Apple's documentation for this method: Called when a menu is about to be displayed at the start of a tracking session so the delegate can modify the menu. - (void)menuNeedsUpdate:(NSMenu *)menu Parametersmenu The menu object that is about to be displayed. Discussion You can change the menu by adding, removing or modifying menu items. Be sure to set the proper enable state for any new menu items. If populating the menu will take a long time, implementnumberOfItemsInMenu: and menu:updateItem:atIndex:shouldCancel: instead. Ronald On 9 Apr, 2009, at 10:41, Greg Ewing wrote: > Anyone have any ideas how I can detect a mouse down > event in the menu bar? > > I need this in PyGUI so I can set up the menus before > they get pulled down. > > I've tried overriding sendEvent_() in NApplication, > but mouse events in the menu bar seem to get > swallowed before making it that far. > > So far I've been using a strange system-defined event > that 10.4 produces when you click on the menu bar, > but I'm told that this event no longer occurs in > 10.5, so I need to find another way. > > -- > Greg > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Greg E. <gre...@ca...> - 2009-04-09 08:40:08
|
Anyone have any ideas how I can detect a mouse down event in the menu bar? I need this in PyGUI so I can set up the menus before they get pulled down. I've tried overriding sendEvent_() in NApplication, but mouse events in the menu bar seem to get swallowed before making it that far. So far I've been using a strange system-defined event that 10.4 produces when you click on the menu bar, but I'm told that this event no longer occurs in 10.5, so I need to find another way. -- Greg |
|
From: Ronald O. <ron...@ma...> - 2009-04-08 05:46:32
|
I had noticed the issue with CoreVideo, but haven't had time yet to do anything about it. The easiest workaround for the QuartzCore issue is to remove the import of CoreVideo from its __init__.py file. Ronald On 8 Apr, 2009, at 1:16, Orestis Markou wrote: > Just easy_installed PyObjC 2.2b1 into a fresh virtualenv. > > Other than the issue that 'from Quartz import *' that I know is fixed > in trunk, CoreVideo seems to be broken: > >>>> from Quartz.CoreVideo import * > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- > packages/pyobjc_framework_Quartz-2.2b1-py2.5-macosx-10.5-i386.egg/ > Quartz/CoreVideo/__init__.py", line 17, in <module> > scan_classes=False) > File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- > packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/ > _bridgesupport.py", line 144, in initFrameworkWrapper > _parseBridgeSupport(data, globals, frameworkName, > inlineTab=inlineTab) > File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site- > packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/ > _bridgesupport.py", line 57, in _parseBridgeSupport > objc.parseBridgeSupport(data, globals, frameworkName, *args, > **kwds) > objc.internal_error: PyObjCRT_SkipTypeSpec: Unhandled type '65' > encode(CVTimeStamp*) > > This also breaks QuartzCore (which imports CoreVideo), which contains > a lot of CoreAnimation constants, and it's a showstopper for our > adoption of PyObjC 2.2 (we'd quite like to use it, we're using the > Leopard version currently). > > Not sure if this is fixed on the trunk - didn't see anything relevant > in the commit logs. Any documentation on building from trunk so we can > help with bug reports? With virtualenv it's very easy to run an > application on both 2.0 and 2.2 and report breakage. > > Orestis > -- > or...@or... > http://orestis.gr/ > > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
|
From: Orestis M. <or...@or...> - 2009-04-07 23:16:17
|
Just easy_installed PyObjC 2.2b1 into a fresh virtualenv.
Other than the issue that 'from Quartz import *' that I know is fixed
in trunk, CoreVideo seems to be broken:
>>> from Quartz.CoreVideo import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site-
packages/pyobjc_framework_Quartz-2.2b1-py2.5-macosx-10.5-i386.egg/
Quartz/CoreVideo/__init__.py", line 17, in <module>
scan_classes=False)
File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site-
packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/
_bridgesupport.py", line 144, in initFrameworkWrapper
_parseBridgeSupport(data, globals, frameworkName,
inlineTab=inlineTab)
File "/Users/orestis/Developer/virtualenvs/edm/lib/python2.5/site-
packages/pyobjc_core-2.2b1-py2.5-macosx-10.5-i386.egg/objc/
_bridgesupport.py", line 57, in _parseBridgeSupport
objc.parseBridgeSupport(data, globals, frameworkName, *args,
**kwds)
objc.internal_error: PyObjCRT_SkipTypeSpec: Unhandled type '65'
encode(CVTimeStamp*)
This also breaks QuartzCore (which imports CoreVideo), which contains
a lot of CoreAnimation constants, and it's a showstopper for our
adoption of PyObjC 2.2 (we'd quite like to use it, we're using the
Leopard version currently).
Not sure if this is fixed on the trunk - didn't see anything relevant
in the commit logs. Any documentation on building from trunk so we can
help with bug reports? With virtualenv it's very easy to run an
application on both 2.0 and 2.2 and report breakage.
Orestis
--
or...@or...
http://orestis.gr/
|
|
From: Orestis M. <or...@or...> - 2009-04-07 22:38:16
|
>PyObjC 2.2b1 was released on October 24th 2007. >See the NEWS file for details. Had us wondering for a few minutes :) Orestis -- or...@or... http://orestis.gr/ |