Author Topic: updating WxSmith tutorials  (Read 7707 times)

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
updating WxSmith tutorials
« on: December 26, 2022, 11:15:50 pm »
It seems that the last update was some time ago. Not sure if much changed since then, but if anyone is looking at it, the index page list of tutorials does not correspond to the actual tutorial titles, for example.

Offline rts2003

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: updating WxSmith tutorials
« Reply #1 on: December 27, 2022, 05:42:02 am »
It'd be nice if someone could do video tutorials and post them on Youtube.

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: updating WxSmith tutorials
« Reply #2 on: December 27, 2022, 12:19:47 pm »
Personally, I find video tutorials do not suit me for this sort of thing. OK for more 'physical activities', but not so good on this 2d sort of stuff. For that, the best for me is information that can be written on paper, can easily mark up the important bits, add my own comments, etc. It was when I printed out the tutorials that  I noticed the problem with the index, since the links work  OK on the screen.

Offline rts2003

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: updating WxSmith tutorials
« Reply #3 on: December 28, 2022, 06:47:47 am »
Did you happen to get the Hello World tutorial right?  My code fails just like here and here.  Basically, I follow the instruction and place the wxStaticText inside the second wxBoxSizer.  The code does compile and has a run-time error as described in that StackOverflow post.  Any insight is greatly appreciated.

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: updating WxSmith tutorials
« Reply #4 on: December 28, 2022, 04:23:47 pm »
I sort of got it working, but not in the way it should. I've penciled in what seems to be different on my printout of the tutorial. I'm on windows 10, running the static build of WxWidgets, and realise there will be differences to Linux, say, but there are many 'errors', stuff which is past its sell by date. I can list the problems, that I found, if any help. (some of them may have been  answered later on, but not at the time of first reading.) It gets disconcerting, when having followed the info, a number of times, trying to interpret what might actually be meant, and it just does not work. The problem with the web in general, that nothing is clearly dated, and maybe somewhere is a more current tutorial. This tutorial seems to have been updated about 7 years ago, so some of the detail is now wrong.

I don't know about the stack overflow post, maybe you can link to it, but I do not get a run time error, it just doesn't look as I think it should (there is no image in the tutorial to show what it should look like.)

The main problem, other than referring to icons that have moved as others have been added over the years, is that when adding the sizers, the frame just goes to a small black dot, making it impossible to distinguish the panel from the frame. it ends up with the button and text being on the dark grey original frame, generally with a horizontal line, or sometimes some other artifact, but at least it shows the text, and the button works.

I've tried a few later tutorials, and having got used to the idiosyncrasies, they seem to work a bit better.

Link to the stack overflow post, it may give me a clue, but that is going to be purely by chance, but sometimes...

Offline rts2003

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: updating WxSmith tutorials
« Reply #5 on: December 29, 2022, 06:24:13 am »
Many thanks, bdad.  I figured out where the error came from.  The details are in that StackOverflow post.  By the way, do you know the reason why not using wxDefaultSize causes it to fail?
« Last Edit: December 29, 2022, 06:51:48 am by rts2003 »

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: updating WxSmith tutorials
« Reply #6 on: December 29, 2022, 12:16:29 pm »
I didn't realise that I was much help, other than commiserating with you over the difficulties in getting it to work as we expected. Fwiw, I've spent a fiver on the 'Gwx Story' book mentioned in the tutorial. It should arrive today. I expect that will be a bit out of date, too, but will most likely give a few more clues in getting this all to stick together.

As I've not seen the stack overflow post to which you refer, I've no idea about the wxDefaultSize problem, but I'm glad you've found the error.

The other tutorials seem a bit better, I guess it is because by then we know what to expect and are more used to the  idiosyncrasies of the system.


Offline rts2003

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: updating WxSmith tutorials
« Reply #7 on: December 30, 2022, 04:29:28 am »
Pardon, here it is.  Thanks for the mentioning the book.
« Last Edit: December 30, 2022, 04:32:19 am by rts2003 »

Offline bdad

  • Multiple posting newcomer
  • *
  • Posts: 29
Re: updating WxSmith tutorials
« Reply #8 on: December 30, 2022, 12:46:47 pm »
That link explains the problem I was getting with the 'silly little square', and I was overcoming by ignoring it for the time being. It is pretty quick, if populating a  panel, to use the 'insert after current ' button, or cut and paste in the resource window, then sort out what goes where within the grid, by dragging the items around, although that can be a bit problematic, but cut and paste works well. I think that should have been used in the tutorials.

The book appears to be OK, it is dated June 2020, so out-dates the tutorials, although he admits to updating the tutorials. He uses Ubuntu, but that makes little difference. I think it will be a useful reference source.