Hello Brett,
Concerning the TimeWidget:
> I'm trying to get my hands dirty on
> some Rosegarden code and have been
> looking at a minor issue in the TimeWidget. Specifically,
> the
> Millisecond spinbox doesn't handle keyboard input correctly
> -- if I
> type in "451", I get "340" in the text box; if I type "650,
> I get
> "539". None of the other spinbox widgets have this
> behavior, and I'm
> not sure why this one is doing it. The only thing I can
> think of is
> that it's tied to a realtime calculation and it's getting
> adjusted
> inaccurately.
Here is my take on it.
Whenever we type directly in any of the spin boxes in the TimeWidget, each
keystroke is triggering a recalculation.
Try it in the Measure and beat box...you'll see what I mean. Every keystroke
triggers a recalculation.
The problem with this method when it comes to the msec box is that, may times
we are approaching the granularity limits of RG. So each keystroke is
triggering a recalculation based on the information in the box just after the
keystroke.
That is why you are getting odd numbers as you type.
The spin box buttons itself are a bit deceptive as well since they appear to be
adding or subtracting 10 to the value in the spin box, then that number is
getting recalculated to match RG granularity.
I'm not certain this is actually a good behavior. I guess the question is,
will something break in RG (like the sequencer) if we have durations or start
times that don't align with RG's granularity.
My guess is that it will not.
Maybe a better solution is to auto recalculate when we type, and instead of
updating the field we could color the background of the box as pink or red, or
put an astrik next to it that has a tooltip attached explaining that this value
is not currently falling within RG's granularity.
The up and down arrows on that widget could be made a bit more intelligent to
step only to the next valid increment, instead of the add ten and see what
happens approach.
...
I guess we could just not recalculate in this scenario, and just let people
they are actually getting 123 msec or 124 msec (when in reality they are not).
...
I think as long as the Sequencer or nothing else is breaking, I think we should
just let people type what they want in this box and not bother with adjusting
it to the "real time."
...
I hope this helps.
Sincerely,
Julie S.
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel