Tkwidgets and field value updating
Posted: Mon Jun 08, 2015 9:03 am
Dear GiD-Team,
I am using several Tkwidgets to process user input. Consider the following simple example .prb below:
PROBLEM DATA
TITLE: Something
QUESTION: Some_Question
VALUE: 0
TKWIDGET: Some_Widget
END PROBLEM DATA
Some_Widget only opens a tcl window showing the given Value:
proc Some_Widget {event args} {
switch $event {
SYNC {
CreateErrorWindow [GiD_AccessValue get gendata Some_Question]
return
}
}
}
If I now enter a value (lets say 2) for Some_Question and press accept the Widget is called but the windows still shows 0. Only if I press Accept a second time, the right value (2) is shown. This means for me, that GiD somehow first updates the Value but with GiD_AccessValue I still access the old value. Is there another way to access the already updated value on pressing Accept the first time?
Greeting,
barnacle
I am using several Tkwidgets to process user input. Consider the following simple example .prb below:
PROBLEM DATA
TITLE: Something
QUESTION: Some_Question
VALUE: 0
TKWIDGET: Some_Widget
END PROBLEM DATA
Some_Widget only opens a tcl window showing the given Value:
proc Some_Widget {event args} {
switch $event {
SYNC {
CreateErrorWindow [GiD_AccessValue get gendata Some_Question]
return
}
}
}
If I now enter a value (lets say 2) for Some_Question and press accept the Widget is called but the windows still shows 0. Only if I press Accept a second time, the right value (2) is shown. This means for me, that GiD somehow first updates the Value but with GiD_AccessValue I still access the old value. Is there another way to access the already updated value on pressing Accept the first time?
Greeting,
barnacle