Search found 34 matches

by shawnhcorey
Thu Jan 17, 2019 2:40 pm
Forum: C++ Development
Topic: Sharing objects between notebook tabs.
Replies: 15
Views: 608

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: 264

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: 358

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: 272

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: 402

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: 1040

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: 1419

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: 1419

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...
by shawnhcorey
Tue Mar 06, 2018 1:07 pm
Forum: C++ Development
Topic: wxString performance
Replies: 25
Views: 1419

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 pro...
by shawnhcorey
Wed Feb 28, 2018 5:32 pm
Forum: C++ Development
Topic: wxSashLayoutWindow 5 sashes
Replies: 4
Views: 426

Re: wxSashLayoutWindow 5 sashes

I don't care which class to use as long I get the desired layout in the picture Both will look the same but behave differently. A wxSplitterWindow will divide a parent window into two subwindows with a control between them. When one grows, the other shrinks. wxSashWindow place controls on any or al...
by shawnhcorey
Wed Feb 28, 2018 4:05 pm
Forum: C++ Development
Topic: wxSashLayoutWindow 5 sashes
Replies: 4
Views: 426

Re: wxSashLayoutWindow 5 sashes

Do you want to use wxSashWindow or wxSplitterWindow? The are completely different from each other. Most of the time, people would want wxSplitterWindow.
by shawnhcorey
Wed Feb 07, 2018 1:06 pm
Forum: General Development
Topic: Recommendation for c++ gui builder?
Replies: 10
Views: 2434

Re: Recommendation for c++ gui builder?

Hi, I use{d} wxGlade, but now I'm more or less can write simple layout by hand. Thank you. P.S.: I don't want to be kicked out for starting a flame war... P.S.: I don't want to be kicked out for starting a flame war... Too late :mrgreen: PS: I often go by hand too (as you said: when the layout is r...
by shawnhcorey
Sat Dec 16, 2017 1:52 pm
Forum: C++ Development
Topic: Best practice: Linking GUI to function code.
Replies: 6
Views: 793

Re: Best practice: Linking GUI to function code.

The Document/View Framework was created to separate documents from views, although some might think it is overkill for a single list.
by shawnhcorey
Wed Dec 07, 2016 3:13 pm
Forum: C++ Development
Topic: dynamic #include?!
Replies: 7
Views: 684

Re: dynamic #include?!

ONEEYEMAN wrote:C++ does not support conditional inclusion f the headers.
No but it has conditional compiling which works with `#includes. See https://gcc.gnu.org/onlinedocs/cpp/Ifdef.html
by shawnhcorey
Mon Oct 31, 2016 11:10 am
Forum: Platform Related Issues
Topic: how to set system clock
Replies: 3
Views: 611

Re: how to set system clock

Your progam has to have root privileges to set the date & time. You may have to use the system function stime.