Gerhard

I've left the "HandleCtrlMsg2" procedure alone, but changed the "ChangeValue" as 
per the attached.

This seems to work (lightly tested!), and makes fewer (usually none) unnecessary 
Omnicasts in Controls.Notify.

Regards

Robert.

On 30/05/2012 10:52, Gerhard.Marent@VKW.AT wrote:
> 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@LISTS.OBERON.CH] Im Auftrag von Robert
> Gesendet: Dienstag, 29. Mai 2012 22:55
> An: BLACKBOX@LISTS.OBERON.CH
> 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=2695>), 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@LISTS.OBERON.CH
> Vorarlberger 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@LISTS.OBERON.CH
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2178 / Virus Database: 2425/5031 - Release Date: 05/29/12
>
>
>

----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV@LISTS.OBERON.7 ÜAu