At 11:19 -0600 8/12/06, [EMAIL PROTECTED] wrote:


 > How do other people handle dealing with lots of graphic files?

I load them dynamically.  I also make a little module that's
responsible for managing them.  It scans the pictures folder the first
time it's called, and loads a dictionary in memory mapping file names
(converted to lower case) to FolderItems.  This makes it
case-insensitive on all platforms, and also greatly reduces the amount
of time it takes to locate a file.  I also keep another dictionary
mapping file names (again in lowercase) to Picture objects.  This isn't
loaded at startup, but instead is a cache; the first time any
particular picture is asked for, it's read from disk, and then stored
in the cache dictionary so it can be returned very quickly next time.

Interesting.

So you just ask your dictionary for a picture object named the same as the file name. Do you ever unload the cached pictures from memory? Do you store all your pictures in the OS in one big folder?

Too bad it negates one of my favorite RB features: auto type ahead so that you know while coding that you're entering the correct picture name.




 This feature request would help the manageability as well:
 Canvas Backdrop IDE Chooser Should Allow Typing Image Name
 http://www.realsoftware.com/feedback/viewreport.php?reportid=sipdmlcb

True.... though I never use Canvas.Backdrop, so it's not a pain I've
felt myself.  Backdrop always seems like a temporary crutch to me; I
almost always end up needing to do something in the Paint event, so I
may as well draw the background image there too.


True. But it's helpful to see the canvases with their backdrops in the IDE even if it's just a placeholder.


_______________________________________________
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>

Reply via email to