What is the best way to code using a timer for: 1) a Windows service (no windows) 2) driving output to a printer (must execute in the UI process) -Carl You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Carl,
-- Maybe I'm a little slow today but I don't understand your question, can you elaborate? Lou On Wednesday, September 17, 2014 2:06:48 PM UTC-4, Carl Gundel wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Lou, Well, I'm having trouble finding timer examples what don't rely on GUI related classes. The Windows service will not have a GUI, so I'm not sure how this is supposed to work. Thanks, -Carl On Wednesday, September 17, 2014 2:37:52 PM UTC-4, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Carl,
-- I'm still not sure what you want to do or how you want to use the/a timer, so what I am about to suggest may be way off base. There is the simple Delay class. You can do something like this: | delay | delay := Delay forSeconds: 2. [ delay wait. "do something." "some code that will answer true to keep going and false to stop." ] whileTrue. Delay can also take #forMilliseconds:. The above can be in a separate fork of any priority. Does this help? Lou On Wednesday, September 17, 2014 3:21:36 PM UTC-4, Carl Gundel wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Thanks. Yes, I've been considering using the Delay class but I would prefer a timer. -Carl On Wednesday, September 17, 2014 4:44:34 PM UTC-4, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Wednesday, September 17, 2014 1:51:59 PM UTC-7, Carl Gundel wrote:
--
Time millisecondsToRun: [...] is a timer. But I doubt you want to time something. Why don't you elaborate on how you want to use this "whatever you are after"? You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Richard, I need to periodically examine a list of objects to perform work on. I don't need to measure time to execute anything. So, I need a timer tick, and it should not rely on GUI code. Thanks, -Carl On Wednesday, September 17, 2014 5:03:32 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Ok, then nothing seems to be time critical and then I think that using Delay within a background process seems to be a good start ...
-- Am Mittwoch, 17. September 2014 23:23:21 UTC+2 schrieb Carl Gundel:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
In reply to this post by Carl Gundel-2
On Wednesday, September 17, 2014 2:23:21 PM UTC-7, Carl Gundel wrote:
--
As Marten says, a Delay in a forked (background) process is the idiom. You may also want to evaluate AbtWorkQueue in the context of "a list of objects to perform work on". You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Carl Gundel-2
Hey Carl,
-- It seems the other guys have also gotten you on to using a delay. If I remember correctly (it has been a long time) I seem to remember a timer part example but if you look under the covers I think it was built on top of a delay. So making your own loop with a delay in it should do the trick. Lou On Wednesday, September 17, 2014 5:23:21 PM UTC-4, Carl Gundel wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |