473,394 Members | 1,748 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.

Event feedback

Hello,

Any help on the below would be much appreciated.

A more specific point to my previous post. if i have a simple class which
has some settable properties and an update event like so :

PSEUDO-CODE :

class simpleClass
{

public event Updated;

property1
{
get
{
return blabla;
}
set
{
blabla = value;
Updated();
}
}

}

And a GUI class that subscribes to the event like so

class GUI
{

private simpleClass m_simpleClass;

public GUI()
{
m_simpleClass = new class;
m_Simpleclass.Updated += eventHandler( refreshControl );
}

private void refreshControl ()
{
// set up out control with our properties in the simple class
DisplayBox.Value = m_simpleClass.property1;
}

priavte void DisplayBox_ValueChanged()
{
m_Simpleclass.property1 = blabla ...
}

}

When the GUI is first set up, if you want to display the values of the
private simple class, setting in refreshControl() causes the
DisplayBox_ValueChanged() event to be triggered. How do you stop this from
happening during setup ? i.e. how do i stop the dog chasing its tail without
having a nast if statement?

Thanks loads
Jon
Nov 16 '05 #1
0 824

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

Similar topics

8
by: Dennis C. Drumm | last post by:
I have a class derived from a SortedList called SystemList that contains a list of objects indexed with a string value. The definition of the objects contained in the SortedList have a boolean...
3
by: IMS.Rushikesh | last post by:
Hi All, There is a scenario, in which there is a counter in my base class. There is some initial value of this counter (check below code). Now there is a function "DecreaseCount", which will...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
19
by: Heidi Hundåla | last post by:
Hi ! I have a Wep App in C#. Page_Unload fires after Page_Load, and it seems totally unreasonable when you want to use this event when you _leave_ the page. In my project we wanted to use...
1
by: Obi Oberoi | last post by:
I have an ASP.NET application with half a dozen pages most of which have user controls on them (some UC's are loaded dynamically, others are simply dragged and dropped onto the web page) Now,...
27
by: Codemonkey | last post by:
Heya All, Sorry, but I think it's about time for a monkey-ramble. I've just had enough of trying to serialize even simple objects with VB. A simple task you may think - stick the...
6
by: Dave | last post by:
I am trying to implement drag and drop in a C# app, but for some reason I can't get it to call the GiveFeedback event. I have done everything by the book as far as I can tell, but a breakpoint in...
9
by: AG | last post by:
Using VS 2005. Usually I work in VB.NET. In code behind when I need to add code to an event, I just select the object in the upper left dropdown of the code window and then the desired event in...
8
by: Louis | last post by:
I was trying to display a custom context menu in javascript. I wanted to capture a right mouse click. I added an eventListener to a "div" like this.. element,addEventListener ("click", myfunc,...
1
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
I have a assembly from a third party that exposes an Event I want to Trap the event and tie to a Method in a Class where I am consuming their assembly. The class is actually a UserControl How...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.