[Lazarus] Gtk3 "hello world" application crash
Krzysztof
dibo20 at wp.pl
Thu Oct 3 12:44:54 CEST 2013
Totally forgot about SetExceptionMask! Remember that I needed to use it in
fpGUI application too. I forgot about this because Gtk2 example is working
fine. Thanks zeljko, now it is working! Great :D
2013/10/3 zeljko <zeljko at holobit.net>
> On 10/03/2013 11:50 AM, Krzysztof wrote:
>
>> Ok I give up. Could not find simple Gtk3 example in lazarus
>> implementation. So I found another gtk hello world in C based on Gtk3
>> from:
>> https://developer.gnome.org/**gnome-devel-demos/3.6/**
>> checkbutton.c.html.en<https://developer.gnome.org/gnome-devel-demos/3.6/checkbutton.c.html.en>
>> . But same error with division by zero:
>>
>> var
>> window: PGtkWidget;
>> app: PGtkApplication;
>> status: Integer;
>>
>> procedure activate; cdecl;
>> begin
>> window := gtk_application_window_new(**app);
>> gtk_window_set_title(**PGtkWindow(window), 'CheckButton Example');
>> gtk_window_set_default_size (PGtkWindow(window), 300, 100);
>>
>> gtk_widget_show_all(window);
>> end;
>>
>> begin
>> g_type_init();
>> app := gtk_application_new ('org.example.checkbutton',
>> G_APPLICATION_FLAGS_NONE);
>> g_signal_connect_data(app, 'activate', @activate, nil, nil, 0);
>> status := g_application_run (PGApplication(app), argc, argv);
>> g_object_unref (app);
>> end.
>>
>
> Have you tried to add (eg. to initialization) ?
> SetExceptionMask([**exDenormalized,exInvalidOp,**exOverflow,exPrecision,**
> exUnderflow,exZeroDivide]);
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131003/7e54193b/attachment-0003.html>
More information about the Lazarus
mailing list