On Feb 18, 2006, at 8:22 AM, FreeFL wrote:
I have a series of pictures, dropped in the project window so they
are known to the app.
I have a dictionary containing pairs of strings, the seconds being
the _names_ of the aforesaid pictures.
I want to assign these pictures to canvases, according to
dictionary searches. I know how to retrieve correctly the _names_
of the desired pictures, but how do I tell the app that I want it
to load the _pictures_ ? In another way, I would like to be able to
write something like :
thiscanvas.backdrop = Picture(thisname)
Maybe defining the dictionary a different way, maybe through some
coercing method, I am lost in the wilderness...
Unfortunately, there is no way to use a string as a variable. So
what you will need to do is to use some other method:
Function GetMyPicture(name As String) As Picture
Select Case name
Case "cat"
Return CatPicture
Case "dog"
Return DogPicture
Case "elephant"
Return ElephantPicture
Else
Return Nil // requested picture doesn't exist
End Select
End Function
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>