cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
Got a problem here that's driving me nuts
I have a program that opens a windows form and also starts an HTTP listener. Let us suppose there is one textbox on the form, whose text property is bound to the application settings "MyText"
If I programmatically change the setting directly using a timer on the form, the textbox updates to show the new value
If I programmatically change the setting from the web interface/httplistener handler code the textbox doesnt update, though when the new web page is generated it can see the changed property (so the property is changing correctly)
No exceptions are being thrown that could upset things (I run with Break-on-thrown-exceptions enabled for all exception types) and I'm currently at a loss to explain this behaviour discrepancy. The only wondering I currently have is if it's to do with cross threading; the httplistener is async and will hence run in its own completer thread.. Perhaps updating the properties from that thread will mean no event is raised and dealt with by the UI thread?
I have a program that opens a windows form and also starts an HTTP listener. Let us suppose there is one textbox on the form, whose text property is bound to the application settings "MyText"
If I programmatically change the setting directly using a timer on the form, the textbox updates to show the new value
If I programmatically change the setting from the web interface/httplistener handler code the textbox doesnt update, though when the new web page is generated it can see the changed property (so the property is changing correctly)
No exceptions are being thrown that could upset things (I run with Break-on-thrown-exceptions enabled for all exception types) and I'm currently at a loss to explain this behaviour discrepancy. The only wondering I currently have is if it's to do with cross threading; the httplistener is async and will hence run in its own completer thread.. Perhaps updating the properties from that thread will mean no event is raised and dealt with by the UI thread?