[BLACKBOX] AW: [BLACKBOX] Control for SETs

From: [at]} <Gerhard.Marent{>
Date: Wed, 30 May 2012 09:52:50 +0000

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

I have a workaround for the update problem of the checkboxes. If you replace in CtlsxSets the

PROCEDURE(c: Control) HandleCtrlMsg2 (f: Views.Frame; VAR msg: Controllers.Message; VAR focus: Views.View);

by the following, the problem is solved. (Not elegant, but it works.)

Regards Gerhard Marent

 
        PROCEDURE(c: Control) HandleCtrlMsg2 (f: Views.Frame; VAR msg: Controllers.Message; VAR focus: Views.View);
                VAR h, i: INTEGER;
        BEGIN
                        IF ~c.disabled & ~c.readOnly & c.item.Valid() THEN
                        WITH msg: Controllers.TrackMsg DO
                                IF c.ClickAtButton(msg.x, msg.y, h) THEN
                                        IF (18 IN msg.modifiers) THEN
                                                IF c.backCol[h] = markCol THEN c.backCol[h] := stdBackCol;
                                                ELSE c.backCol[h] := markCol END; Draw(c, f);
                                        ELSE
                                                ChangeValue(c, f, h)
                                        END;
                                        FOR i := 0 TO 31 DO
                                                Controls.Notify(c, f, Dialog.changed, 0, i);
                                        END;
                                END;
                        ELSE
                        END
                END;
        END HandleCtrlMsg2;





-----Ursprüngliche Nachricht-----
Von: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Gesendet: Dienstag, 29. Mai 2012 22:55
An: BLACKBOX{([at]})nowhere.xy
Betreff: Re: [BLACKBOX] Control for SETs



On 29/05/2012 18:37, Bob Walkden wrote:
>>
>> I had a look at the MS style guide
>> (<http://www.microsoft.com/en-us/download/details.aspx?id&95>), a
>> 900 page extravaganza, but failed to recognise anything I wanted to copy.
>> #
>
> it's at the bottom of page 34.
>
> B
>>
>> I then tried Gerhard Marent's Control - just what I wanted for my
>> current application - thanks.


Ok - Its a Control whose description includes the word SET. But it is so far away from what I wanted that I didn't recognise it (in a VERY fast skip of a 900 page document) as relevant.


The attached picture compares Gerhard's Control with an array of CheckBoxes. His Control gives a good visual indication of which bits are set in a form that has a pretty good resonance with my application.


I have found a (minor) bug which I can't quite track down.

Suppose, with reference to the attached picture, I have TWO sets of CheckBoxes,
and 2 Set Controls, all linked to the same SET, and no Guards or Notifiers.

When I toggle some bit with a CheckBox all 4 Controls automatically update.
However, when I toggle a bit with the Set Control only the Set Controls update,
the CheckBoxes do not until some other event causes then to be redrawn.

I thought the problem was with the way Controls.Notify was being used, but am
not sure.

Using Notifiers is an easy workaround, but I am interested to understand the
problem as I suspect that some other Controls I've written may have the same
problem.


Regards

Robert







----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xyVorarlberger Illwerke Aktiengesellschaft ein Unternehmen von illwerke vkw
Rechtsform: Aktiengesellschaft, Sitz: Bregenz, Firmenbuchnummer: FN 59202m
Firmenbuchgericht: LG Feldkirch, DVR 0008753, UID-Nr.: ATU 36737402
Vorarlberger Kraftwerke Aktiengesellschaft ein Unternehmen von illwerke vkw
Rechtsform: Aktiengesellschaft, Sitz: Bregenz, Firmenbuchnummer: FN58920y
Firmenbuchgericht: LG Feldkirch, DVR 0027961, UID-Nr.: ATU 36737304
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1287159201_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhY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