Author | Message | Time |
---|---|---|
dyslexify | Does anyone use wxWidgets? I'm having some problems with the wxTextInputStream, but i'm not going to waste everyone's time if no one uses it :) thanks. | January 18, 2005, 8:21 AM |
UserLoser. | What is it and how can it help us or be useful on Battle.net bots? | January 18, 2005, 7:39 PM |
dyslexify | Well, I'm currently working on one, using wx as my gui controls. here's my problem: [code] void MyFrame::Recieve(wxSocketEvent& event) { wxString recv; wxTextInputStream t_in(*s_in); recv = t_in.ReadLine(); // or t_in >> recv myparse(recv); } [/code] now, s_in is a wxSocketInputStream, and this chunk comes from the SocketEvent function. Everything compiles okay, but when you run the program,it crashes, and i've narrowed it down to the "line = t_in.ReadLine()" bit. and I don't know why. this is my frist time really using wxInputStreams, so I don't really know. and UserLoser, i find this to be useful/helpful because the wxSocketInputStream and wxSocketOutputStream seem to be much easier ways to write data then the normal winsock methods. edit: changed code to make sense. update: Okay, i -think- i might have an idea. The code could be erroring out becauase i don't have a failsafe to make sure that the event was triggered by a incoming data event. but i can't test that theory right now. any other things i've overlooked would be helpful. | January 18, 2005, 8:12 PM |