[gtkada] Generating event - storage error
Jeremy Berthet
jeremy.berthet at eivd.ch
Tue May 24 14:27:11 CEST 2005
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;
-- Code to generate a sample "configure" event
Set_Window(Mon_Event, Get_Window(Mon_Dessin));
Set_X(Mon_Event, 0.0);
Set_Y(Mon_Event, 0.0);
Set_Width(Mon_Event, 100);
Set_Height(Mon_Event, 100);
Allocate(Mon_Event, Configure, Get_Window(Mon_Dessin));
Put(Mon_Event);
Free(Mon_Event);
Anyway, I've got a "STORAGE_ERROR: stack overflow" with this, although
I've called Free(Mon_Event);.
Can someone explain the problem ?
Is that the wrong way to generate event ?
Comments in the package Gdk.Event speak about an "Emit_By_Name"
procedure in Gtk.Signal, but this package doesn't exist !
Thank you for any help.
More information about the gtkada
mailing list