Glad to hear it.
Since posting this, I've looked a bit harder at the runtime behavior,
and I am now fairly confident that this patch is, in fact, correct.
-- Murphy
On Jan 25, 2010, at 11:22 PM, Daekyeong Moon wrote:
Hi Murphy,
I applied the patch and it doesn't crash anymore. Thanks!
On
Hey, DK.
Hopefully I'm not introducing a big leak here, but give this a try:
Index: pycontext.cc
===
--- pycontext.cc(revision 2)
+++ pycontext.cc(working copy)
@@ -132,6 +132,7 @@
if(sfe.python_arg){
py
I followed this approach and it seems it doesn't work when propagating an event
through event handler chain.
I encountered segfault and I guess it's related to object reference counting.
This is a simplified version of what I did (and this simplified version also
causes segault.)
(Sorry for co
s/attributed/attributes/g
-D
David Erickson wrote:
As a clarification for anyone that reads this down the road, it turns
out that the python_arg is where you put a python object that you will
retrieve when handling a posted event. IE:
self.post(pyevent("name here", my_obj))
then to retrieve
As a clarification for anyone that reads this down the road, it turns
out that the python_arg is where you put a python object that you will
retrieve when handling a posted event. IE:
self.post(pyevent("name here", my_obj))
then to retrieve my_obj from a handler
def handle_event(self, event):
This use to be required so that python-only state was not passed into
C++ but I don't believe it is actually used anymore. You can safely
ignore the message.
Tried this and it worked like a charm. I did see an error message in
the log:
00042|pyrt|ERR:Pyevent without internal python_arg set
Tried this and it worked like a charm. I did see an error message in the
log:
00042|pyrt|ERR:Pyevent without internal python_arg set
So I changed my event posting to:
self.post(FlowOutEvent("flowoutevent", 1))
Which solved it. I took a look at the source but couldn't reason out
what the pytho
Actually looking at the code, this should already be supported.
Try registering with "register_python_event(name)". See with context.i.
This registers the default python converter and should allow you to
create and post python only events without writing any c++.
.martin
Hi David
I'm als
Martin and I talked, it will require some C modifications to make it
work, but should be doable. I haven't implemented it yet.
-David
Brandon Heller wrote:
Hi David
I'm also interested in getting python-only events working. Were you
able to get past this issue?
Thanks,
Brandon
On Wed, D
Hi David
I'm also interested in getting python-only events working. Were you able to
get past this issue?
Thanks,
Brandon
On Wed, Dec 16, 2009 at 8:08 PM, David Erickson wrote:
> Martin Casado wrote:
>
>> I don't see where you are setting the name of the event you're posting.
>>
>
> That could
Martin Casado wrote:
I don't see where you are setting the name of the event you're posting.
That could be important ;) Changed the code to be
self.post(FlowOutEvent("flowoutevent")), now I get the following:
00041|flowinstaller|ERR:flowoutevent posted
00042|pyrt|ERR:flowoutevent has no C++
I don't see where you are setting the name of the event you're posting.
Hi Martin,
Here is a test case that I am unable to get functioning, please ignore
the ugly code:
import logging
from nox.coreapps.pyrt import *
from nox.lib.core import *
lg = logging.getLogger('flowinstaller')
class F
Hi Martin,
Here is a test case that I am unable to get functioning, please ignore
the ugly code:
import logging
from nox.coreapps.pyrt import *
from nox.lib.core import *
lg = logging.getLogger('flowinstaller')
class FlowOutEvent(pyevent):
def install(self):
return
class flowin
You should be able to do this by creating an instance of pyevent (see
src/nox/pyrt/event.i) with a unique name and posting that. No need to
swig or wrap anything.
Let me know if this doesn't work.
.martin
Is it possible to register and post a Python event that is only
received by other Pytho
Is it possible to register and post a Python event that is only received
by other Python handlers? IE an event that is not SWIG'd to C at all? I
was looking at pycontext.hh and saw:
/* Registers a Python only event */
void register_event(const Event_name&);
The only example of using t
15 matches
Mail list logo