473,320 Members | 2,112 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,320 software developers and data experts.

Connecting to an event inside a collection class

I've an object which does some work and raises events when various things
happen.

I've an object which manages a collection of similar work objects allowing
them to be managed as one or individually as appropriate (each type or work
object relates to one class of production machinery, but there may be many
machines of that type - so I manage all machines of one type with one
collection object).

I've also (nearly) got a 'dashboard' window control which shows status
information from each machine.

The problem is how to hook up a given event handler on the dash board with
the corresponding machine.

For the various methods and properties I've exposed the individual machines
through a method on the management object

public String MachineName(int MachineNumber)
{
return UnderlyingObject[MachineNumber].MachineName;
}

But I don't see how to do that with an event.

Obviously I could expose the whole underlying object through a method like
the above, but I'd really prefer to decouple things more than that.

Iain
Nov 15 '05 #1
0 760

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

Similar topics

1
by: emma middlebrook | last post by:
Hi I want to find out what objects are due to receive an event i.e. those that have added themselves as an event handler via +=. Yes, it's a little pointless perhaps (or can anyone give some...
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...
5
by: Martin | last post by:
I have created a subclass of a textbox. In this subclass I have a property called 'Caption'. If this property contains a value then I want to create a Label object and add it to the controls...
3
by: Andrew Ducker | last post by:
I have a class with a DataTable built into it. Various places subscribe to the DataTable.RowChanging event. I want to grab a list of all the subscribers. Normally I'd use GetInvocationList,...
1
by: Asko Telinen | last post by:
Hi all. I ran into quite strange problem concerning the event raising inside FileSystemWatcher Delete event. First, i would like to describe a bit my environment. I have main GUI...
2
by: meyousikmann | last post by:
This will be difficult to explain so bear with me. If anyone is familiar with Tibco Rendezvous and/or Microsoft Messaging, this may make more sense. I've created a hierarchy of objects that...
2
by: planet.creativa | last post by:
There are two classes 1) Key - contains some public variables, one method "Reset" and one event "valuesReset" which is raised by Reset method. 2) Keys - this class is collection of objects of...
18
by: Redhairs | last post by:
Is it possible to get DropDownList.SelectedValue in Page_PreInit() event during the postback?
4
by: FullBandwidth | last post by:
I have been perusing various blogs and MSDN pages discussing the use of event properties and the EventHandlerList class. I don't believe there's anything special about the EventHandlerList class in...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.