dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] Platform Independent Directory Separators


From: WC Jones
Subject: Re: [Pnet-developers] Platform Independent Directory Separators
Date: Wed, 29 Oct 2003 18:07:06 -0500 (EST)

>I've checked the pnet code and it does convert '\' to '/' internally, even 
>though the exception reports the pre-converted version.
>
>The question then becomes, does the following file exist on your system:
>
>    /usr/local/Forsaken/Project/images/die4.png
>
>It seems an odd location to find the image given that the example itself was 
>in a completely different directory.

Yes, of course. 

Let me change one of the examples that came with Portable Dot Net and see ...

XHello.cs is a good candidate.


Make generated
./XHello.cs:30: warning: unknown escape sequence `\d'

\\ is required as \ translated to imagesdotgnu-logo.bmp
instead of images\dotgnu-logo.bmp

Image image = new Image("images\\dotgnu-logo.bmp");

The actual output:
./XHello.cs:30: warning: unknown escape sequence `\d'
Leaving target `all' for project `samples'
Ending project `samples'
bash-2.05$ ilrun XHello.exe
Uncaught exception: System.IO.FileNotFoundException: Could not find file 
"imagesdotgnu-logo.bmp"
Filename: imagesdotgnu-logo.bmp
        at System.IO.FileStream..ctor(String, FileMode, FileAccess, FileShare, 
Int32, Boolean) in ./System/IO/FileStream.cs
        at System.IO.FileStream..ctor(String, FileMode, FileAccess)
        at DotGNU.Images.Image.Load(String) in ./Image.cs
        at Xsharp.Image..ctor(Screen, String) in ./Image.cs
        at Xsharp.Image..ctor(String)
        at XHello.Main(String[]) in ./XHello.cs



It worked with \\ - so I will research and test further...

_Sx____________________
  ('>    iudicium ferat
  //\   Have Computer -
  v_/_    Will Hack...

       \|/ ____ \|/
       "@'/ .. \`@"
       /_| \__/ |_\
          \__U_/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]