<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.python.pyobjc.devel">
    <title>gmane.comp.python.pyobjc.devel</title>
    <link>http://blog.gmane.org/gmane.comp.python.pyobjc.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5046"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5045"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5044"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5043"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5042"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5041"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5040"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5039"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5038"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5037"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5036"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5035"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5034"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5033"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5032"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5031"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5030"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5029"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5028"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5027"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5046">
    <title>Re: Noob problem: My First PyObjC app</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5046</link>
    <description>After some more digging, I found out that XCode munges the original  
file hierarchy of your libraries. If you look inside Twite.app/ 
Contents/Resources, you'll see that scanner.py is in the root folder,  
although it should be inside of the simplejson folder.

Here's the solution:

1. Download a new simplejson version from http://pypi.python.org/pypi/simplejson 
  , and replace the old copy. Also, make sure there are no  
simplejson.py files in the root of your project.

2. Delete the folder reference to simplejson in your XCode project,  
and do a Resources &gt; Right click &gt; add existing files... &gt; [ your new  
simplejson folder] &gt; Create folder references. This last step is very  
important, and makes sure the package hierarchy is maintained.

3. Somewhere in your project was a reference to Scanner, with a  
capital 'S'. Replace that with a lowercase 's'.

3. Do a clean build of your project, so no extraneous simplejson.py  
files clutter up the system.

Here's a version that includes the above changes:

http://www.megaupload.com/?d=FOPDBQVI

Kind regards,

Frederik

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Frederik De Bleser</dc:creator>
    <dc:date>2008-11-25T18:40:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5045">
    <title>Noob problem: My First PyObjC app</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5045</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Pyobjc-dev mailing list
Pyobjc-dev&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
</description>
    <dc:creator>Alejandro Novo</dc:creator>
    <dc:date>2008-11-25T18:17:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5044">
    <title>Re: Compiling PyObjC 2.0 trunk on 10.4</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5044</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Pyobjc-dev mailing list
Pyobjc-dev&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
</description>
    <dc:creator>Ronald Oussoren</dc:creator>
    <dc:date>2008-11-19T07:08:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5043">
    <title>Re: Compiling PyObjC 2.0 trunk on 10.4</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5043</link>
    <description>

So, I've made some progress on my own.

Manually generating the metadata for the ExceptionHandling framework  
(for example) in a PyObjC.bridgesupport file which I put in pyobjc- 
framework-ExceptionHandling/Lib/ExceptionHandling allows the tests to  
pass. Installing this and then using it works fine but ONLY with alias  
builds (py2app -A). Using a bundled build fails with the same error  
than without the bridgesupport file.

So now what ? :)

</description>
    <dc:creator>Luc Heinrich</dc:creator>
    <dc:date>2008-11-18T21:15:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5042">
    <title>Compiling PyObjC 2.0 trunk on 10.4</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5042</link>
    <description>Greetings,

The PyObjC application I'm working on has to run on 10.4 and 10.5,  
which currently forces me to use PyObjC 1.4 on 10.4 to build the app,  
which recently started to cause some very weird performance issues so  
I would *really* like to use PyObjC 2 now.

I'm trying to build the latest sources from trunk on 10.4 and I get  
errors with pyobjc-framework-Cocoa because:
- NSUInteger does not exist on 10.4.
- _CoreFoundation_CFBinaryHeap.m defines an NSObject category with no  
name, which gcc does not seem to like.

Locally fixing these problems allows me to build pyobjc-framework- 
Cocoa, all the other pyobjc-framework that I want to use building just  
fine.

But then I'm having the incomplete bridgesupport files problem. For  
example, this wouldn't work:

from ExceptionHandling import NSLogAndHandleEveryExceptionMask

So I try to regenerate the ExceptionHandling framework bridgesupport  
file using gen_bridge_metadata but I'm not sure what to do with the  
result.

What should I do to be able to have a compilable and running PyObC 2  
on 10.4 at this point?

</description>
    <dc:creator>Luc Heinrich</dc:creator>
    <dc:date>2008-11-12T20:17:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5041">
    <title>Re: proxy for a number behaving strangely</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5041</link>
    <description>Apologies, I found the problem in a different object in the same  
dictionary that wasn't ObjC derived

On 25 Oct 2008, at 21:57, Paul Thomas wrote:

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Paul Thomas</dc:creator>
    <dc:date>2008-10-25T21:15:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5040">
    <title>proxy for a number behaving strangely</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5040</link>
    <description>I'm sending a dictionary from Python to an ObjC method and one of the  
values is a number. Trouble is, I keep getting this error:

ValueError: NSInvalidArgumentException - Class OC_PythonObject: no  
such selector: isNSString__

