2 different results fro the same code!

Jean-Luc Arnaud <jean-luc-E/[email protected]>
Newsgroups gmane.comp.lang.realbasic.user
Organization Centre Direct du Multimédia
Message-ID <[email protected]>
Hi all,

I'm used to test some codes in little test apps before using these codes 
in main apps.

Today, I'm facing a very strange issue.

I'm opening a ".ico" file using:

   If SourceFile.NameExtensionMBS="ico" Then
     p=Picture.Open(SourceFile)

     ...

In my little test app, after the second line, p (defined as a global 
property of type "Picture) has a depth property of 0, Graphics Nil, 
ImageCount 4 And

     p=p.BestRepresentation(MyCanvas.Width,MyCanvas.Height,1)

returns the expected result, that is, the icon matching the closest 
properties of MyCanvas.

Now, the same code with the same p property, in my main project, returns 
a p object with a depth property to 32, Graphics not nil, ImageCount to 0

and a p.BestRepresentation returning always a 16x16 icon, of course with 
the same SourceFile.

The p property is not instantiated, a break point on the second line in 
both projects shows a nil p property.

I don't understand what's happening, so any idea, help, suggestion, 
exorcism is welcome.

TIA

-- 
Jean-Luc Arnaud




To unsubscribe, email [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.