473,397 Members | 1,960 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,397 software developers and data experts.

Problem with RaiseEvent()

ffa
In a class called Client I have an event called RefreshData (Public Event
Refresh) which is fired whenever the Client class does a data fetch.

In the main form I declare: Private WithEvents oClient As New Client(dbName)

For some reason the method "oClient_RefreshData() Handles
oClient.RefreshData" no longer fires.

Anyone have any ideas why this is occurring? In fact I have three class
similar to this and they have all stopped firing as well. I only use the
RefreshData Event for enabling some menu items. All normal controls are
bound.

VB 2005 - 130k lines of code
Sep 24 '07 #1
6 1234
ff*@newsgroup.nospam wrote:
In a class called Client I have an event called RefreshData (Public Event
Refresh) which is fired whenever the Client class does a data fetch.
So /which/ is it?

Class Client
Public Event Refresh

or

Class Client
Public Event RefreshData

??

Does your OnRefresh method get called? (You /do/ have one, don't you?)

Class Client
Public Event Refresh( sender as Object, e as EventArgs )

Protected Sub OnRefresh()
RaiseEvent Refresh( Me, EventArgs.Empty )
End Sub

End Class

HTH,
Phill W.
In the main form I declare: Private WithEvents oClient As New Client(dbName)

For some reason the method "oClient_RefreshData() Handles
oClient.RefreshData" no longer fires.

Anyone have any ideas why this is occurring? In fact I have three class
similar to this and they have all stopped firing as well. I only use the
RefreshData Event for enabling some menu items. All normal controls are
bound.

VB 2005 - 130k lines of code

Sep 24 '07 #2
ffa
Hi Phil
Thank you for your patronising comments. Consider me suitably repremanded. I
do admire how you managed to completly avoid any form of answer or positive
suggestion. Please find further comments inline:

"Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-kwrote in message
news:fd**********@south.jnrs.ja.net...
ff*@newsgroup.nospam wrote:
>In a class called Client I have an event called RefreshData (Public Event
RefreshData) which is called whenever the Client class does a data fetch.
Oh dear, a typo, that should have said RefreshData. My profuse apologies.
How could I have been so abundantly stupid.
>
So /which/ is it?

Class Client
Public Event Refresh

or

Class Client
Public Event RefreshData

??

Does your OnRefresh method get called? (You /do/ have one, don't you?)
Of course it does
>
Class Client
Public Event Refresh( sender as Object, e as EventArgs )

Protected Sub OnRefresh()
RaiseEvent Refresh( Me, EventArgs.Empty )
End Sub

End Class

HTH,
Phill W.
>In the main form I declare: Private WithEvents oClient As New
Client(dbName)

For some reason the method "oClient_RefreshData() Handles
oClient.RefreshData" no longer fires.

Anyone have any ideas why this is occurring? In fact I have three class
similar to this and they have all stopped firing as well. I only use the
RefreshData Event for enabling some menu items. All normal controls are
bound.

VB 2005 - 130k lines of code

Sep 24 '07 #3
"ff*@newsgroup.nospam" <ha**********@ffapaysmart.com.auschrieb
Hi Phil
Thank you for your patronising comments. Consider me suitably
repremanded. I do admire how you managed to completly avoid any form
of answer or positive suggestion. Please find further comments
inline:
No need to feel offended. There was nothing wrong with what Phill said, and
how.
Armin

Sep 24 '07 #4
ffa

"Armin Zingler" <az*******@freenet.dewrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"ff*@newsgroup.nospam" <ha**********@ffapaysmart.com.auschrieb
>Hi Phil
Thank you for your patronising comments. Consider me suitably
repremanded. I do admire how you managed to completly avoid any form
of answer or positive suggestion. Please find further comments
inline:

No need to feel offended. There was nothing wrong with what Phill said,
and how.
Armin
Problem with being an international forum is that most of us are unaware of
conventions and semantics in countries other than our own. All the guys in
my department thought the reply to be offensive.
Perhaps the fault is ours and we are oversensitive. However, any employee in
our company that replies to a genuine message in the manner that Phil did,
would be reprimanded by management.
Sep 25 '07 #5
"ff*@newsgroup.nospam" <ha**********@ffapaysmart.com.auschrieb
>
"Armin Zingler" <az*******@freenet.dewrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"ff*@newsgroup.nospam" <ha**********@ffapaysmart.com.auschrieb
Hi Phil
Thank you for your patronising comments. Consider me suitably
repremanded. I do admire how you managed to completly avoid any
form of answer or positive suggestion. Please find further
comments
inline:
No need to feel offended. There was nothing wrong with what Phill
said, and how.
Armin
Problem with being an international forum is that most of us are
unaware of conventions and semantics in countries other than our
own. All the guys in my department thought the reply to be
offensive.
Perhaps the fault is ours and we are oversensitive. However, any
employee in our company that replies to a genuine message in the
manner that Phil did, would be reprimanded by management.
I'm just not aware of which part of his answer was offensive. Maybe I don't
see it because I'm not a native English speaker. In general, you can not
expect an answer like being a customer of a company calling it's support.
This is a users-help-users forum, so you (usually) don't get support from
MSFT here. From MSFT, AFAIK, you can pay for a kind of support (don't know
how it is called) to get answers to your questions in the MSFT newsgroups.
Then you will get a reply that will probably satisfy your claims in a more
appropriate way. You didn't get a "RTFM", BTW.
Armin

Sep 25 '07 #6
On Sep 24, 10:38 pm, "f...@newsgroup.nospam"
<harry_NOS...@ffapaysmart.com.auwrote:
"Armin Zingler" <az.nos...@freenet.dewrote in message

news:%2****************@TK2MSFTNGP05.phx.gbl..."f. ..@newsgroup.nospam" <harry_NOS...@ffapaysmart.com.auschrieb
Hi Phil
Thank you for your patronising comments. Consider me suitably
repremanded. I do admire how you managed to completly avoid any form
of answer or positive suggestion. Please find further comments
inline:
No need to feel offended. There was nothing wrong with what Phill said,
and how.
Armin

Problem with being an international forum is that most of us are unaware of
conventions and semantics in countries other than our own. All the guys in
my department thought the reply to be offensive.
Perhaps the fault is ours and we are oversensitive. However, any employee in
our company that replies to a genuine message in the manner that Phil did,
would be reprimanded by management.
I'd hate to say it, but I don't see how Phill's response was offensive
either, remember on the internet you must take things in the best
possible way, as written words are much harder to show emotional
context cues. I will offer you a few words of advice though, since
technical newsgroups act a bit different than most things:

First, unless you see a [MSFT] after our name, none of us are paid to
be here, we all volunteer. Being volunteers, we expect people to
present their problems in a way that makes it easy for us to look at
and solve. For example many "newbies" post complain that there code is
throwing an exceptions, but don't list the code or the exception.
Similarly, your post mentioned you had an "event called RefreshData
(Public Event Refresh)" which due to a typo made a very confusing
post. My approach was to ignore your post (I don't spend time on what
I can't understand). Phill's approach was to ask for clarification of
the post.

Second, if you don't say you aren't a new programmer, we will probably
treat you like one until we know otherwise. In other words, don't feel
bad if we talk to you like a beginner programmer, it's not an insult,
it's a precaution on our end to prevent mass confusion if the OP is un-
knowledgeable.

Third, never, ever reply rudely to a post, even if the original post
was found rude. In worst cases this will lead to a flame war,
something you don't want to participate in. In other cases (like
replying harshly to a regular) it cause your post be ignored by other
regulars and not get answered (or land you in a kill file if you were
very mean). Either way, a harsh reply to a lingual misunderstanding
(if that's what it was) is not worth getting yourself ignored.

Also, if you remove all the cursed (imo) "Handles ...." lines from
your class and just use AddHandler in the class constructor to wire up
the events will everything work?

Thanks,

Seth Rowe

Sep 25 '07 #7

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

Similar topics

2
by: Theo | last post by:
Hi, I am using a tcpclient and a tcplistener to send and receive packets. The client sends a packet and the listener replies with another one. I can send 2 packets and get an answer from the...
8
by: Nicolas | last post by:
How do I do a RaiseEvent in csharp I'm ok in VB but csharp confused me a lot. ******* code ******** private FileSystemWatcher watcher = new FileSystemWatcher(); public delegate void...
6
by: Mike Fellows | last post by:
I have a windows form with a tabcontrol on it within each tabpage there is a button that does basically the same thing except with the difference of one variable at the end of each of the...
18
by: Derek Martin | last post by:
Hi there, this is probably really dumb, but I am using a dialog as my main form and my startup form is my splash screen - which implements some progress bars to load up some relevant data. When...
8
by: Scott Meddows | last post by:
I have a datagrid control that I've inherited from the base datagrid control (Source below). I am applying a datatable style onto the datatable that I assign as my datasource. All of my column...
0
by: shapper | last post by:
Hello, I have a custom control where I have a button. I need to raise the event FormSubmited after all the code, in Button_Click, is finished. The problem is when I check FormSubmited in my...
7
by: Onokiyo | last post by:
Hello, I have the code below and somehow the message from RaiseEvent doesn't pop up at all. Can someone help me please? '------CODE '------/form1.vb/VB2005/Framework20--------- Imports...
3
by: Martin | last post by:
Hi all, I'm having a problem when trying to raise an event in my custom control when a toolstripbutton enable state changes. The problem is that although the code to raise the event executes, my...
1
by: Terry Olsen | last post by:
I have a program with a couple of long running processes that i'm calling on a separate thread. When the process is completed, I want to raise an event to tell the main thread that it's done. I...
2
by: ffa | last post by:
I have a number of classes that declare a public Event called RefreshData: Public Class Client Implements INotifyPropertyChanged Implements IDisposable Implements IDataErrorInfo Public...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.