jonlauf
10-27-2006, 02:48 PM
I'm trying to use bitmaps created in functions stored in a global struct for icons in a rollout, but I'm having trouble. The only way I can get it to work is if I define each bitmap as a global variable, which I'd like to avoid. Could someone explain to me why the following code does not work:
First piece of code defines a global struct with a function for creating a bitmap. It is evaluated first.
global mapTest
struct mapTest
(
fn newBitmap =
(
pic = bitmap 14 14 color:red
)
)
Second code attempts to run the function and display the bitmap, but returns "No display function for undefined"
mapTest.newBitmap()
display pic
Thanks
First piece of code defines a global struct with a function for creating a bitmap. It is evaluated first.
global mapTest
struct mapTest
(
fn newBitmap =
(
pic = bitmap 14 14 color:red
)
)
Second code attempts to run the function and display the bitmap, but returns "No display function for undefined"
mapTest.newBitmap()
display pic
Thanks