The following are trimmed down from the real code and I can't get  
simple examples to fail the way my code does. This implies that it's a  
problem in my code of course, but I'm hoping against hope that someone  
has seen just this error before or can at least tell me what the  
problem might be.

The really strange thing (strange to me with my level of  
understanding) is that I found one case where it does work - and that  
is passing the index value returned by enumerate(&lt;seq&gt;).

assume 'v' comes from enumerate():

myobj.sendDictionary_(dict(version=v))  # works
x=v
myobj.sendDictionary_(dict(version=x))  # works

#all these fail...

myobj.sendDictionary_(dict(version=v))
myobj.sendDictionary_(dict(version=v+1))
x=v+1
myobj.sendDictionary_(dict(version=x))
myobj.sendDictionary_(dict(version=int(v+1))
myobj.sendDictionary_(dict(version=NSNumber.numberWithInt_(v+1)))

I mean, what could the difference be between the proxy objects created  
in the different cases?

Paul.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Paul Thomas</dc:creator>
    <dc:date>2008-10-25T20:57:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5039">
    <title>NSProgressIndicator ignores incrementBy when calledusing performSelectorOnMainThread_withObject_waitUntilDone_</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5039</link>
    <description>I am trying to advance an NSProgressIndicator from a thread, therefor  
i am using performSelectorOnMainThread_withObject_waitUntilDone_
to have the incrementBy call done from the main thread.

However while just calling progress_indicator.incrementBy_(some_value)  
works just as expected,
progress_indicator.  
performSelectorOnMainThread_withObject_waitUntilDone_("incrementBy:",  
some_value, True)
just does not seem to do anything. See the code below for an simple  
example.


from Foundation import *
import objc

class controller(NSObject):
     progress_indicator = objc.IBOutlet()

     &lt; at &gt;objc.IBAction
     def go_(self, sender):
         # WORKS
          
self.performSelectorOnMainThread_withObject_waitUntilDone_("test:",  
25, True)

         # DOES NOT SEEM TO WORK
         
self 
.progress_indicator 
.performSelectorOnMainThread_withObject_waitUntilDone_("incrementBy:",  
25.0, True)

     def test_(self, x):
         print 'yaye', x


What am I doing wrong?

Regards,

Johannes

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Johannes Scholz</dc:creator>
    <dc:date>2008-10-25T16:46:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5038">
    <title>PyObjC on Leopard</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5038</link>
    <description>Hi there,

I spent quite a bit of time scouring the internet for answers, and  
there don't seem to be any... so now I put these to you:

1) The pyobjc website says Leopard users should install from svn  
trunk.  Why?  What (bad) happens if I use pyobjc 1.4 + python 2.5.2  
(Framework, non-System) + Leopard (OSX 10.5.x)?

2) Is there anything that's simply an amazing improvement in 2.0 (for  
existing code that already works with 1.4)?

3) How the heck to I build 2.x PyObjC from the trunk.  I've found  
threads where other's asked about this, but they never ended in an  
answer...

FWIW - I'm interested in getting pyobjc into the Enthought Python  
Distribution - which requires compatibility with 10.4.  So another  
angle on the above would be

4) Could I build pyobjc (mpkg or egg or what have you) that would work  
on both 10.4 and 10.5?

Thanks!
Dav



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Dav Clark</dc:creator>
    <dc:date>2008-10-18T23:44:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5037">
    <title>Method Swizzling - class_getInstanceMethod</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5037</link>
    <description>Hello,
How exactly do I use this function? For example,

This is a plugin in Python(Leopard 10.5.5), the principal class is  
Voo(see end of email).
I load the bundle and  instantiate it like this

NSBundle *bun=[NSBundle bundleWithPath:&lt; at &gt;"/Users/yanger/toperuse/PyRu/ 
example2/dist/gigo.plugin"];
Class currPrincipalClass = [bun principalClass];
id ins=[[currPrincipalClass alloc] init];

(i'm basing this of PyRu)
Voo is trying to swizzle goody method I added to PythonStuff.
However,
a) load is not run
b)  &lt;type 'exceptions.AttributeError'&gt;: 'module' object has no  
attribute 'class_getInstanceMethod'

Any ideas what I should do?
Thanks
Saptarshi


==Python Bundle(gigo.py)==
from Foundation import *
from AppKit import *
from Foundation import *
import objc

class PythonStuff(objc.Category(PythonStuff)):
     def mygoody(self):
         NSLog("Alpha betea")

class Voo(NSObject):
     &lt; at &gt;classmethod
     def load(cls):
         NSLog("A")
     def init(self):
         super(Voo, self).init()
         NSLog("B:")
         originalMethod  =  
