Page 1 of 1
Issue-#164 Backward compatibilty with UpDn Controls
Posted: Sun Jul 02, 2017 11:48 am
by Robert
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Sun Jul 02, 2017 12:27 pm
by Robert
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Sun Jul 02, 2017 8:15 pm
by Josef Templ
Robert, could you explain the compatibility problem with your app?
Understanding the problem could help us to avoid similar incompatibilities for other changes.
- josef
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Sun Jul 02, 2017 8:51 pm
by Robert
Robert wrote:Regarding interclicking. I have an ordered list (generally fairly short, ie less than two dozen). For example "Apples, Bread, Cake, Donuts, Eggs, Fish" numbered 0, 1, 2, 3, 4, & 5.
If I (the user) select 2, "Cake" is displayed. If I UpArrow to 3, "Donut"s are displayed. But if I <Shift> UpArrow from 2 to 3 "Cake" is still displayed because I have shifted its position in the list up from position 2 to 3. This mechanism allows me to reorder the list, in this case to "Apples, Bread, Donuts, Cake, Eggs, Fish".
This no longer works, because if I <Shift> UpArrow it tries to move (or shift) "Cake" to position 2147483647 rather than position 3 in the list.
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Mon Jul 03, 2017 7:19 am
by Josef Templ
Sorry, Robert, I still don't get the picture.
Do you have multiple controls, an up/down control and a list control?
Connected via a notifier in the up/down control?
What happens if the user enters 2147483647 in the up/down control directly, ie without the shift-up click?
Isn't this the same problem then? If not, what is the difference?
In general, I am in favour of removing the shift-feature. In addition I try to understand the problem you have
and if it is really connected with the shift feature.
- Josef
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Mon Jul 03, 2017 8:26 am
by Zinn
Robert,
please can you post a small test program? Where we can check the behaviour you described.
- Helmut
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Mon Jul 03, 2017 10:37 am
by Robert
I'm not sure this code will make what I do any clearer. The point is I am using <Shift> to select an alternative behaviour, and don't want it to disrupt the usual UpArrow/DnArrow INCrement/DECrement behavior.
LibCycles is my usual basis for linked lists, and I have an INTEGER field
itemNo and a Field
itemName in the interactor
dlg. The
itemName is read only, and the Notifier is attached to
itemNo.
Code: Select all
TYPE
MyLink = POINTER TO RECORD (LibCycles.Link) name : Str64 END;
VAR
base : MyLink;
PROCEDURE NotifyTrailNo* (op, from, to : INTEGER);
VAR
pntr, dart : LibCycles.Link;
BEGIN
IF op = Dialog.changed THEN
Lib.Integers.Constrain (dlg.itemNo, 0, base.len - 1);
dart := base.GetNthLink (dlg.itemNo, LibCycles.zeroBase);
IF LibMisc.Shift () & (dlg.itemNo # from) THEN
pntr := base.GetNthLink (from, LibCycles.zeroBase);
LibCycles.Swop (pntr, dart);
END;
dlg.itemName := (dart(MyLink).name);
Dialog.Update (dlg)
END
END NotifyTrailNo;
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Mon Jul 03, 2017 11:03 am
by Josef Templ
I see. You are using the shift modifier in the notifier of an up/down control.
In principle, you could get the same kind of conflict with the Ctrl-modifier as well, right?
Anyway, for me it is OK to remove the shift feature from up/down controls.
The diffs look fine to me.
- Josef
Re: Issue-#164 Backward compatibilty with UpDn Controls
Posted: Mon Jul 10, 2017 7:49 am
by Zinn
Robert wrote:A newly introduced, obscure, and unused feature that uses the shift key to set min/max values has caused some backward compatibility problems. It is proposed to remove this feature.
Congratulation Robert, you turn the wheel back successfully. Certainly you will find other obscure backward compatibility problems. Which is the next one? Why didn't you make your application forward compatible? Just exchange the Shift-key against the Alt(er)-key. The advantage is that you needn't a vote.
- Helmut