For the issue see https://redmine.blackboxframework.org/issues/164.
There is some discussion on this topic in viewtopic.php?f=33&t=638.
Issue-#164 Backward compatibilty with UpDn Controls
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: Issue-#164 Backward compatibilty with UpDn Controls
Robert, could you explain the compatibility problem with your app?
Understanding the problem could help us to avoid similar incompatibilities for other changes.
- josef
Understanding the problem could help us to avoid similar incompatibilities for other changes.
- josef
Re: Issue-#164 Backward compatibilty with UpDn Controls
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.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".
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: Issue-#164 Backward compatibilty with UpDn Controls
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
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
Robert,
please can you post a small test program? Where we can check the behaviour you described.
- Helmut
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
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.
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;
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: Issue-#164 Backward compatibilty with UpDn Controls
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
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
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.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.
- Helmut