2011/12/14 Ludo Brands <[email protected]>
> **
>
>
>
> Hello,
>
> I've created a short
> example<https://github.com/ik5/libnotify-fpc/blob/master/tests/test_notify.lpr>to
> display how to use libnotify in Pascal.
> The problem is that I'm getting the following exception:
>
> (process:7633): GLib-CRITICAL **: g_variant_new_string: assertion
> `g_utf8_validate (string, -1, NULL)' failed
> (process:7633): GLib-CRITICAL **: g_variant_new_string: assertion
> `g_utf8_validate (string, -1, NULL)' failed
> (process:7633): GLib-CRITICAL **: g_variant_new_string: assertion
> `g_utf8_validate (string, -1, NULL)' failed
>
> The text as you can see, is pure "ASCII", so what am I missing or doing
> wrong here ?
>
> Ido
>
>
> Forgot to call gtk_init?
>
That's create now gibrish as text :(
The original code that I tested was in C:
#include <libnotify/notify.h>
void main () {
notify_init ("Hello world!");
NotifyNotification * Hello = notify_notification_new ("Hello world",
"This is an example notification.", "dialog-information");
notify_notification_show (Hello, NULL);
notify_uninit ();
}
And after compiling it as follows:
gcc -o notify `pkg-config --cflags --libs libnotify` notify.c
It properly display the text, however the Pascal code does not, even with
gtk_init(@argc, @argv) :(
>
> Ludo
>
>
Ido
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus