PDF quandary - A cry for clarity.

Post your Gambas programming questions here.
Doctor Watson
Posts: 84
Joined: Wednesday 22nd August 2018 7:55am

Re: PDF quandary - A cry for clarity.

Post by Doctor Watson » 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.
:?:
Old african saying:
You eat an elephant one small bite at a time.

User avatar
grayghost4
Posts: 109
Joined: Wednesday 05th December 2018 5:00am
Location: Marengo, illinois usa

Re: PDF quandary - A cry for clarity.

Post by grayghost4 » Tuesday 18th May 2021 3:48am

Dr.

You need to add a gridview to FMain.form

then it will work just fine

Doctor Watson
Posts: 84
Joined: Wednesday 22nd August 2018 7:55am

Re: PDF quandary - A cry for clarity.

Post by Doctor Watson » Tuesday 18th May 2021 4:16am

Did you try that yourself Grayghost4?
Of course I did put GridView1 on the form.
And a Button1 by the way.
Old african saying:
You eat an elephant one small bite at a time.

User avatar
grayghost4
Posts: 109
Joined: Wednesday 05th December 2018 5:00am
Location: Marengo, illinois usa

Re: PDF quandary - A cry for clarity.

Post by grayghost4 » Tuesday 18th May 2021 11:45am

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 ?
Attachments
Screenshot from 2021-05-18 06-49-14.png
Screenshot from 2021-05-18 06-49-14.png (190.6 KiB) Viewed 446 times

Doctor Watson
Posts: 84
Joined: Wednesday 22nd August 2018 7:55am

Re: PDF quandary - A cry for clarity.

Post by Doctor Watson » Tuesday 18th May 2021 12:33pm

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.
Old african saying:
You eat an elephant one small bite at a time.

vuott
Posts: 91
Joined: Wednesday 05th April 2017 6:07pm
Location: European Union

Re: PDF quandary - A cry for clarity.

Post by vuott » Tuesday 18th May 2021 12:35pm

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 ".

Doctor Watson
Posts: 84
Joined: Wednesday 22nd August 2018 7:55am

Re: PDF quandary - A cry for clarity.

Post by Doctor Watson » Tuesday 18th May 2021 3:02pm

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
Old african saying:
You eat an elephant one small bite at a time.

User avatar
PJBlack
Posts: 141
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: PDF quandary - A cry for clarity.

Post by PJBlack » Tuesday 18th May 2021 11:00pm

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

vuott
Posts: 91
Joined: Wednesday 05th April 2017 6:07pm
Location: European Union

Re: PDF quandary - A cry for clarity.

Post by vuott » Wednesday 19th May 2021 1:31am

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".

Doctor Watson
Posts: 84
Joined: Wednesday 22nd August 2018 7:55am

Re: PDF quandary - A cry for clarity.

Post by Doctor Watson » Wednesday 19th May 2021 2:56am

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.
Old african saying:
You eat an elephant one small bite at a time.

Post Reply