[Gtk-sharp-list] Gdk.Pixbuf

Parrish M Myers parrishmyers@yahoo.com
Tue, 20 May 2003 16:06:57 -0700 (PDT)


Ahh! I found out the difference.  If I have the image in the current
directory when compiling... all is good, and I get it to work (thank
you for your patient help).  On the other hand, if I have the image in
another directory while compiling, it doesn't work and I get the error
I showed you earlier, i.e.

Works:
   files
      ./Test.cs
      ./image.png
   compile with
      mcs -resource:image.png Test.cs -r gtk-sharp -r gdk-sharp

Does not Work:
   files
      ./Test.cs
      ./images/image.png
   compile with
      mcs -resource:images/image.png Test.cs -r gtk-sharp -r gdk-sharp

Is this how the resource option is suppose to work?

Again, thank you for your help.

--- McP <mariano.cano@hispalinux.es> wrote:
> El mar, 20 de 05 de 2003 a las 23:48, Parrish M Myers escribió:
> > I'm sorry to bother you again... but I just tried it and it still
> > doesn't work for me:
> > 
> > Unhandled Exception: System.NullReferenceException: A null value
> was
> > found where an object instance was required
> > in <0x00090> 00 Gdk.Pixbuf:LoadFromStream (System.IO.Stream)
> > in <0x000aa> 00 Gdk.Pixbuf:.ctor
> (System.Reflection.Assembly,string)
> > in <0x000ca> 00 .Test:.ctor ()
> > in <0x00027> 00 .Test:Main (string[])
> > 
> > The only way I can get it to work is to take the null out of the
> > parameters and include the image in the current directory.
> > 
> > BTW... I am running this on a redhat 9 system with mono 0.24 and
> > gtk-sharp 0.9.
> > 
> 
> I get your exception if I don't use -resource:image.png as an mcs
> option
> and use the null value in Pixbuf constructor.
> 
> With your system configuration should run.
> -- 
> McP <mariano.cano@hispalinux.es>
> 


=====
-----------------------------------------------------------
Academia is a little like child   | Parrish M. Myers
rearing, it provides a chance at  | The Wacked Jester
immortality without the stretch   | parrishmyers@yahoo.com
marks  -- (unknown source)        |
-----------------------------------------------------------

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com