AW: Progression Bar

From: Zinn, Helmut <"Zinn,>
Date: Thu, 11 Dec 2003 14:43:02 +0100

----boundary-LibPST-iamunique-733631171_-_-
Content-type: text/plain

Hallo Rene

> Just two questions:
>
> 1) Why did you choose to only link an integer to the view? There are at
least three values that are
> interesting for the bar, namely min, cur and max (there's a good argument
for the other properties,
> too, but even more for these three)? cur does not have a meaning aside
from min and max, IMHO.

Because it is easier to use. Up/Down Field also use an INTEGER without min,
cur, max. You can change min and max via the property inspector.

What does IMHO mean?

> 2) For all values of max >1207 and min = 0 and cur =max-1 a TRAP 20
happens in f.DrawRect at
> CtlsProgress.DrawBars, and size is negative!

Change 2 times the line
        size := size * (c.cur - c.min) DIV (c.max - c.min);
against
        size := SHORT(LONG(size) * (c.cur - c.min) DIV (c.max - c.min));
and it will work.

I have no problem with the behaviour of INTEGER calculation. It is an
efficient implementation. Wrap around is useful for logical programming with
INTEGER.

Regards

Helmut



-------------

Diese E-Mail wurde auf Viren ueberprueft.

IG Metall

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.



----boundary-LibPST-iamunique-733631171_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW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nRpY3VsYXIgb3ZlciB3ZWVrZW5kcyBvciBob2x5ZGF5
fX0AaWdtZXRhbGwuZGUg


----boundary-LibPST-iamunique-733631171_-_---
Received on Thu Dec 11 2003 - 14:43:02 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:00 UTC