Page 2 of 3

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 3:18am
by Doctor Watson
Vuott : Just tried to run your code. Unfortunately something goes wrong.
It starts with an error: “Unknown identifier: DesktopWindow”
Both gb.cairo and gb.desktop.x11 have been activated.
:?:

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 3:48am
by grayghost4
Dr.

You need to add a gridview to FMain.form

then it will work just fine

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 4:16am
by Doctor Watson
Did you try that yourself Grayghost4?
Of course I did put GridView1 on the form.
And a Button1 by the way.

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 11:45am
by grayghost4
Doctor Watson wrote: Tuesday 18th May 2021 4:16am Did you try that yourself Grayghost4?
Yes I copied and paisted the program from the thread and when I ran it ... it error out

added a gridview1 to the FMain.form

Did you start with a graphic program from NEW ?

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 12:33pm
by Doctor Watson
Hi Grayghost4.
Yes I started with a new project but that wouldn’t be necessary. A new form would be sufficient. I think you don’t see what’s going on.
When Vuott sends this programme, he quite rightly supposes that you or any other visitor will spot that it contains code to handle a GridView1 and a Button1. And that you will know that you have to put them on the form that will be used first.
I see by the way that you don’t have added the Button1.
But even if you did everything right, it still gives the error I signalled to Vuott.
At least it does so on my machine with my software configuration.
Let’s wait and see what Vuott has to say about the error message.

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 12:35pm
by vuott
Doctor Watson wrote: Tuesday 18th May 2021 3:18am Vuott : Just tried to run your code. Unfortunately something goes wrong.
It starts with an error: “Unknown identifier: DesktopWindow”
Both gb.cairo and gb.desktop.x11 have been activated.
Well, you have to activate also " gb.desktop ".

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 3:02pm
by Doctor Watson
Well, I couldn’t have known that, could I ?
But ‘Bingo’ It works !
Let’s see now if I can get it to do what I exactly want.
Trial& Error time
Thanks Vuott

Re: PDF quandary - A cry for clarity.

Posted: Tuesday 18th May 2021 11:00pm
by PJBlack
vuott wrote: Monday 17th May 2021 2:08pmYou have to activate "gb.desktop.x11" and "gb.cairo" Components.
Doctor Watson wrote: Tuesday 18th May 2021 3:02pmWell, I couldn’t have known that, could I ?
Hmmmm ...

Re: PDF quandary - A cry for clarity.

Posted: Wednesday 19th May 2021 1:31am
by vuott
PJBlack wrote: Tuesday 18th May 2021 11:00pm Hmmmm ...
Well, for me my code works even without activating the "gb.desktop" Component, but maybe he has an older version of Gambas than mine.
My version of Gambas is: b01f603 (master)
I remember that previously it was necessary to activate both "gbdesktop" and "gb.desktop.x11".

Re: PDF quandary - A cry for clarity.

Posted: Wednesday 19th May 2021 2:56am
by Doctor Watson
Gentlemen, this is starting to deviate away from the real reason for this topic.
PJBlack, you seem to be sceptical? Well, Vuott did not write “ You have to activate "gb.desktop.x11" and "gb.cairo" Components.” He wrote about activating gb.desktop.x11 first and activating gb.desktop afterwards. And that fully justifies my remark. May I kindly ask to keep to what was really written.
But Vuott’s answer points out an ‘error’ we easily make when we share code we have written. We assume that it will run on every other machine or with every other Gambas version or configuration.
Vuott, I don’t know about ‘b01f603 (master)’. My version is 3.14.3. So I just checked the Gambas site and I see that there’s a new version 3.16.0. Is that the one you mean?
Perhaps I should upgrade to that one first and check if problems like the original one of this topic – executing Paint.Font - still persist. If not, I could write some report about it.