I have a Class level variable defined as:
Private _MessageID As String = "Idle"
I have a timer set up with a 5-second interval. Here's the code for the
Timer_Fired event:
Private Sub Timer_Fired(ByVal state As Object)
If _Enabled = False Then Exit Sub
Writelog("MsgID=" & _MessageID)
If _MessageID = "Idle" Then
GetNextArticle()
End If
If _MessageID = "Idle" Then
Exit Sub
End If
ReportStatus("Downloading")
DownloadArticleBody()
End Sub
The first time the timer fires, the GetNextArticle routine populates
_MessageID with the next MessageID to get. So _MessageID no longer equals
"Idle" The problem I'm having is that even though _MessageID contains the
article ID ("<xx**@xxx.com>"), it is still calling GetNextArticle again and
it is not exiting the Sub. Here's my Log file...
7/29/2007 10:59:59 PM - Connecting to news.bresnan.net on Port 119
7/29/2007 10:59:59 PM - NNTP Response: 200 news.bresnan.com
7/29/2007 10:59:59 PM - MODE READER
7/29/2007 10:59:59 PM - NNTP Response: 200 News.GigaNews.Com
7/29/2007 10:59:59 PM - MsgID=Idle
7/29/2007 10:59:59 PM - BODY <xx*@xxx.com>
7/29/2007 10:59:59 PM - NNTP Response: 222 0 <xx*@xxx.com>
7/29/2007 11:00:05 PM - MsgID=<xx*@xxx.com>
7/29/2007 11:00:05 PM - BODY <xx*@xxx.com>
7/29/2007 11:00:06 PM - NNTP Response: K!?_??)*Me?##DA_)*
At 10:59:59, _MessageID was "Idle" and it retrieved the next article ID. So
far, so good. It began to download the article body.
At 11:00:05, _MessageID was NOT "Idle" but it still retrieved the article ID
and it did not exit the sub.
I can't figure out why the 'If' statements are not working. When the
_MessageID<>"Idle" it should just exit the sub. Can anyone tell me what is
going on? 4 1200
Nevermind, I'm stupid!
"Terry Olsen" <to******@hotmail.comwrote in message
news:eX**************@TK2MSFTNGP03.phx.gbl...
>I have a Class level variable defined as:
Private _MessageID As String = "Idle"
I have a timer set up with a 5-second interval. Here's the code for the
Timer_Fired event:
Private Sub Timer_Fired(ByVal state As Object)
If _Enabled = False Then Exit Sub
Writelog("MsgID=" & _MessageID)
If _MessageID = "Idle" Then
GetNextArticle()
End If
If _MessageID = "Idle" Then
Exit Sub
End If
ReportStatus("Downloading")
DownloadArticleBody()
End Sub
The first time the timer fires, the GetNextArticle routine populates
_MessageID with the next MessageID to get. So _MessageID no longer equals
"Idle" The problem I'm having is that even though _MessageID contains the
article ID ("<xx**@xxx.com>"), it is still calling GetNextArticle again
and it is not exiting the Sub. Here's my Log file...
7/29/2007 10:59:59 PM - Connecting to news.bresnan.net on Port 119
7/29/2007 10:59:59 PM - NNTP Response: 200 news.bresnan.com
7/29/2007 10:59:59 PM - MODE READER
7/29/2007 10:59:59 PM - NNTP Response: 200 News.GigaNews.Com
7/29/2007 10:59:59 PM - MsgID=Idle
7/29/2007 10:59:59 PM - BODY <xx*@xxx.com>
7/29/2007 10:59:59 PM - NNTP Response: 222 0 <xx*@xxx.com>
7/29/2007 11:00:05 PM - MsgID=<xx*@xxx.com>
7/29/2007 11:00:05 PM - BODY <xx*@xxx.com>
7/29/2007 11:00:06 PM - NNTP Response: K!?_??)*Me?##DA_)*
At 10:59:59, _MessageID was "Idle" and it retrieved the next article ID.
So far, so good. It began to download the article body.
At 11:00:05, _MessageID was NOT "Idle" but it still retrieved the article
ID and it did not exit the sub.
I can't figure out why the 'If' statements are not working. When the
_MessageID<>"Idle" it should just exit the sub. Can anyone tell me what is
going on?
"Terry Olsen" <to******@hotmail.comschrieb
Nevermind, I'm stupid!
That's the most common reason. :-)
Armin
we have all been there before! Just hurts a lot more when it is made public
....
"Terry Olsen" <to******@hotmail.comwrote in message
news:e$*************@TK2MSFTNGP05.phx.gbl...
Nevermind, I'm stupid!
"Terry Olsen" <to******@hotmail.comwrote in message
news:eX**************@TK2MSFTNGP03.phx.gbl...
>>I have a Class level variable defined as:
Private _MessageID As String = "Idle"
I have a timer set up with a 5-second interval. Here's the code for the Timer_Fired event:
Private Sub Timer_Fired(ByVal state As Object) If _Enabled = False Then Exit Sub Writelog("MsgID=" & _MessageID) If _MessageID = "Idle" Then GetNextArticle() End If If _MessageID = "Idle" Then Exit Sub End If ReportStatus("Downloading") DownloadArticleBody() End Sub
The first time the timer fires, the GetNextArticle routine populates _MessageID with the next MessageID to get. So _MessageID no longer equals "Idle" The problem I'm having is that even though _MessageID contains the article ID ("<xx**@xxx.com>"), it is still calling GetNextArticle again and it is not exiting the Sub. Here's my Log file...
7/29/2007 10:59:59 PM - Connecting to news.bresnan.net on Port 119 7/29/2007 10:59:59 PM - NNTP Response: 200 news.bresnan.com 7/29/2007 10:59:59 PM - MODE READER 7/29/2007 10:59:59 PM - NNTP Response: 200 News.GigaNews.Com 7/29/2007 10:59:59 PM - MsgID=Idle 7/29/2007 10:59:59 PM - BODY <xx*@xxx.com> 7/29/2007 10:59:59 PM - NNTP Response: 222 0 <xx*@xxx.com> 7/29/2007 11:00:05 PM - MsgID=<xx*@xxx.com> 7/29/2007 11:00:05 PM - BODY <xx*@xxx.com> 7/29/2007 11:00:06 PM - NNTP Response: K!?_??)*Me?##DA_)*
At 10:59:59, _MessageID was "Idle" and it retrieved the next article ID. So far, so good. It began to download the article body. At 11:00:05, _MessageID was NOT "Idle" but it still retrieved the article ID and it did not exit the sub.
I can't figure out why the 'If' statements are not working. When the _MessageID<>"Idle" it should just exit the sub. Can anyone tell me what is going on?
Nevermind, I'm stupid!
>
There is no better learning school especially when it is so wide
broadcasted.
:-)
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: TimS |
last post by:
I am getting a baffling File not found error (0x800A0035).
I am writing asp on a windows 2000 server. I build a path and filename from
several fields in a jet database using SQL commands, like...
|
by: Swengtoo |
last post by:
Hi,
The following code compiles and runs great using Visual C++ 6.0:
a.cpp
-----
void A::DoSomething() {
cout << "test";
}
// notice: A::DoSomething() is *not* a static member function
|
by: Chris Fonnesbeck |
last post by:
I thought I knew how to do error handling in python, but apparently I
dont. I have a bunch of code to calculate statistical likelihoods, and
use error handling to catch invalid parameters. For...
|
by: Mike |
last post by:
I have posted this before, but no one responds, so here
it goes again. I think my question is intimidating people
and I have no idea why?!? This is not a new concept. You
can do this with other...
|
by: Bonj |
last post by:
Hello
I am making a syntax highlighter for T-SQL, and I am going to hardcode the
words into it for speed's sake (I will probably have thought up enough new
features for a new version when the next...
|
by: Brian Victor |
last post by:
I'm trying to get FFTW (fftw.org) to work in such a way that it can be
called from a managed C++ module. The approach I've found to generate
the fewest linker errors is a mixed managed/unmanaged...
|
by: Double Echo |
last post by:
Hi,
Forgive me if I ask a dumb question, I'm new to classes and object programming with PHP,
and cannot figure out what the problem is with this class. Maybe I have overlooked
something but...
|
by: CharlesA |
last post by:
hi folks,
I'm using the .Net framework 1.1 with ASP.net and C#:
this is what I'm trying to do...
I've got a repeater template working that creates a hyperlink with a
javascript function call...
|
by: noddy |
last post by:
In both IE7 and FF2(using firebug) I get the same error.
I have a page that displays work contacts' details within a
<DIV class = "contactBase" >.
The div has a header area
<div...
|
by: Tim Redfern |
last post by:
Hi I'm having an issue that is probably obvious to somebody here but its
baffling me..
I'm using python (2.5.1) on an embedded linux sytem system (kernel
2.6.19 I think) with only 32MB memory...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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....
|
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
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |