Search found 124 matches

by RP__
Tue Jul 18, 2017 6:31 am
Forum: C++ Development
Topic: wxConnection cannot stop advise
Replies: 2
Views: 1126

Re: wxConnection cannot stop advise

I start it, and then when I try to stop it, my OnStopAdvise function isn't called. There's a log line in OnStopAdvise which logs the unique ID of the connection as well as it request. This log line never appears. The same happens with the server sample! The OnStopAdvise line is never logged. EDIT: I...
by RP__
Mon Jul 17, 2017 10:09 am
Forum: C++ Development
Topic: wxConnection cannot stop advise
Replies: 2
Views: 1126

wxConnection cannot stop advise

Hello everybody, It appears that when I use wxServer and wxClient on the same system, using TCP, I cannot always stop the Advise from the client. This also happens when I am using the sample. In fact, I always use the client sample to run with my server. When I use DDE, there are no issues and I can...
by RP__
Wed Jul 12, 2017 8:40 am
Forum: C++ Development
Topic: Form of a timer on wxServer
Replies: 11
Views: 2763

Re: Form of a timer on wxServer

The set-up is kinda reversed. There are clients who do the 'heavy work', the processing of tasks. I have to use the client(s), because they use a wxWebView to interact with a webinterface. The benefit of using those clients is that it's extremely scalable and I can use different ways of processing t...
by RP__
Wed Jul 12, 2017 6:20 am
Forum: C++ Development
Topic: Form of a timer on wxServer
Replies: 11
Views: 2763

Re: Form of a timer on wxServer

Heh, there are two applications already. That is why I am using wxServer and wxClient. The data that is sent from and to the client is already defined and from the first tests I did, it seems that this is going to work just fine. The issue now is mainly how I get the server to properly handle the qu...
by RP__
Tue Jul 11, 2017 8:08 am
Forum: C++ Development
Topic: Form of a timer on wxServer
Replies: 11
Views: 2763

Re: Form of a timer on wxServer

Use the wxApp instance for the timer event and just trigger your consumer class from there This is exactly what I don't want :P I will give the custom event handler a shot. Can I use wxServer on a different thread? That would make this a lot easier to deal with. A secondary thread would probably be...
by RP__
Tue Jul 11, 2017 6:49 am
Forum: C++ Development
Topic: Form of a timer on wxServer
Replies: 11
Views: 2763

Re: Form of a timer on wxServer

I'm sorry for the unclear explanation. The producer is a 'normal' C++ class, it has no wxWidgets components. The producer has a dispatcher (inherits wxServer) responsible for sending data to clients. When the application is idle (eg. no windows are open so no windows can hang), it should start dispa...
by RP__
Mon Jul 10, 2017 3:01 pm
Forum: C++ Development
Topic: Form of a timer on wxServer
Replies: 11
Views: 2763

Re: Form of a timer on wxServer

Point is, that it is not connected to a GUI class and has no event handling.
The sample code looks extremely ugly, where MyConnection goes back to the top frame to call MyServer to kill the MyConnection object.
by RP__
Mon Jul 10, 2017 8:40 am
Forum: C++ Development
Topic: Form of a timer on wxServer
Replies: 11
Views: 2763

Form of a timer on wxServer

Hello everybody, Currently I am implementing the producer-consumer principle in my application. Part of it, is sending tasks from the producer to the consumer, which is another application. For this I use TCP/DDE, aka wxServer and wxClient. I following the proper coding concepts, which means that th...
by RP__
Fri Jun 30, 2017 9:45 am
Forum: C++ Development
Topic: wxFrame - 4000+ lines of code (A question of style)
Replies: 9
Views: 2639

Re: wxFrame - 4000+ lines of code (A question of style)

MagickPanda wrote:though the good side is global variable usage are somewhat reduced to minimal
Why not construct a child control/object and pass the 'global' as a pointer?
Keep it alive in the parent class to keep the global usage to a minimum.
At some point you have to make concessions to achieve your goal.
by RP__
Thu Jun 29, 2017 7:37 am
Forum: C++ Development
Topic: wxFrame - 4000+ lines of code (A question of style)
Replies: 9
Views: 2639

Re: wxFrame - 4000+ lines of code (A question of style)

Hello Amanda,

Could you also perhaps share a screenshot of the interface when it is running?
Perhaps I could give you some advise on usage and placement of the controls, if you'd like.
You can also send me a private message.
by RP__
Wed Jun 28, 2017 7:49 am
Forum: C++ Development
Topic: wxwidgets accessing windows clipboard and key/key-combo hook question
Replies: 3
Views: 1263

Re: wxwidgets accessing windows clipboard and key/key-combo hook question

You could indeed use those two classes, I use them too and they're really helpful. Register the hotkey and make sure to unregister them as well. Use the wxEVT_HOTKEY event to handle the combinations. I remember that I used MSW MOD_SHIFT instead of the wxWidgets variant for some reason, but I am not ...
by RP__
Tue Jun 13, 2017 10:13 am
Forum: C++ Development
Topic: Leak in wxWebView?
Replies: 13
Views: 3270

Re: Leak in wxWebView?

I think that the best possible solution should be used and if it is either me implementing wxConvertStringFromOle and SysFreeString, or you implementing a new RAII class, I'd prefer your solution as it benefits wxWidgets better as a whole compared to my 'local' solution. EDIT: Just confirmed that th...
by RP__
Tue Jun 13, 2017 9:56 am
Forum: C++ Development
Topic: Leak in wxWebView?
Replies: 13
Views: 3270

Re: Leak in wxWebView?

If you want to create a new RAII class for it, then that's fine and I will let you handle this if you'd like.
I have created a ticket in Trac: "Memory leaks in wxWebView IE backend". It's awaiting approval now.
by RP__
Tue Jun 13, 2017 6:18 am
Forum: C++ Development
Topic: Leak in wxWebView?
Replies: 13
Views: 3270

Re: Leak in wxWebView?

Thanks for the information regarding the leak. I would like to report it myself and would also like to fix the issues in the IE webview source. Where can I find what I need to do in order to report the issue and provide a fix? I would use wxConvertStringFromOle and free the bstr after that by callin...
by RP__
Mon Jun 12, 2017 3:14 pm
Forum: C++ Development
Topic: Leak in wxWebView?
Replies: 13
Views: 3270

Re: Leak in wxWebView?

When I use the following fix, I get no leaks at all.
I noticed that wxConvertStringFromOle did leave behind a 'footprint', the code below does not:

Code: Select all

source = std::wstring(bstr);
SysFreeString(bstr);