473,394 Members | 1,226 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Tricky problem with event handling

Hi group,

I'm having a strange problem with event handling. My project has a form with
a textbox that creates 25 instances of class A when a button is clicked.
Class A raises the event without error, I have proved this by having it use
a streamwriter to create and write to a simple text file after raising the
event. Twenty-five files are created each time the button is pressed.

The form is wired up to the event (rr.OnComplete += new
ReqResp.ReqRespEventHandler(TestHandler); ...), grabs the EventArgs and
updates the textbox. I've put MessageBoxes in TestHandler, and it displays
25 boxes each time. The problem is that the textbox itself rarely displays
all 25 event messages (as few as 16, up to all 25). Are things happening too
fast here? I've tried Suspending the Layout, to no avail.

Any ideas here?

--
Tim Gallivan
I know I'm a great teacher because when I give a lesson, the person never
comes back.
Nov 16 '05 #1
2 1312
i have had simmilar problem updating a ListView from multible threads
my solution was to use Lock on the update methode

"Tim Gallivan" <no**********************@edu.gov.on.ca> wrote in message
news:%2*****************@TK2MSFTNGP11.phx.gbl...
Hi group,

I'm having a strange problem with event handling. My project has a form with a textbox that creates 25 instances of class A when a button is clicked.
Class A raises the event without error, I have proved this by having it use a streamwriter to create and write to a simple text file after raising the
event. Twenty-five files are created each time the button is pressed.

The form is wired up to the event (rr.OnComplete += new
ReqResp.ReqRespEventHandler(TestHandler); ...), grabs the EventArgs and
updates the textbox. I've put MessageBoxes in TestHandler, and it displays
25 boxes each time. The problem is that the textbox itself rarely displays
all 25 event messages (as few as 16, up to all 25). Are things happening too fast here? I've tried Suspending the Layout, to no avail.

Any ideas here?

--
Tim Gallivan
I know I'm a great teacher because when I give a lesson, the person never
comes back.

Nov 16 '05 #2
Lock?

--
Tim Gallivan
I know I'm a great teacher because when I give a lesson, the person never
comes back.

"LiFo" <ik****@hotmail.com> wrote in message
news:O3*************@TK2MSFTNGP10.phx.gbl...
i have had simmilar problem updating a ListView from multible threads
my solution was to use Lock on the update methode

"Tim Gallivan" <no**********************@edu.gov.on.ca> wrote in message
news:%2*****************@TK2MSFTNGP11.phx.gbl...
Hi group,

I'm having a strange problem with event handling. My project has a form

with
a textbox that creates 25 instances of class A when a button is clicked.
Class A raises the event without error, I have proved this by having it

use
a streamwriter to create and write to a simple text file after raising the event. Twenty-five files are created each time the button is pressed.

The form is wired up to the event (rr.OnComplete += new
ReqResp.ReqRespEventHandler(TestHandler); ...), grabs the EventArgs and
updates the textbox. I've put MessageBoxes in TestHandler, and it displays 25 boxes each time. The problem is that the textbox itself rarely displays all 25 event messages (as few as 16, up to all 25). Are things happening

too
fast here? I've tried Suspending the Layout, to no avail.

Any ideas here?

--
Tim Gallivan
I know I'm a great teacher because when I give a lesson, the person never comes back.


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
4
by: Marc Tanner | last post by:
Hello, I am currently working on a eventhandling system or something similar, and have the problem of loosing scope. I have read many interesting posts on this group and the faq article about...
2
by: Marcia Gulesian | last post by:
The following code suppresses the 'enter' key, when run in I.E. 5.5 or later (Windows) but not when run in Safari (Mac) <body onkeypress="javascript:keysuppress(event)" > function...
8
by: SAN CAZIANO | last post by:
i have to do in the onkeypress or in onchange the float (real) field validation I try something: function ValidaCampo(nomeCampo,TotInteri,TotDecimali) {...
13
by: Steve Jorgensen | last post by:
== On Error Resume next, and Err.Number == If you want to call one of your procedures from another procedure, and check for errors afterward, you mayimagine that you should write code something...
4
by: hillcountry74 | last post by:
Hi, I'm a newbie and trying to understand event handling in c#. I have understood handling events using delelgate objects. But not this method- "Event handling by overriding the virtual...
7
by: Matt | last post by:
Hello, In an aspx page i have webform with some textboxes and a simple button. When the button is clicked, there is a postback and then the code in the click event of the button is executed. ...
7
by: Ernesto | last post by:
So regular expressions have been good to me so far, but now my problem is a bit trickier. The string I'm getting data from looks like this: myString = Request : Play Title: Beethoven's 5th...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.