Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
oxseyn
Wanderer


Joined: 26 Nov 2011
Posts: 71
Location: Colorado Springs

PostPosted: Wed Mar 21, 2012 5:22 am   

[BUG] onLoad in shared package only fires once for multiple windows
 
I have a single session with multiple windows that are each their own "network session."
I have a shared package that each window has enabled.
In that shared package is a class which contains session initialization scripts.
In that class is an onLoad event. For testing purposes, i set it to #SAY Hello %window from onLoad.
This only fires once even though multiple windows are being initialized.

Yes, I've verified that the package is actually shared. There is an onConnect even (for testing purposes) that has similar text: #SAY %window from onConnect. This does work.
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Wed Mar 21, 2012 9:29 am   
 
I would say this is perfectly normal.

If you put the onLoad event in the shared package, then it will be fired when that shared module is loaded. That is once. If you really want to use onLoad here (not onConnect) put it in each window.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Wed Mar 21, 2012 12:23 pm   
 
#EVENT onLoad {#FORALL %names {#WIN %1 Hello}}
%names contains a list of all your windowNames in the current session
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net