main logo
Subject: Re: [dabo-dev] dabo Commit 559
Author: Paul McNett

Posted: 2004/10/30 11:32:37
 
View Entire Thread
New Search


Ed Leafe wrote:
> On Oct 30, 2004, at 11:40 AM, Paul McNett wrote:
>
>> Eventually, I'm going to hide all the wx methods in the docs, so even
>> though they are there their use will be discouraged when there are
>> higher-level Dabo ways to accomplish the task. I think we must be
>> consistent with ourselves, and not worry about duplicating names with
>> the underlying toolkit we happen to be using.
>
>
> Are you going to also hide them in the editors? I had originally
> added enable(), and when I pulled up the 'command window' and typed in
> some code, I noticed the duplication in the intellisense.

Yes, hiding them from the auto-complete is the goal. The autocomplete
should present a clean list of the available Dabo properties and
methods. IOW, the ones we specifically put in. The wx props will of
course still be there so someone that knows wx could access them, but we
won't show the wx pm's in the auto-complete by default.


>> Actually, I liked that the timer would automatically start with a
>> positive Interval and stop with a 0 interval - I like VFP-like timers
>> because they are simple and I don't need to remember anything but
>> setting Interval and writing the code to run when Interval is reached
>> - but that's a different argument I don't have time to participate in
>> at the moment unfortunately! :)
>
>
> Explicit is better than Implicit. ;-)
>
> I'd prefer to be able to configure the timer ahead of time, and
> start and stop it as needed. When I set the interval, I don't expect it
> to start firing away. VFP timers behave more like the way I've changed
> dTimer: you can set the interval and nothing happens if the timer is
> disabled. You can stop the timer and it still remembers its original
> interval. I remember the discussion during the VFP 3 beta about the
> practice of stopping the timer by setting the interval to zero, and the
> explanation is that was more of a side-effect than an intended practice;
> otherwise, a zero interval would be the equivalent of a tight infinite
> loop.

Ok, I actually thought about this in the shower just now, and agree that
you want to be able to set the interval independently of the timer
starting or stopping. But the pm's need to be simplified IMO. I think I
want to see the following props and methods:

Properties:
Interval: just holds the timer interval value
Enabled: get/set interacts with wx

Methods:
start(): sets Enabled=True
stop(): sets Enabled=False

IOW, the methods are just helpers for the Enabled property, kind of like
how we put in the stop() method in the Dabo events even though we had
the Continue property already available which did the real work.

So, without looking at the code, this may be where it stands which is
great. But the enable(), disable() seem superfluous.


--
Paul McNett - http://paulmcnett.com
vcard: http://paulmcnett.com/pm.vcf

 
©2004 Paul McNett
<-- Prior Message New Search Next Message -->