GTK# Crash on Gdk.Pixbuf

View: New views
3 Messages — Rating Filter:   Alert me  

GTK# Crash on Gdk.Pixbuf

by Aniello Di Nardo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is the line on GTK# crash

this.image2.Pixbuf = new Gdk.Pixbuf(System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./dialog-warning.png"));

suggest?

Re: GTK# Crash on Gdk.Pixbuf

by Ricardo Medina :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try printing in Console this value, is not what you want:
        System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,
"./dialog-warning.png")

Dot and slash before "dialog-warning.png" is valid for linux only
(remove it), this is the reason to use Path.Combine (avoid those two
characters)..

Good luck..


On Mon, 2009-06-01 at 10:30 -0700, Aniello Di Nardo wrote:
> System.IO.Path.Combine

_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Re: GTK# Crash on Gdk.Pixbuf

by Aniello Di Nardo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ops…
I’m sorry… before posting i’ll must to try!!!... file not found!!!

I’ve put the png file in the Debug and Release directory and now work fine!!!

Thanks

A.D.

Ricardo Medina wrote:
Try printing in Console this value, is not what you want:
        System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,
"./dialog-warning.png")

Dot and slash before "dialog-warning.png" is valid for linux only
(remove it), this is the reason to use Path.Combine (avoid those two
characters)..

Good luck..


On Mon, 2009-06-01 at 10:30 -0700, Aniello Di Nardo wrote:
> System.IO.Path.Combine

_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list