10-18-2006 03:04 AM
10-18-2006 05:35 AM
10-18-2006 05:47 AM
Hi Roberto,
thanks for your answer. But unfortunately this is not the case. It's always the same control that is firing EVENT_COMMIT.
Steffen
10-19-2006 04:30 AM
Hello Steffen,
seems little strange what is going on with your string control. The desired behaviour is as you described. After typing some characters and pressing <enter> the EVENT_COMMIT should fire if the control mode is set to Hot. If you only want to react to certain keys for the acknowledgement of the string input I would recommend using the EVENT_KEYPRESS event, as in this case the eventData1 contains the information about the button pressed.
int CVICALLBACK StringInput (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
char key[128];
switch (event)
{
case EVENT_KEYPRESS:
sprintf (key, "%c", eventData1);
SetCtrlVal (panelHandle, PANEL_STRING_2, key);
break;
case EVENT_COMMIT:
break;
}
return 0;
}
You could also post a snippet of code here that reproduces the behaviour, so we can take a more detailed look.
Regards,
CL
National Instruments Applications Engineering
10-19-2006 07:21 AM
10-20-2006 10:24 AM
Hello Steffen,
you are right in saying that this is just a workaround. Thus we should try to find the reason which is of particular interest for us as well.
Meanwhile I have tried to get closer to the issue as well by using some TS ActiveX controls in my CVI-app as well. Unfortunately I haven't come across the behaviour you described so far.
I can get in contact with R&D regarding this issue as soon as we have more detailed information about this and a sample which reproduces the phenomenon.
Thus I would like to ask you for some more details.
Please let me know, I can then forward this to R&D for investigation.
Regards,
CL
National Instruments Applications Engineering
10-25-2006 03:33 AM
11-06-2006 03:49 AM
12-28-2006 10:17 AM
12-28-2006 10:28 AM
Great,
thanks for the information Allen.
Regards, Christoph
NI - Germany