|
|
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » howto force evaluation after <CR>
howto force evaluation after <CR> [message #10869] |
Wed, 01 August 2007 21:16 |
ebojd
Messages: 225 Registered: January 2007 Location: USA
|
Experienced Member |
|
|
I have come across a trivial problem while developing an interface to drive our LiDAR (think of it as a telescope with a 3000W laser pointer attached). When I tell the telescopic mount to go to a particular elevation or azimuth via an EditDoubleNotNull field, it calls the callback function for every character typed in instead after a <CR> or moving the mousse out of the focus area. What is the easiest way to force the evaluation after a <CR>?
Follows is the prototype code:
void telescope_ctl::btn_move_el_ctl()
{El = (double)~jog.jog_pos_el;}
telescope_ctl::telescope_ctl()
{
...
jog.jog_pos_el <<= THISBACK(btn_move_el_ctl);
...
}
Thanks,
EBo --
[Updated on: Wed, 01 August 2007 21:18] Report message to a moderator
|
|
|
|
|
|
|
|
Re: howto force evaluation after <CR> [message #10963 is a reply to message #10960] |
Tue, 07 August 2007 23:55 |
ebojd
Messages: 225 Registered: January 2007 Location: USA
|
Experienced Member |
|
|
I'll look at this again later. I decided that typing the number in then punching the "Go" button made more intuitive sense -- also I lost one of the power supplies on my test bench and one-thing-lead-to-another and I fried the output drivers on my embedded development system, so I have had other things on my mind...
Thanks for following up on this though...
EBo --
ps: IIRC the problem was not with HasFocus but it did not behave like I wanted -- wait to return until after 1) typeda <CR>, or 2) left focus. The "Go" button makes intuitive sense without violating the law of minimal surprise...
[Updated on: Wed, 08 August 2007 00:04] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun May 19 16:25:39 CEST 2024
Total time taken to generate the page: 0.01076 seconds
|
|
|