Search found 58 matches

by zobbo
Mon May 10, 2010 9:07 am
Forum: C++ Development
Topic: Stop beep, beeping
Replies: 19
Views: 3273

Does e.Skip(true) work?
by zobbo
Mon May 10, 2010 7:56 am
Forum: C++ Development
Topic: wxSocketBase::Unread usage
Replies: 2
Views: 463

wxSocketBase::Unread usage

Hi, I'm trying to use SocketBase::Unread for testing purposes. What I do is read the data from the socket via wxSocketClient and then unread it so it can be read again. The trouble is, it will only unread if my buffer is less than what is going to be read. For this test I expect 51 bytes, but if my ...
by zobbo
Mon May 10, 2010 5:31 am
Forum: wxDev-C++
Topic: Troubles with SocketBase::Unread()
Replies: 2
Views: 745

Sorry, that's where I intended to post this.
by zobbo
Sun May 09, 2010 9:22 am
Forum: wxDev-C++
Topic: Troubles with SocketBase::Unread()
Replies: 2
Views: 745

Troubles with SocketBase::Unread()

Hi, I'm trying to use SocketBase::Unread for testing purposes. What I do is read the data from the socket via wxSocketClient and then unread it so it can be read again. The trouble is, it will only unread if my buffer is less than what is going to be read. For this test I expect 51 bytes, but if my ...
by zobbo
Tue Feb 02, 2010 8:15 am
Forum: Announcements and Discoveries
Topic: Where is bugg tracker on wxWidgets 2.9.0
Replies: 4
Views: 1472

I'm also getting the problem where socket->isConnected() always returns false. It has caused me a bit of grief tonight. It seems the case since the server I'm connecting to (not a wxwidgets one) seems to log the connection quite happily and the disconnection. Using WaitOnConnect works fine. I am usi...
by zobbo
Thu Sep 17, 2009 9:03 am
Forum: C++ Development
Topic: Quick question about event order
Replies: 1
Views: 296

Ok, maybe a bit of code will help. I made a little example which shows the problem. I have a Client class which posts the custom event to the Server class. In MainApp I do all the setup, basically connecting and writing to the Server class connection. Server will Accept a connection in Onserverevent...
by zobbo
Mon Sep 14, 2009 7:59 am
Forum: C++ Development
Topic: Quick question about event order
Replies: 1
Views: 296

Quick question about event order

Hi, I have a custom event I fire when I receive data. It posts from it's own class to another class. This event needs to wait until another event has set a socket to write, but even if I use wxQueueEvent and my socket connection is created before my wxQueueEvent call, my custom event always fires be...
by zobbo
Thu Apr 09, 2009 10:27 am
Forum: C++ Development
Topic: Custom Events - wxCommandevent vs wxEvent
Replies: 6
Views: 749

I guess my question to that is, what is the purpose of method 3? I am quite happy using Method 4, it does what I want and is understandable. But I'm just curious as to why the other method doesn't work, or maybe more accurately in what circumstance that method would be used. I think the answer is t...
by zobbo
Thu Apr 09, 2009 5:20 am
Forum: C++ Development
Topic: Custom Events - wxCommandevent vs wxEvent
Replies: 6
Views: 749

Hi, I'm not quite clear if you want a propagating event-type or not. If you do, why not use method 4? If you don't, you should be able to change method 4 to derive from wxEvent instead of wxCommandEvent, simply by making the following changes: // A custom event that transports a whole wxString. cla...
by zobbo
Tue Apr 07, 2009 7:47 am
Forum: C++ Development
Topic: Custom Events - wxCommandevent vs wxEvent
Replies: 6
Views: 749

Thanks, that didn't fix it though. Hmm, maybe I'll play around with it for a bit. But the other method works so I'll probably end up using that.

Zobbo
by zobbo
Sun Apr 05, 2009 5:05 am
Forum: C++ Development
Topic: Custom Events - wxCommandevent vs wxEvent
Replies: 6
Views: 749

Custom Events - wxCommandevent vs wxEvent

Hi, For a while I have been trying to get Custom Events working. At first I was using wxAppConsole with no success, other than firing socket events. So I moved it to wxApp, and the custom event didn't work either. I was using Custom Event Method 3 from the http://wiki.wxwidgets.org/Custom_Events wik...
by zobbo
Fri Mar 06, 2009 6:06 am
Forum: C++ Development
Topic: Firing an event manually
Replies: 7
Views: 1364

Hi, As usual I was missing something when doing this. That error is caused by not setting up the handler function parameter correctly, I was using a void parameter in my event handler instead of using Myhandler(MyEvent &event) This is what was causing the error in wxStaticCastEvent // this is used t...
by zobbo
Thu Mar 05, 2009 6:53 am
Forum: C++ Development
Topic: Firing an event manually
Replies: 7
Views: 1364

What I am doing is use wxPostEvent, like this: wxCommandEvent commandEvent(wxEVT_PAINT); wxPostEvent( mainWindow->mRenderPanel, commandEvent); Seems to work. :) Hi Jacmoe, Yes, I see you are using wxCommandEvent which is another way to do it. I don't have wxPostEvent, I'm on version 2.8.4, but I se...
by zobbo
Tue Mar 03, 2009 6:19 am
Forum: C++ Development
Topic: Firing an event manually
Replies: 7
Views: 1364

Hi Knuth, Yes I've read this. In fact I created a custom event in an unrelated part of the app, but this doesn't appear to work either. I used the code in the overview example of wxPlot but some parts don't work, like declaring the macro. Anyway, it seems to be a casting issue in this case. I declar...
by zobbo
Sun Mar 01, 2009 1:40 am
Forum: C++ Development
Topic: Firing an event manually
Replies: 7
Views: 1364

I don't know if this is what you were asking for ... Instead of using this->ProcessEvent try using wxPostEvent( frame, event ); where frame is the frame where you have the event table that processes the specified events(probably 'this' in your case). Hi Knuth, Thanks, I will look at this. I'm not a...