objc.class_getInstanceMethod(objc.lookUpClass(u"PythonStuff"), "goody")
         replacedMethod  =  
objc.class_getInstanceMethod(objc.lookUpClass(u"PythonStuff"),  
"mygoody")
         objc.method_exchangeImplementations(originalMethod,  
replacedMethod)
         NSLog("C:")
         return self

==setup.py==
from distutils.core import setup
import py2app
plist = dict(NSPrincipalClass='Voo')

setup(
     plugin = ['gigo.py'],
     options=dict(py2app=dict(extension='.plugin', plist=plist))
)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Saptarshi Guha</dc:creator>
    <dc:date>2008-10-14T05:54:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5036">
    <title>Re: Import PyObjC Class/Module into Objective-C</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5036</link>
    <description>Mike,

The only way I know how to instantiate a class defined in python from
within Objective-C land is to compile the python code into a loadable
bundle using py2app and then load that bundle from within Objective-C
using [NSBundle load]. I've attached an example setup.py that will
build a loadable bundle from a python file, 'example.py'.

Barry



On Mon, Oct 13, 2008 at 8:17 PM, Mike Stathopoulos &lt;mstath&lt; at &gt;hotmail.com&gt; wrote:
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Pyobjc-dev mailing list
Pyobjc-dev&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
</description>
    <dc:creator>Barry Wark</dc:creator>
    <dc:date>2008-10-14T03:36:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5035">
    <title>Import PyObjC Class/Module into Objective-C</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5035</link>
    <description>
Hi,

Documentation on PyObjC is pretty sparse.  I want to instantiate PyObjC classes in Objective-C objects.

Any docs or example code would be much appreciated.

If there's no  documentation floating around out there, which header files in the framework should I get more aquatinted with?

Many thanks,
Mike
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Mike Stathopoulos</dc:creator>
    <dc:date>2008-10-14T03:17:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5034">
    <title>Re: Memory leak, but only in a plug-in?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5034</link>
    <description>done: https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1982104&amp;group_id=14534&amp;atid=114534

Please email me if anyone has trouble downloading or building/running
the demo project.

On Sat, Oct 11, 2008 at 3:48 PM, Steve Steiner &lt;ssteiner&lt; at &gt;mac.com&gt; wrote:

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Barry Wark</dc:creator>
    <dc:date>2008-10-14T01:02:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5033">
    <title>Re: class vs. instance attributes for IBOutlets</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5033</link>
    <description>

I think the IBOutlet is just a marker indicating
that the attribute in question is an outlet, and
it doesn't hold any state -- in which case sharing
it between instances is fine.

</description>
    <dc:creator>Greg Ewing</dc:creator>
    <dc:date>2008-10-13T02:13:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5032">
    <title>Re: class vs. instance attributes for IBOutlets</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5032</link>
    <description>

This is only true for immutable properties.  Try this:

 &gt;&gt;&gt; class Foo:
...     list = []
...
 &gt;&gt;&gt; a = Foo()
 &gt;&gt;&gt; b = Foo()
 &gt;&gt;&gt; a.list
[]
 &gt;&gt;&gt; a.list.append(1)
 &gt;&gt;&gt; a.list
[1]
 &gt;&gt;&gt; b.list
[1]

And of course a.list.append is exactly what I was doing with  
'toDoList' in my real app.  But whether this applies to IBOutlets, I  
have no idea -- I don't understand what they are or how they work.   
This was my question.


My experimentation shows that it does not, but it DOES detect them if  
they're set up in the init() method as I showed on my last email.

Best,
- Joe

--
Joe Strout
joe&lt; at &gt;strout.net

The candidates answer the top 14 science questions facing America:
http://www.sciencedebate2008.com/www/index.php?id=40







-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Joe Strout</dc:creator>
    <dc:date>2008-10-12T23:13:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5031">
    <title>Re: class vs. instance attributes for IBOutlets</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5031</link>
    <description>Joe,

In order to access the class variable, you'd need to be accessing  
ClassNa property me.instead of 'self.property'. I this this brief  
console session help clarify the difference:

 &gt;&gt;&gt; class Person(object):
...     name = "Tim"
...     age = 25
...
 &gt;&gt;&gt; x = Person()
 &gt;&gt;&gt; x
&lt;__main__.Person object at 0x80870&gt;
 &gt;&gt;&gt; x.name
'Tim'
 &gt;&gt;&gt; x.name = "Will"
 &gt;&gt;&gt; x
&lt;__main__.Person object at 0x80870&gt;
 &gt;&gt;&gt; x.name
'Will'
 &gt;&gt;&gt; Person.name
