comp.lang.ada
 help / color / mirror / Atom feed
* How to add a GTKAda?
@ 2013-06-17  2:51 Marcus F
  2013-06-17  4:11 ` Jeffrey Carter
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus F @ 2013-06-17  2:51 UTC (permalink / raw)


I'm using AdaGIDE, and I wanted to take a look at GUI programming, I found GTKAda and have installed it, but I have no idea how to add it to my program in AdaGIDE.

It's supposedly in my PATH, but simply adding use gtkada tells me it can't find it, do I need to specify the path in the USE?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-17  2:51 How to add a GTKAda? Marcus F
@ 2013-06-17  4:11 ` Jeffrey Carter
  2013-06-17  4:50   ` Marcus F
  0 siblings, 1 reply; 10+ messages in thread
From: Jeffrey Carter @ 2013-06-17  4:11 UTC (permalink / raw)


On 06/16/2013 07:51 PM, Marcus F wrote:
 >
 > It's supposedly in my PATH, but simply adding use gtkada tells me it can't
 > find it, do I need to specify the path in the USE?

If you're saying "use Gtkada;" without having said "with Gtkada;", then you 
don't know Ada well enough yet to be taking this step. Learn how to use packages 
in Ada 1st and then you'll be ready to play with GTKAda.

If you are using packages correctly, then you need to tell GNAT where to find 
the GTKAda packages and related files. Typically this is done with a "-I" 
command-line switch (see the GNAT documentation for more on this), but how you 
do this through AdaGIDE I don't know.

-- 
Jeff Carter
"In the frozen land of Nador they were forced to
eat Robin's minstrels, and there was much rejoicing."
Monty Python & the Holy Grail
70

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-17  4:11 ` Jeffrey Carter
@ 2013-06-17  4:50   ` Marcus F
  2013-06-17  5:01     ` J-P. Rosen
  2013-06-17  7:26     ` Dmitry A. Kazakov
  0 siblings, 2 replies; 10+ messages in thread
From: Marcus F @ 2013-06-17  4:50 UTC (permalink / raw)


On Sunday, June 16, 2013 11:11:29 PM UTC-5, Jeffrey Carter wrote:
> On 06/16/2013 07:51 PM, Marcus F wrote:
> 
>  >
> 
>  > It's supposedly in my PATH, but simply adding use gtkada tells me it can't
> 
>  > find it, do I need to specify the path in the USE?
> 
> 
> 
> If you're saying "use Gtkada;" without having said "with Gtkada;", then you 
> 
> don't know Ada well enough yet to be taking this step. Learn how to use packages 
> 
> in Ada 1st and then you'll be ready to play with GTKAda.
> 
> 
> 
> If you are using packages correctly, then you need to tell GNAT where to find 
> 
> the GTKAda packages and related files. Typically this is done with a "-I" 
> 
> command-line switch (see the GNAT documentation for more on this), but how you 
> 
> do this through AdaGIDE I don't know.
> 
> 
> 
> -- 
> 
> Jeff Carter
> 
> "In the frozen land of Nador they were forced to
> 
> eat Robin's minstrels, and there was much rejoicing."
> 
> Monty Python & the Holy Grail
> 
> 70

I used with.
I'm certainly new to Ada (A few days in), but I'm not new to programming, I usually learn best by examples and by altering code, which is why I wanted to play with GTK, I've done minimal GUI programming before in PortablE.

Thank you Jeff, I think that's the info I need to get on the right track.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-17  4:50   ` Marcus F
@ 2013-06-17  5:01     ` J-P. Rosen
  2013-06-17  7:26     ` Dmitry A. Kazakov
  1 sibling, 0 replies; 10+ messages in thread
From: J-P. Rosen @ 2013-06-17  5:01 UTC (permalink / raw)


Le 17/06/2013 06:50, Marcus F a écrit :
> I'm certainly new to Ada (A few days in), but I'm not new to
> programming, I usually learn best by examples and by altering code,
> which is why I wanted to play with GTK, I've done minimal GUI
> programming before in PortablE.
> 
FWIW:

I learned GTK by making a small app with Glade (the interface generator)
and looking at the generated code. Worked well for me.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-17  4:50   ` Marcus F
  2013-06-17  5:01     ` J-P. Rosen
