Can't use imported image file 
Author Message
 Can't use imported image file
I have imported a PICT file (called "MyPic") into a Realbasic 2.02
project I am working on.

I can't seem to get Neuberg's code snippet to work (p. 269).  I have
tried this on the backdrop for any of my dialogs, windows and canvases
without success -- I get a "type mismatch" error for the whole line:

    me.backdrop = MyPic

In fact the image appears just fine in the backdrop popdown of the
properties window for all of the above dialogs, windows and canvases,
and it can be used without problem there but it does not work in code.

Help anyone?

Bruce.



Thu, 09 May 2002 03:00:00 GMT  
 Can't use imported image file

Quote:
>I have imported a PICT file (called "MyPic") into a Realbasic 2.02
>project I am working on.

>I can't seem to get Neuberg's code snippet to work (p. 269).  I have
>tried this on the backdrop for any of my dialogs, windows and canvases
>without success -- I get a "type mismatch" error for the whole line:

>    me.backdrop = MyPic

>In fact the image appears just fine in the backdrop popdown of the
>properties window for all of the above dialogs, windows and canvases,
>and it can be used without problem there but it does not work in code.

You could define it more Specific using:
Canvas1.backdrop=MyPict

Or you could also try,

dim p as picture

p=MyPict
Canvas1.Backdrop=p

I hope this helps.
I've been hearing so much about "Matt's Book"  lately. How much does it cost?
What does it come with? Is it very good? Does it go into detail about things
like Spritesurfaces, adding Drag and Drop, and other advanced things like Text
Searching?

Just wondering.

Formerly
M a c ulation SW



Fri, 10 May 2002 03:00:00 GMT  
 Can't use imported image file
Still no go -- tried both of these:

   MyCanvas.backdrop = BlackPic  (still get a type mismatch)

and this as well:

   Dim p As Picture
   p = BlackPic    (still get a type mismatch)

This is a picture (in PICT format); it appears in the backdrop popdowns
throughout my project.

Bruce.

----------

Quote:

>>I have imported a PICT file (called "MyPic") into a Realbasic 2.02
>>project I am working on.

>>I can't seem to get Neuberg's code snippet to work (p. 269).  I have
>>tried this on the backdrop for any of my dialogs, windows and canvases
>>without success -- I get a "type mismatch" error for the whole line:

>>    me.backdrop = MyPic

>>In fact the image appears just fine in the backdrop popdown of the
>>properties window for all of the above dialogs, windows and canvases,
>>and it can be used without problem there but it does not work in code.

> You could define it more Specific using:
> Canvas1.backdrop=MyPict

> Or you could also try,

> dim p as picture

> p=MyPict
> Canvas1.Backdrop=p

> I hope this helps.
> I've been hearing so much about "Matt's Book"  lately. How much does it cost?
> What does it come with? Is it very good? Does it go into detail about things
> like Spritesurfaces, adding Drag and Drop, and other advanced things like Text
> Searching?

> Just wondering.

> Formerly
> M a c ulation SW



Fri, 10 May 2002 03:00:00 GMT  
 Can't use imported image file
Fixed my own problem -- a bug in RealBasic.

I renamed my "BlackPic" image to "MyPic", and adjusted my code.
It worked.

Changed it back, and adjusted the code again.
It worked.

Go figure!

Bruce.

----------

Quote:

> Still no go -- tried both of these:

>    MyCanvas.backdrop = BlackPic  (still get a type mismatch)

> and this as well:

>    Dim p As Picture
>    p = BlackPic    (still get a type mismatch)

> This is a picture (in PICT format); it appears in the backdrop popdowns
> throughout my project.

> Bruce.

> ----------


>>>I have imported a PICT file (called "MyPic") into a Realbasic 2.02
>>>project I am working on.

>>>I can't seem to get Neuberg's code snippet to work (p. 269).  I have
>>>tried this on the backdrop for any of my dialogs, windows and canvases
>>>without success -- I get a "type mismatch" error for the whole line:

>>>    me.backdrop = MyPic

>>>In fact the image appears just fine in the backdrop popdown of the
>>>properties window for all of the above dialogs, windows and canvases,
>>>and it can be used without problem there but it does not work in code.

>> You could define it more Specific using:
>> Canvas1.backdrop=MyPict

>> Or you could also try,

>> dim p as picture

>> p=MyPict
>> Canvas1.Backdrop=p

>> I hope this helps.
>> I've been hearing so much about "Matt's Book"  lately. How much does it cost?
>> What does it come with? Is it very good? Does it go into detail about things
>> like Spritesurfaces, adding Drag and Drop, and other advanced things like
> Text
>> Searching?

>> Just wondering.

>> Formerly
>> M a c ulation SW



Sat, 11 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. import Image vs from PIL import Image vs import PIL.Image

2. Using CGI module with 'canned queries'

3. tracing a program using __import__('__main__')?

4. Can't import pygame.image

5. ODBC import - 'Cannot load file driver.'

6. It's not bad canned meat...

7. It's not bad canned meat...

8. It's not bad canned meat...

9. It's not bad canned meat...

10. Using import in an exec'ed string

11. Python process doesn't get terminated using Ctrl-C if site.py is being imported

12. C5EE..import file into dct using btrieve ddf...GPF

 

 
Powered by phpBB® Forum Software