Re: Can't post an event to sender session

2005-04-07 Thread Apocalypse
I would recommend you to save the session's ID via $_[SENDER]->ID()
That would not screw up POE's garbage collection and you can still keep 
"references" to sessions. I don't have the full picture of what you're 
doing but I'm guessing postback works because you are not saving the 
actual session reference itself.

--
Apocalypse
Homepage:   http://JiNxEdStAr.0ne.us
IRC:[EMAIL PROTECTED]
IRC:[EMAIL PROTECTED]
Perl Stuff: http://search.cpan.org/~APOCAL/


Re: Can't post an event to sender session

2005-04-07 Thread Pronichev Alexander
How can it be garbage collected while I save a reference to it in session #2 
(by $_[SENDER])? I rewrite it like this: I save not a reference to session #1, 
but a postback callback, created with $_[SENDER]->postback(...). This work fine.

On Thu, 7 Apr 2005 07:05:48 -0700 (PDT)
Mathieu Longtin <[EMAIL PROTECTED]> wrote:

> Sounds like session #1 is garbage collected. But I'm not
> sure why, since you keep a reference to it in component #3.
> 
> 
> --- Pronichev Alexander <[EMAIL PROTECTED]> wrote:
> > Greetings, 
> > Note first that I am relatively new to POE and english
> > isn't my native language.
> > The problem is that I've 2 sessions (wrapped by my
> > components), 1st session call an event of 2nd session and
> > 2nd session create new component, do it's job and then
> > have to call an event of 1nd session. I do it like this:
> > $kernel->post( $_[HEAP]->{sender}, ... ); I save a
> > $_[HEAP]->{sender} in 2nd session by $_[SENDER]. Now the
> > problem: if the 1st session didn't call
> > $kernel->set_alias(...), in it's _start event, then the
> > previous "post", doesn't work, otherwise it works fine.
> > What have I done wrong?
> > 
> > -- 
> > WBR dyker
> > Agava Software
> > 
> 
> 
>   
> __ 
> Yahoo! Messenger 
> Show us what our next emoticon should look like. Join the fun. 
> http://www.advision.webevents.yahoo.com/emoticontest


-- 
WBR dyker
Agava Software


Re: Can't post an event to sender session

2005-04-07 Thread Mathieu Longtin
Sounds like session #1 is garbage collected. But I'm not
sure why, since you keep a reference to it in component #3.


--- Pronichev Alexander <[EMAIL PROTECTED]> wrote:
> Greetings, 
> Note first that I am relatively new to POE and english
> isn't my native language.
> The problem is that I've 2 sessions (wrapped by my
> components), 1st session call an event of 2nd session and
> 2nd session create new component, do it's job and then
> have to call an event of 1nd session. I do it like this:
> $kernel->post( $_[HEAP]->{sender}, ... ); I save a
> $_[HEAP]->{sender} in 2nd session by $_[SENDER]. Now the
> problem: if the 1st session didn't call
> $kernel->set_alias(...), in it's _start event, then the
> previous "post", doesn't work, otherwise it works fine.
> What have I done wrong?
> 
> -- 
> WBR dyker
> Agava Software
> 



__ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest


Can't post an event to sender session

2005-04-07 Thread Pronichev Alexander
Greetings, 
Note first that I am relatively new to POE and english isn't my native language.
The problem is that I've 2 sessions (wrapped by my components), 1st session 
call an event of 2nd session and 2nd session create new component, do it's job 
and then have to call an event of 1nd session. I do it like this: 
$kernel->post( $_[HEAP]->{sender}, ... ); I save a $_[HEAP]->{sender} in 2nd 
session by $_[SENDER]. Now the problem: if the 1st session didn't call 
$kernel->set_alias(...), in it's _start event, then the previous "post", 
doesn't work, otherwise it works fine. What have I done wrong?

-- 
WBR dyker
Agava Software


Can't post an event to sender session

2005-04-07 Thread Pronichev Alexander
Greetings, 
Note first that I am relatively new to POE and english isn't my native language.
The problem is that I've 2 sessions (wrapped by my components), 1st session 
call an event of 2nd session and 2nd session create new component, do it's job 
and then have to call an event of 1nd session. I do it like this: 
$kernel->post( $_[HEAP]->{sender}, ... ); I save a $_[HEAP]->{sender} in 2nd 
session by $_[SENDER]. Now the problem: if the 1st session didn't call 
$kernel->set_alias(...), in it's _start event, then the previous "post", 
doesn't work, otherwise it works fine. What have I done wrong?

-- 
WBR dyker
Agava Software