KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Timer events delivered in the wrong eventqueu?

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Bert
KiXforms Regular
KiXforms Regular


Joined: 06 Oct 2003
Posts: 56
Location: Netherlands

PostPosted: Fri Jan 09, 2004 12:50 pm    Post subject: Timer events delivered in the wrong eventqueu? Reply with quote

Shawn,

When I create a Form with a timer and then create a childform without a timer, the timer events of the first form are delivered in de eventqueu of the childform.
Is this by design or a bug?

The following kixlet demonstrates this behaviour. When the second form is created with the 'form2' button you see the timerevents continued to be delivered through the messages in de console.

Code:

$form=createobject ("kixtart.form")
$button = $form.controls.button("form2")
$button.center
$button.onclick = "doform2()"
$timer=$form.controls.timer
$timer.ontimer="ontimer"
$timer.interval=1000
$form.show
while $form.visible
   $ = execute ($form.doevents())
loop
exit


function doform2 ()
   dim $form2
   $form2=createobject ("kixtart.form")
   $form2.show
   while $form.visible
      $ = execute ($form2.doevents())
   loop
endfunction

function ontimer ()
   ? "ontimer event"
endfunction

_________________
Bert

There are 10 kinds of people. Those who can count binary and those who can't.
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Mon May 17, 2004 11:07 pm    Post subject: Reply with quote

shawn?
_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Chris S.
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 241

PostPosted: Mon May 17, 2004 11:37 pm    Post subject: Reply with quote

I'm not sure that this is a valid test of this "bug." Just because the other form is active doesn't mean that the timer isn't still working. In fact, I think it is performing as expected.
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon May 17, 2004 11:59 pm    Post subject: Reply with quote

There is really only one queue, whether its called through FormA or FormB or Application.DoEvents, all events filter through all DoEvents regardless - this is by design.

-Shawn
Back to top
View user's profile Send private message
Bert
KiXforms Regular
KiXforms Regular


Joined: 06 Oct 2003
Posts: 56
Location: Netherlands

PostPosted: Tue May 18, 2004 10:35 pm    Post subject: Reply with quote

Thanks for the reply.

I think I have to stop the timers when I dont want their events delivered in the doevents loop that handles the events of another form.

_________________
Bert

There are 10 kinds of people. Those who can count binary and those who can't.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> 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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group