Well, been playing around with this all day from about 80 different angles and I'm still stuck, so I figured I'd see if any of you know a better way. I'll break it up into two sections so you can skip to the stuff you want
// Background info on the problem
I've set up a menu that I want to take information passed in a message from a (modified) TCPlink class and use it to fill in some of its fields.
I'm starting off simple by requesting a string from my server using an instance of myTCPlink within my GUIpage, then trying to take the string it returns and set it to be the caption in a GUIlabel.
The problem is that there is, of course, some latency between the time my guiPage opens the socket and requests the string and the time it actually recieves the string. However there doesn't seem to be any way to wait for any length of time since GUIpage is a subclass of object and not actor i cant use sleep, tick, or anything else like them to poll for the string.
Just to make sure it was actually being sent i created an "update" button that manually checks the myTCPlink instance for the string and updates the label, and that works, but I want it done automatically.
// actual question
myTCPlink recieves a notification when the string is recieved from the event TextRecieved but I cant figure out how to pass it on at that time to a function in my GUIpage so it can update the labels. How can I do so? As always any help is greatly appreciated.
// Background info on the problem
I've set up a menu that I want to take information passed in a message from a (modified) TCPlink class and use it to fill in some of its fields.
I'm starting off simple by requesting a string from my server using an instance of myTCPlink within my GUIpage, then trying to take the string it returns and set it to be the caption in a GUIlabel.
The problem is that there is, of course, some latency between the time my guiPage opens the socket and requests the string and the time it actually recieves the string. However there doesn't seem to be any way to wait for any length of time since GUIpage is a subclass of object and not actor i cant use sleep, tick, or anything else like them to poll for the string.
Just to make sure it was actually being sent i created an "update" button that manually checks the myTCPlink instance for the string and updates the label, and that works, but I want it done automatically.
// actual question
myTCPlink recieves a notification when the string is recieved from the event TextRecieved but I cant figure out how to pass it on at that time to a function in my GUIpage so it can update the labels. How can I do so? As always any help is greatly appreciated.
Comment