Andrew Lowe
Usenet Archive
- Joined
- Jul 8, 2000
- Messages
- 27
- Reaction score
- 0
Hi all,
I have some functionality where a user can select a text element, accept it, select a near by line, accept it and then the text will be aligned parallel to the selected line. If the user then selects another line, the text, which represents a number, will be incremented, a new element created and then placed next to the newly selected line and so on, select line, increment number, place new text, select line, increment number, place.......
I have filters in place, mdlLocate_setElemSearchMask set to find only text when I am looking for text and lines when I am looking for lines. There are also some mdlLocate_setFunction(LOCATE_POSTLOCATE, XXX) to make sure some selection criteria are obeyed.
The problem arises if I start the functionality and then before I select any text, select, say, the delete command, delete something and then restart the functionality. I would expect it to work as expected, select the text, accept, select the line...., but instead it applies the selection criteria for the lines, the second stage, for the first stage and disallows the selection of the text. It displays the correct prompts but does not accept my text selection. Debugging printf's reveal that it is using the line selection criteria. Has anyone come across this sort of problem before, the wrong selection criteria being applied when I am trying to select something? Is there a way of totally restarting the selection process? I have
mdlState_clear;
mdlState_startDefaultCommand;
mdlCurrTrans_clear;
mdlLocate_normal;
already at the top of the functionality to try and reset things but nothing seems to work.
Any ideas would be greatly appreciated.
Regards,
Andrew Lowe
I have some functionality where a user can select a text element, accept it, select a near by line, accept it and then the text will be aligned parallel to the selected line. If the user then selects another line, the text, which represents a number, will be incremented, a new element created and then placed next to the newly selected line and so on, select line, increment number, place new text, select line, increment number, place.......
I have filters in place, mdlLocate_setElemSearchMask set to find only text when I am looking for text and lines when I am looking for lines. There are also some mdlLocate_setFunction(LOCATE_POSTLOCATE, XXX) to make sure some selection criteria are obeyed.
The problem arises if I start the functionality and then before I select any text, select, say, the delete command, delete something and then restart the functionality. I would expect it to work as expected, select the text, accept, select the line...., but instead it applies the selection criteria for the lines, the second stage, for the first stage and disallows the selection of the text. It displays the correct prompts but does not accept my text selection. Debugging printf's reveal that it is using the line selection criteria. Has anyone come across this sort of problem before, the wrong selection criteria being applied when I am trying to select something? Is there a way of totally restarting the selection process? I have
mdlState_clear;
mdlState_startDefaultCommand;
mdlCurrTrans_clear;
mdlLocate_normal;
already at the top of the functionality to try and reset things but nothing seems to work.
Any ideas would be greatly appreciated.
Regards,
Andrew Lowe