//Marcus Daniels swarm support 10-19-2000 LB> I have a set of Entry widgets bound together in one LB> frame. During the simulation, the values of the linked variables LB> to these input widgets change however values on the displayed LB> window (frame) do not. You have to make calls (typically, indirectly) on the Entry's setValue: method in order to update the displayed value. #import #import #import @interface Controller: SwarmObject { id entry1; id entry2; int intVar; int unusedIntVar; } - createEnd; - (void)describe: outputCharStream; @end @implementation Controller - createEnd { id frame = [Frame create: [self getZone]]; [frame setWindowTitle: "MyFrame"]; entry1 = [Entry createParent: frame]; [entry1 linkVariableInt: &intVar]; [entry1 pack]; entry2 = [Entry createParent: frame]; [entry2 linkVariableInt: &unusedIntVar]; [entry2 pack]; return self; } - update { [entry1 setValue: [entry1 getValue]]; [entry2 setValue: [entry1 getValue]]; return self; } - (void)describe: outputCharStream { char buf[10]; sprintf (buf, "%d", intVar); [outputCharStream catC: buf]; [outputCharStream catC: "\n"]; } @end int main (int argc, const char **argv) { id controller; initSwarm (argc, argv); controller = [Controller create: globalZone]; while (1) { [controller update]; while (GUI_EVENT_ASYNC ()) {} } } /* Local Variables: compile-command: "$SWARMHOME/bin/libtool-swarm --mode=link gcc -D_GNU_SOURCE -o TestEntry -g -Wno-import -I$SWARMHOME/include -I$SWARMHOME/include/swarm -L/$SWARMHOME/lib/swarm -L$SWARMHOME/lib TestEntry.m -lobjc -lswarm" End: */