'Tim'

``x`` starts out with the class instance for ``name``, but once you  
attempt to modify it via ``x.name`` it masks the class property with  
an instance property. This means that you can safely create multiple  
instances of one class that appear to modify class variables without  
causing any trouble. (To actually modify the class property, you'd  
need to do ``Person.x = 'Jack'``.)

I'm curious if InterfaceBuilder can actually detect IBOutlets which  
are initialized inside the __init__ method (not sure), if not, that  
might explain why we've adopted a slightly less Pythonic approach.  
Personally, I'd continue declaring properties as class properties  
until you run into a situation where doing so is strongly undesirable.  
In the long run, it's mostly a stylistic element.

-Will


On Oct 12, 2008, at 10:12 AM, Joe Strout wrote:



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Will Larson</dc:creator>
    <dc:date>2008-10-12T15:17:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5030">
    <title>class vs. instance attributes for IBOutlets</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5030</link>
    <description>I'm re-learning Python, and learning Cocoa and PyObjC all at the same  
time.  So maybe this is silly question:

The examples I've seen have the IBOutlets (and often data too) defined  
at the class level, like so:

class ToDoListAppDelegate(NSObject):
     toDoTableView = objc.IBOutlet()
     newItemField = objc.IBOutlet()
     toDoList = []


But it occurred to me last night that this would be a problem in an  
NSObject class that might have more than one instance -- wouldn't  
apply to the app delegate, of course, but it could apply to a window  
controller.  So I moved the toDoList (which is a mutable type) to the  
init function.  Then, on a lark, I found I could move the IBOutlets  
there too, so it looks like this:

class ToDoListAppDelegate(NSObject):
     def init(self):
         NSLog(u"init")
         self.toDoTableView = objc.IBOutlet()
         self.newItemField = objc.IBOutlet()
         self = super(ToDoListAppDelegate, self).init()
         if self is not None: self.toDoList = []
         return self

So here's my question: is this necessary for IBOutlets (in a non- 
singleton class of course)?  Or is it not necessary, perhaps because  
this is an immutable type?  And what's the standard best practice for  
these things?

Thanks,
- Joe



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Joe Strout</dc:creator>
    <dc:date>2008-10-12T14:12:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5029">
    <title>Re: Memory leak, but only in a plug-in?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5029</link>
    <description>Yes. It'll likely have to wait until I get into work on Monday morning.

cheers,
Barry

On Sat, Oct 11, 2008 at 3:48 PM, Steve Steiner &lt;ssteiner&lt; at &gt;mac.com&gt; wrote:

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Barry Wark</dc:creator>
    <dc:date>2008-10-12T05:52:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5028">
    <title>Fwd: Memory leak, but only in a plug-in?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5028</link>
    <description>Barry,

Could you please attach the new, improved version of the demo to the  
original bug report so any interested party can quickly see the  
problem.  The first compilable one you sent me shows the problem the  
best, I think.

Instructions for using Instrument to show the problem might be handy  
too if you've got time.

Thanks,

S

On Oct 11, 2008, at 5:17 PM, Barry Wark wrote:




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>s s</dc:creator>
    <dc:date>2008-10-12T00:22:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5027">
    <title>Re: Memory leak, but only in a plug-in?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5027</link>
    <description>
Just to clarify the issue: this leak is present if the plugin is
written in python (and compiled to a loadable bundle using py2app) and
loaded into an Objective-C app. The leak does not occur if the plugin
is loaded into a Python app. This issue was first described in bug
#1982104 (http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1982104&amp;group_id=14534&amp;atid=114534).


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Barry Wark</dc:creator>
    <dc:date>2008-10-11T21:17:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5026">
    <title>Fwd: Memory leak, but only in a plug-in?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pyobjc.devel/5026</link>
    <description>Hi!

Barry Wark and I have been trying to track down a problem in both of  
our apps.

An NSDictionary returned from a plug-in leaks CFDictionary objects in  
exactly the same number as the number of returned NSDictionary's  --  
same number of CFDictionary objects, and also allocations for each  
item in the dictionary flagged as 'keys' and 'object storage.'

This happens regardless of where the dictionary's allocated.   
Allocating in the main ObjC calling program and passed into the plug- 
in or created in the plug-in itself, same behaviour.

Anybody have a clue why this is?  We've proven it pretty conclusively  
and clearly and have a working demonstration that I can put up if  
anyone's interested.

Thanks,

S
aka Steve Steiner




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>s s</dc:creator>
    <dc:date>2008-10-11T13:27:35</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.python.pyobjc.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.pyobjc.devel</link>
  </textinput>
</rdf:RDF>