@ 2013-06-17  7:26     ` Dmitry A. Kazakov
  2013-06-17  7:34       ` Marcus F
  1 sibling, 1 reply; 10+ messages in thread
From: Dmitry A. Kazakov @ 2013-06-17  7:26 UTC (permalink / raw)


On Sun, 16 Jun 2013 21:50:14 -0700 (PDT), Marcus F wrote:

> I'm certainly new to Ada (A few days in), but I'm not new to programming,
> I usually learn best by examples and by altering code, which is why I
> wanted to play with GTK, I've done minimal GUI programming before in
> PortablE.

1. Rosetta Code has plenty GtkAda examples:

   http://rosettacode.org/wiki/Rosetta_Code

Note that these are GTK 2.x (GtkAda 2.24.x). Don't expect them working with
GTK 3.x (GtkAda 3.4.x). None will. But it is relatively straightforward to
fix them.

I presume, the biggest issue for a beginner would be generic packages
defining signal handlers. They cannot be instantiated deeper than on the
library level. Examples tend to be single source file, which will require
unchecked conversions for a locally defined handler to the library level
callback procedure. (For a real-life project it is not an issue because it
will put this stuff into library level packages.)

2. Refer to GTK documentation and tutorials:

https://developer.gnome.org/gtk3/stable/

GtkAda is thin bindings, so C examples are relatively simple to translate
into Ada. Except for signal handlers which are made Ada way (e.g. type
safe).

3. You should probably switch to GPS. AdaGIDE is nice but not suitable for
large projects. It is much comfortable for GtkAda and other large projects
deploying GNAT project files (*.gpr).

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-17  7:26     ` Dmitry A. Kazakov
@ 2013-06-17  7:34       ` Marcus F
  2013-06-18 10:45         ` Stephen Leake
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus F @ 2013-06-17  7:34 UTC (permalink / raw)


On Monday, June 17, 2013 2:26:59 AM UTC-5, Dmitry A. Kazakov wrote:
> On Sun, 16 Jun 2013 21:50:14 -0700 (PDT), Marcus F wrote:
> 
> 
> 
> > I'm certainly new to Ada (A few days in), but I'm not new to programming,
> 
> > I usually learn best by examples and by altering code, which is why I
> 
> > wanted to play with GTK, I've done minimal GUI programming before in
> 
> > PortablE.
> 
> 
> 
> 1. Rosetta Code has plenty GtkAda examples:
> 
> 
> 
>    http://rosettacode.org/wiki/Rosetta_Code
> 
> 
> 
> Note that these are GTK 2.x (GtkAda 2.24.x). Don't expect them working with
> 
> GTK 3.x (GtkAda 3.4.x). None will. But it is relatively straightforward to
> 
> fix them.
> 
> 
> 
> I presume, the biggest issue for a beginner would be generic packages
> 
> defining signal handlers. They cannot be instantiated deeper than on the
> 
> library level. Examples tend to be single source file, which will require
> 
> unchecked conversions for a locally defined handler to the library level
> 
> callback procedure. (For a real-life project it is not an issue because it
> 
> will put this stuff into library level packages.)
> 
> 
> 
> 2. Refer to GTK documentation and tutorials:
> 
> 
> 
> https://developer.gnome.org/gtk3/stable/
> 
> 
> 
> GtkAda is thin bindings, so C examples are relatively simple to translate
> 
> into Ada. Except for signal handlers which are made Ada way (e.g. type
> 
> safe).
> 
> 
> 
> 3. You should probably switch to GPS. AdaGIDE is nice but not suitable for
> 
> large projects. It is much comfortable for GtkAda and other large projects
> 
> deploying GNAT project files (*.gpr).
> 
> 
> 
> -- 
> 
> Regards,
> 
> Dmitry A. Kazakov
> 
> http://www.dmitry-kazakov.de

Thank you Dmitry, I did already install GPS, but.. I don't understand it.
I tried new project, typing in code, but I can't compile/build/run, I get a number of errors.

I'll try re-installing tomorrow, maybe I did something wrong when installing.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-17  7:34       ` Marcus F
@ 2013-06-18 10:45         ` Stephen Leake
  2013-06-18 17:17           ` Marcus F
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Leake @ 2013-06-18 10:45 UTC (permalink / raw)


