Search found 317 matches

by alys666
Tue Oct 29, 2019 9:01 pm
Forum: Compiler / Linking / IDE Related
Topic: [SOLVED] CB or wxWidgets issue?
Replies: 5
Views: 495

Re: CB or wxWidgets issue?

if everything is identical, could you try to run binary from machine 1 on machine 2? and vice versa. if effect is the same - then something is different on this machines. also you could compare two binaries, on size, symbols inside, binary equivalence, etc. and finally you could build app for testin...
by alys666
Mon Oct 28, 2019 8:55 pm
Forum: wxWidgets Development (Russian)
Topic: можно ли повысить приоритет основного процесса
Replies: 5
Views: 805

Re: можно ли повысить приоритет основного процесса

если там самостройный интерпретатор самостройного языка, в язык надо вводить паралеллелизм, те же треды, и тогда их можно выполнять на копии виртуальной машины в другом потоке... ну и писать на этом языке в стиле паралельного исполнения.
by alys666
Mon Oct 28, 2019 8:51 pm
Forum: wxWidgets Development (Russian)
Topic: можно ли повысить приоритет основного процесса
Replies: 5
Views: 805

Re: можно ли повысить приоритет основного процесса

приоритет менять бессмысленно. высокоприоритеные системные потоки и процессы перебивать нельзя, а потоки пользовательские там все твои. если конечно рядом не крутится браузер с видосом. и еще 10 приложений. если не хватает поизводительности, надо: 1. правильно писать саму аппу 2. паралеллить правиль...
by alys666
Mon Oct 28, 2019 10:25 am
Forum: C++ Development
Topic: [Solved]wxWidgets multithreaded and update UI.
Replies: 8
Views: 576

Re: [Solved]wxWidgets multithreaded and update UI.

guys. to send properly wxThreadEvent from user thread to main GUI thread, i just wrote this function. it's from my code. there are two variants(fast) and canonical :0) chose which you like. void sendAsyncMessage( wxEvtHandler *frcv, //message reciever int fuid, //message uid int fint, //integer data...
by alys666
Sun Oct 27, 2019 12:52 pm
Forum: C++ Development
Topic: [Solved]wxWidgets multithreaded and update UI.
Replies: 8
Views: 576

Re: std::thread will block gui and more strange beheavior.

you must run secondary thread, and it must send wxThreadMessage(or derived class) objects to main frame(or any derived class from wxEventHandler). this works as; thread "sends" a message - just puts an object to thread safe wxEvtHandler incoming queue. when system switches to main(GUI) thread, it re...
by alys666
Sun Oct 27, 2019 10:52 am
Forum: C++ Development
Topic: [Solved]wxWidgets multithreaded and update UI.
Replies: 8
Views: 576

Re: std::thread will block gui and more strange beheavior.

test = std::thread(&myFrame::replace, this); test.join(); join blocks the current thread(main gui thread) till test finishes. so 1. or test is not finished 2. or finished, but during its work has ruined GUI because of access to GUI functions. --- if this is a function you used as thread body, then ...
by alys666
Sat Oct 26, 2019 7:50 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 505

Re: Howto bind within a derived class?

doublemax wrote:
Sat Oct 26, 2019 7:43 am
This works:
so what? a class name added only?
i just woke up and am not able to normally read or compare code :)

aah. I got. bound to button, not button group
by alys666
Sat Oct 26, 2019 7:39 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 505

Re: Howto bind within a derived class?

Bind(wxEVT_BUTTON, &OnClick, this, id);
compiler must blame you for &OnClick, without class name... seems you has no proper warnings on.
set -wall for gcc, or 4th warning level(if i remember) for visual studio.
by alys666
Sat Oct 26, 2019 7:31 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 505

Re: Howto bind within a derived class?

doublemax wrote:
Sat Oct 26, 2019 7:28 am
Then wxEvtHandler should be used as base, not wxWindow. But if you bind to the button, even that is not necessary.
Base of what? wxWIndow inherits wxEvtHandler.
by alys666
Sat Oct 26, 2019 7:26 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 505

Re: Howto bind within a derived class?

as i understand the Bind function of wxEvtHandler... it binds a listener to <this> handler. but because listener is a nonstatic method of class, you must give a couple - object instance+object class method, because method cannot be called without instance it should be kinda Bind(wxEVT_COMMAND_BUTTON...
by alys666
Sat Oct 26, 2019 7:00 am
Forum: C++ Development
Topic: Howto bind within a derived class?
Replies: 12
Views: 505

Re: Howto bind within a derived class?

Bind(wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&OnClick, parent, id); 1. do not use old style type conversion (wxObjectEventFunction), because it is a reinterpret_cast - and very looks like a bug. imo in this string you have bound some function OnClick of parent instance, to 'this' handl...
by alys666
Fri Oct 25, 2019 10:38 am
Forum: C++ Development
Topic: Menu and toolbar synchronization
Replies: 3
Views: 350

Re: Menu and toolbar synchronization

just write a functions

Code: Select all

void updateToolbarFromMenu(); //reads state of menu items and sets state of toolbar items
void updateMenuFromToolbar(); //vice versa
and call them everywhere you need.
or something like this.
by alys666
Tue Oct 22, 2019 5:02 pm
Forum: C++ Development
Topic: wxwidget structure understanding
Replies: 20
Views: 875

Re: wxwidget structure understanding

typedef struct Structexample { std::array<long long, 5> longlongarray; sqlite3 *db; std::vector<std::array<long long, 5> > vectorofarray; int sleep; } structexample; here you defined 2 types - Structexample and equal to it - structexample. write just struct TypeName{...}; and TypeName will be a nam...
by alys666
Tue Oct 22, 2019 2:56 pm
Forum: C++ Development
Topic: Focus problem
Replies: 15
Views: 926

Re: Focus problem

people asked you about constructor body, not its declaration
by alys666
Sun Oct 20, 2019 7:28 pm
Forum: C++ Development
Topic: Static Text strings in wxwidgets
Replies: 7
Views: 496

Re: Static Text strings in wxwidgets

may be put static texts in vertical sizers?
at least they won't overlap so.