Search found 41 matches

by shawnhcorey
Tue Sep 19, 2023 6:01 pm
Forum: C++ Development
Topic: Can I specify the number of threads running for WxThread?
Replies: 2
Views: 1205

Re: Can I specify the number of threads running for WxThread?

Usually, all the I/O is done in the main (aka root) thread to avoid these problems. Threads are used only for processing. They return their results to the main thread for output.
by shawnhcorey
Sun May 28, 2023 1:11 pm
Forum: C++ Development
Topic: How to check if a file is used by another process
Replies: 4
Views: 311

Re: How to check if a file is used by another process

Under Linux, if a file is open, then it's contents are not removed until it is closed. Only its directory entry is removed. Its i-node and content remain until closed by all processes that have it open.

I'm not sure if Windows does this too.
by shawnhcorey
Sun May 28, 2023 1:07 pm
Forum: C++ Development
Topic: How to catch global key presses and left mouse clicks from other applications?
Replies: 6
Views: 688

Re: How to catch global key presses and left mouse clicks from other applications?

In general, this is not possible. The reason is that processes are isolated from each other. This prevents one from accidentally interfering with others. it is also a security measure. it would not be a good idea for one process to access your databases thru another one. The only way to do this woul...
by shawnhcorey
Thu May 18, 2023 1:24 pm
Forum: Open Discussion
Topic: Chat AI
Replies: 5
Views: 2835

Re: Chat AI

Despite the hype, it's not intelligent. It is machine learning. It is given a whole lot of data and it finds patterns in it. But it cannot reason about those patterns. For example if there are two patterns that are similar, it will not notice this and certainly cannot investigate any link between th...
by shawnhcorey
Tue Oct 11, 2022 11:01 pm
Forum: C++ Development
Topic: Basic order of things
Replies: 7
Views: 519

Re: Basic order of things

Usually you don't need a wxPanel. There are various Sizers to layout the other controls of a window.
by shawnhcorey
Sun Oct 09, 2022 5:53 pm
Forum: C++ Development
Topic: wxSplitterWindow - Four Panels
Replies: 3
Views: 576

Re: wxSplitterWindow - Four Panels

doublemax wrote: Wed Oct 05, 2022 11:51 pm You should also look into the "sashtest" sample that comes with wxWidgets.

I recommend not using a sash window. They don't work they way you would expect. Getting use to how they work will take a lot of experimentation.

99.997% of the time, a splitter window is what you want anyway.
by shawnhcorey
Sat Sep 24, 2022 11:59 am
Forum: C++ Development
Topic: Test with wxChoice and wxComboBox
Replies: 10
Views: 2100

Re: Test with wxChoice and wxComboBox

I find the ASSERT() works fine.
by shawnhcorey
Thu Jan 17, 2019 2:40 pm
Forum: C++ Development
Topic: Sharing objects between notebook tabs.
Replies: 15
Views: 3514

Re: Sharing objects between notebook tabs.

Wouldn't DocView work here?
by shawnhcorey
Thu Jan 17, 2019 2:38 pm
Forum: C++ Development
Topic: wxTextFile Confusion
Replies: 4
Views: 1469

Re: wxTextFile Confusion

Some things you might check for:

Does the user have write permissions on the directory?

Is the file being written to the root directory?

Does the name contain characters, like spaces, that the OS does not allow?

Some OSes require an extension on every file. Does the name have an extension?
by shawnhcorey
Wed Jan 02, 2019 2:33 pm
Forum: C++ Development
Topic: WxGrid questions
Replies: 9
Views: 1645

Re: WxGrid questions

wxGrid might not be the best choice for what you're doing. How many cells are there at maximum? If there are not too many, you could work with individual controls (e.g. a wxPanel) as cells. Otherwise something custom might be better. Wouldn't you have to use `wxGridSizer` or `wxFlexGridSizer` for l...
by shawnhcorey
Mon Aug 06, 2018 11:51 am
Forum: Platform Related Issues
Topic: Where can I find the config file for my application?
Replies: 3
Views: 1378

Re: Where can I find the config file for my application?

On *nix, it should be stored in the directory

Code: Select all

~/.config/<my_app_name>/
by shawnhcorey
Fri Jun 29, 2018 11:32 am
Forum: Compiler / Linking / IDE Related
Topic: How to create a configure script?
Replies: 7
Views: 1636

Re: How to create a configure script?

Hello, I have created a wxWidgets projct using C::B, I now need a configure or any easy build system script for it to make it possible to build without the need of the C::B IDE. What is the best and easy way to do it? Thank you. The best way is to use make but it's not easy. (That's why IDEs were i...
by shawnhcorey
Tue Apr 03, 2018 12:26 pm
Forum: Open Discussion
Topic: Deprecating Raw Pointers in C++20
Replies: 2
Views: 12220

Re: Deprecating Raw Pointers in C++20

Be wary of anything you read on April 1st. :)
by shawnhcorey
Thu Mar 08, 2018 4:59 pm
Forum: C++ Development
Topic: wxString performance
Replies: 25
Views: 5951

Re: wxString performance

marcelinux wrote:
The C++ programming language
Chapter 6.
Expressions and Statements

Premature optimization
is the root of all evil.
– D. Knuth

On the other hand,
we cannot ignore efficiency.
– Jon Bentley
How is efficiency defined? Smallest memory? Least execution time? Least maintenance time?
by shawnhcorey
Tue Mar 06, 2018 4:49 pm
Forum: C++ Development
Topic: wxString performance
Replies: 25
Views: 5951

Re: wxString performance

You should never optimize a program without first profiling it. Without knowing where it is slow, you can spend too much time optimizing the wrong parts. And you should never optimize a program until users complain it's too slow. Instead, write the program to be easily understood. A professional pr...