Marcus F <trenatos@gmail.com> writes:

> On Monday, June 17, 2013 2:26:59 AM UTC-5, Dmitry A. Kazakov wrote:
>> On Sun, 16 Jun 2013 21:50:14 -0700 (PDT), Marcus F wrote:
>> 
>> 
>> 
>> > I'm certainly new to Ada (A few days in), but I'm not new to programming,
>> 
>> > I usually learn best by examples and by altering code, which is why I
>>

Please don't quote large portions of the previous messages, when they
are not relevant to the reply. It just makes it hard to find your reply;
we assume you have put replies in the middle some where.

And please try to fix your news reader to not insert extra blank lines.

> Thank you Dmitry, I did already install GPS, but.. I don't understand it.
> I tried new project, typing in code, but I can't compile/build/run, I
> get a number of errors.

If you say what the errors are, somebody here can probably help.

> I'll try re-installing tomorrow, maybe I did something wrong when installing.

good luck.

-- 
-- Stephe


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-18 10:45         ` Stephen Leake
@ 2013-06-18 17:17           ` Marcus F
  2013-06-18 22:44             ` Adam Beneschan
  2013-06-19  7:05             ` Simon Wright
  0 siblings, 2 replies; 10+ messages in thread
From: Marcus F @ 2013-06-18 17:17 UTC (permalink / raw)


Stephen, I don't use a news-reader, I'm using the Google Groups website, I have no control over it adding blank lines.

Sure, I'll strip the comments, I don't know what news-reader you're using but I've never had any problems seeing where new parts are and where quoted text is, maybe you should update your news-reader/get a better one?

I'll make a new post about my GPS problems, it's easiest that way.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-18 17:17           ` Marcus F
@ 2013-06-18 22:44             ` Adam Beneschan
  2013-06-19  7:05             ` Simon Wright
  1 sibling, 0 replies; 10+ messages in thread
From: Adam Beneschan @ 2013-06-18 22:44 UTC (permalink / raw)


On Tuesday, June 18, 2013 10:17:50 AM UTC-7, Marcus F wrote:
> Stephen, I don't use a news-reader, I'm using the Google Groups website, I have no control over it adding blank lines.

I try to remove the extra blank lines myself.  It's a huge pain in the keister, but I do it because I'm somewhat obsessive-compulsive.  I don't blame anyone else for not going to the trouble.

Google has made a number of improvements to Google Groups over the years, and it seems like every time they improve it they make it worse.

                            -- Adam


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to add a GTKAda?
  2013-06-18 17:17           ` Marcus F
  2013-06-18 22:44             ` Adam Beneschan
@ 2013-06-19  7:05             ` Simon Wright
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Wright @ 2013-06-19  7:05 UTC (permalink / raw)


Marcus F <trenatos@gmail.com> writes:

> Stephen, I don't use a news-reader, I'm using the Google Groups
> website, I have no control over it adding blank lines.

I think that makes Google Groups a newsreader.

> Sure, I'll strip the comments, I don't know what news-reader you're
> using but I've never had any problems seeing where new parts are and
> where quoted text is, maybe you should update your news-reader/get a
> better one?

Marcus, Google Groups is what it is; I guess it's not much of a profit
centre for Google, so bugs (particularly the adding-blank-lines one)
aren't going to figure high on their hit list.  I do completely
understand why people use it - I did myself for a long time from work,
where adding non-approved software was a big no-no - and it's good that
they do, keeps the group alive.

Stephe, Article > Hide > Citation (W W c) cleans up pretty well!

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-19  7:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-17  2:51 How to add a GTKAda? Marcus F
2013-06-17  4:11 ` Jeffrey Carter
2013-06-17  4:50   ` Marcus F
2013-06-17  5:01     ` J-P. Rosen
2013-06-17  7:26     ` Dmitry A. Kazakov
2013-06-17  7:34       ` Marcus F
2013-06-18 10:45         ` Stephen Leake
2013-06-18 17:17           ` Marcus F
2013-06-18 22:44             ` Adam Beneschan
2013-06-19  7:05             ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox