Re: question about reset counter/data

This is a discussion on Re: question about reset counter/data within the TCL forums in Programming Languages category; jjjackjill89@gmail.com wrote: > hello guyz... > > i got some problem for this tcl. > > receive msg : 1234 > sent msg : 1234 > > > Mailbox CountIn CountOut > Count > ABC 1232 1232 0 > ASD 2 > 2 0 > > According to the above, for example i have two mailboxs. The ABC > mailbox hav 1232 msg come in and 1232 msg come out and also same to > ASD mailbox. how should i do to reset the counter for both of receive > and sent msg using proc? Whatever you have to do, ...

Go Back   Application Development Forum > Programming Languages > TCL

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-26-2008, 12:57 PM
Gerald W. Lester
Guest
 
Default Re: question about reset counter/data

jjjackjill89@gmail.com wrote:
> hello guyz...
>
> i got some problem for this tcl.
>
> receive msg : 1234
> sent msg : 1234
>
>
> Mailbox CountIn CountOut
> Count
> ABC 1232 1232 0
> ASD 2
> 2 0
>
> According to the above, for example i have two mailboxs. The ABC
> mailbox hav 1232 msg come in and 1232 msg come out and also same to
> ASD mailbox. how should i do to reset the counter for both of receive
> and sent msg using proc?


Whatever you have to do, most likely set some variables to 0.

You did not post any Tcl code, just what appears to be output.


--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Reply With Quote
  #2  
Old 08-26-2008, 08:42 PM
jjjackjill89@gmail.com
Guest
 
Default Re: question about reset counter/data

some body might help me to do the code. i have no idea
Reply With Quote
  #3  
Old 08-26-2008, 11:36 PM
Gerald W. Lester
Guest
 
Default Re: question about reset counter/data

jjjackjill89@gmail.com wrote:
> some body might help me to do the code. i have no idea


In general, comp.lang.tcl is at its best addressing specific,
focused questions. There are many readers who expert enough
to "help me do the code", but I'm skeptical about how
far you'll get without either a paid consulting engagement
OR more details about your project.

Would you be more comfortable writing your questions in a
language other than English?


--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Reply With Quote
  #4  
Old 08-27-2008, 01:43 AM
jjjackjill89@gmail.com
Guest
 
Default Re: question about reset counter/data

Hi all,

receive msg : 1234
sent msg : 1234

Mailbox CountIn CountOut
Count
ABC 1232 1232 0
ASD 2 2 0

According to the above, for example i have two mailboxs. The ABC
mailbox hav 1232 msg come in and 1232 msg come out and also same to
ASD mailbox. how should i do to reset the counter for both of receive
and sent msg using proc?




Can anyone tell me how to reset data/count after msg come in and out
for n amount of
time?
I tried to use after msg in and out but how do reset or resize the
total that the application is back in the zero
This is kind of my logic so far:

1) When msg come in and out, each mailbox have to reset to zero
(after idle)
2) If things happen during this period of time, cancel the idle
callback
(after cancel)
3) and wait until the next idle occur and reset to zero
Reply With Quote
  #5  
Old 08-27-2008, 08:03 AM
jjjackjill89@gmail.com
Guest
 
Default Re: question about reset counter/data

hellooo.... ???
Reply With Quote
  #6  
Old 08-27-2008, 08:20 AM
Colin Macleod
Guest
 
Default Re: question about reset counter/data

On 27 Aug, 13:03, jjjackjil...@gmail.com wrote:
> hellooo.... ???


You haven't given any understandable explanation of your problem, so
it's hard for anyone to answer. What kind of system are you running
on? Are the mailboxes you refer to provided by some other piece of
software? How do you expect a Tcl script to interact with them?
Reply With Quote
  #7  
Old 08-27-2008, 08:28 AM
Uwe Klein
Guest
 
Default Re: question about reset counter/data

jjjackjill89@gmail.com wrote:
> hellooo.... ???

sorry, your partner is unavailable <chime>.
Thank you for using comp.lang.tcl

Whatever gave you the impression that
this group is able to solve your
problems just from thin air, with no
further information given.

You should at least give us some
chicken gut to read from ;-)
For doing magic we would need some
more substantial bones to pick.

uwe
Reply With Quote
  #8  
Old 08-27-2008, 09:12 AM
jjjackjill89@gmail.com
Guest
 
Default Re: question about reset counter/data

the main thing here is how to reset the count of msg received and
sent. The mailbox(GUI) is created by other people(team) in my
department using vb. So i had sketch the interface as u can refer
above and exactly the same structure with that GUI created using vb. I
have to calculate the size of mailbox and reset the number or msg in
and msg out to zero. The main point here is the algorithm how to set
the data in mailbox back to zero. Mbe u can imagine the the structure
of the mailbox. I have a requirement where I want to have a tcl script
run a couple of processes in background parallely

This is kind of my logic so far:


1) When msg come in and out, each mailbox have to reset to zero
(after idle)
2) If things happen during this period of time, cancel the idle
callback
(after cancel)
3) and wait until the next idle occur and reset to zero


Can you please suggest me a solution. It would be really useful for me
if you can help me in this regard.



Reply With Quote
  #9  
Old 08-27-2008, 11:53 AM
Glenn Jackman
Guest
 
Default Re: question about reset counter/data

At 2008-08-27 01:43AM, "jjjackjill89@gmail.com" wrote:
> Hi all,
>
> receive msg : 1234
> sent msg : 1234
>
> Mailbox CountIn CountOut
> Count
> ABC 1232 1232 0
> ASD 2 2 0


Where did that come from? Did an external program generate that text?
Is it what you see on a GUI program that you're just re-typing here?

> According to the above, for example i have two mailboxs. The ABC
> mailbox hav 1232 msg come in and 1232 msg come out and also same to
> ASD mailbox. how should i do to reset the counter for both of receive
> and sent msg using proc?


What does it mean to "reset a counter for a mailbox"?

The only thing I can think of is that you have a bunch of new messages
that you want to mark as read. In which case, you'll have to tell us
what protocol you use to communicate with these mailboxes (POP, IMAP,
....)

Also, what's the "CountOut" of a mailbox? To me, a mailbox is merely
somethat holds messages (mbox file, maildir folder). The "count in" and
"count out" is meaningless.



--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous
Reply With Quote
  #10  
Old 08-27-2008, 05:26 PM
Snarby Gillespie
Guest
 
Default Re: question about reset counter/data

jjjackjill89@gmail.com <jjjackjill89@gmail.com> wrote:
> Hi all,
>
> receive msg : 1234
> sent msg : 1234
>
> Mailbox CountIn CountOut
> Count
> ABC 1232 1232 0
> ASD 2 2 0
>
> According to the above, for example i have two mailboxs. The ABC
> mailbox hav 1232 msg come in and 1232 msg come out and also same to
> ASD mailbox. how should i do to reset the counter for both of receive
> and sent msg using proc?


I think you need to yuse proc to reset counter.
Or maybe you don't. Try using reset to set counter instead.

I tried proc to reset counter but it didn't work,
because the thing is blue. Used reset to set counter to zero
(set to zero!!!) and it workd. Thing is not blue anymore!
Also, counter is zero.

Anyway, hoep this helps.


--Snarby
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:31 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.