Hi folks
Here's another question ;-( Its in the swap() routine, again ;-(
determined to get this working
Mark
main(){
pgInit();
pgRegisterApp();
pgEnterContext(); // context 1
create some buttons and pgBind 1 of them to entryList
pgEventLoop();
pgLeaveContext(); // context 1
}
entryList(){
pgEnterContext(); //context 2
create a new popup
put a PG_WIDGET_BOX in it (call it wBox)
put a bunch of PG_WIDGET_LISTITEMs in the box and
bind each to dataEntry
create exit button and bind it to exitRtne // exits context 2, right?
pgEventLoop();
}
dataEntry(struct pgEvent *evt){
pgEnterContext() // context 3
grab and save text from widget that had the event
(evt->from, call this widgetHandle)
create new popup
create PG_WIDGET_FIELD (call this widgetWithText) in
the popup, load it with the saved text and
pgBind it to swapStringsAndExit rtne
pgEventLoop()
}
swap(){
grab text from widgetWithText (in dataEntry)
compare with text from widgetHandle (in entryList)
if they are different{
text=pgDup(pgGetWidget(widgetWithText,PG_WP_TEXT));
pgChangeContext(text,-1);
pgSetWidget(widgetHandle,
PG_WP_TEXT,text,
0);
Question:
Which context does pgChangeContext(text,-1) effect?
The problem is the screen does not display the new
text. Even though reselecting widgetHandle will
create a PG_WIDGET_FIELD with the
new text - so I know its there. How do I force
the screen to update?
After pgSetWidget(widgetHandle,
PG_WP_TEXT,text,
0);
I've tried: pgUpdate() (even though the docs said
its not needed)
and pgSubUpdate(wBox)
and had no luck. Any ideas?
}
pgLeaveContext() //exit context 3, right?
}
exit(){
pgLeaveContext();
}
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel