[gtkada] Generating event - storage error

Jeremy Berthet jeremy.berthet at eivd.ch
Tue May 24 19:08:30 CEST 2005


Le mardi 24 mai 2005 à 15:08 +0200, Preben Randhol a écrit :
> Jeremy Berthet <jeremy.berthet at eivd.ch> wrote on 24/05/2005 (12:34) :
> > Hello everyone,
> > 
> > I'm actually working on a project at school to give simplified interface
> > package for drawing line, rectangle, etc ... with ADA. The main idea is
> > to write the package over the gtkada APIS.
> > 
> > I have tried to generate an event from the executable code instead of
> > waiting for the user to send it by a button or anything else.
> > 
> > This is my code: 
> > 
> >    -- Part of variables declaration
> >    Mon_Dessin : Gtk_Drawing_Area;
> >    Mon_Event  : Gdk_Event_Configure;
> 
> ...
> 
> > Anyway, I've got a "STORAGE_ERROR: stack overflow" with this, although
> > I've called Free(Mon_Event);.
> > 
> > Can someone explain the problem ?
> 
> I don't know if I can help, but the Mon_Dessin is it made anywhere by
> calling Gtk_New ? Could you supply more of the source code?
> 
> Preben

There is a call to Gtk_New for "Mon_Dessin".

I will attach the .adb file with this mail. (Sorry if variables names
are not really explicit for you, I'm coding in french)

This sample program is based on the "scribble" program for the
structure.

The thing I want to do is to draw a line on my drawing area after the
Gtk_Window and Gtk_Drawing_Area has been configured and showed.

I want to do that by an event sent by the ADA code (and not by a click
elsewhere by example). That's why I'm trying to generate a configure
event after everything is done.

Maybe the way I want to achieve my goal is far away from a better method
to do that, I'm a really newbie in GTK (I have got a certain experience
of ADA anyway).

Thank you for any help. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: essai_drawing_area.adb
Type: text/x-adasrc
Size: 3408 bytes
Desc: not available
Url : /pipermail/gtkada/attachments/20050524/a2873fec/attachment.bin 


More information about the gtkada mailing list