Re: Issue with the "Hello World" minimum wxWidgets example in Ubuntu 23.10

Vadim Zeitlin <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On Tue, 9 Jan 2024 05:38:24 -0800 (PST) Raphy wrote:

R> I copied the minimal "Hello World" example in the samples wxWidgets folder:
R> 
R> raphy@raohy:~$ cp -a wxWidgets/samples/minimal/ /home/raphy/minimal
R> 
R> Compiled it and built the executable, but executing the file does not show 
R> the Menu Toolbar and the Menu Items:

 Sorry for a stupid question, but are you sure it doesn't show the menu in
the global menu bar at the top of the screen instead?

R> To make the Menu Toolbar with its Menu Items appear and to able to use 
R> them, I have to open a second Terminal and execute the same executable 
R> within this second terminal:

 If exactly the same executable behaves differently in 2 terminals, you
don't need to be an expert to realize that the difference must be due to
the environment they're running in. You can run "env > 1" command in one
terminal and "env > 2" in another one and then compare the files "1" and
"2" using your favourite diff tool to find the difference.

R> but now, I'm pretty that it's an issue related to the minimum "Hello World" 
R> example:
R> 
R> I compiled and built the toolbook example found here: 
R> https://github.com/gammasoft71/Examples_wxWidgets/tree/master/src/BookControls/Toolbook
R> copied the executable in the same folder where I previously copied the 
R> "Hello World" example minimum app, and when I click the Toolbook example 
R> executable it displays correctly, with all its Menu Items, while when I 
R> click on the minimum executable, it doesn't show its Menu Toolbar and Menu 
R> Items. 

 Wait, this example doesn't even _have_ the menu in the first place (search
for wxMenu in its code), how could you possible see it shown. You must be
confusing the toolbar, which this example uses, with the menu.

R> As said, the only way to o fully display and be able to use Menu Toolbar 
R> and Menu Items of the minimum executable ("Hello World" example) I have to 
R> execute it via command-line in a second terminal. And that's not fine

 The sample obviously doesn't care about which terminal you run it from.
But it is affected by the environment variables, so you should be able to
find the explanation for the difference in the behaviour by comparing them
between the 2 terminals.

 Good luck,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
              https://www.tt-solutions.com/
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCZZ1WlwAKCRAG6kHeT2we
hrZwAJ98ooUeQkGQLRvAvlk/fPa2wTA7RQCgoW5Y72C8XWadhCF44aAbVIVqHw0=
=n1hV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.