Re: [anjuta-devel] New project interface and introspection



Hello Sébastien,
              في ح، 05-09-2010 عند 19:50 +0200 ، كتب Sébastien Granjoux:
I have written in python
[...]
But pointer is gi.FunctionInfo, how can I convert it back to NodeData ?

Everything seems to work ok here : after adding print calls to
anjuta_project_gobject_node{dispose,finalize} I get:

$ cat test.py
from gi.repository import Anjuta

class NodeData:
    def __init__(self):
        self.data = 0

data = NodeData()
node = Anjuta.project_introspection_node_new (0, None, "noname", data)
pointer = Anjuta.project_introspection_node_get_user_data (node)

print pointer
assert (data == pointer)

node = Anjuta.ProjectGObjectNode.new (0, None, "noname", 0)
node = None

$ python test.py 
<__main__.NodeData instance at 0x93b970c>
dispose called
finalize called

So there is probably a problem with your setup. (btw, I'm using
f6c4d9e58c8f05cb2d82e158c9eb8480308565bd from Aug 20).

Regards,
Abderrahim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]