At 12:57 PM +0100 8/20/06, Richard Hillsdon wrote:
I think I'll just go for the Select Case type option as I need to finish the job, even though I was trying to avoid it, but it does seem as though the option I really need just doesn't exist.
For directly porting a current VB app, I agree a big select case statement in a factory method is the way to go.
Shame, I think it's something that should be considered for a future release.
Doing things like that makes it harder for the compiler to detect errors at compile time. If one of your strings has a window name spelled incorrectly, you won't know it until you actually run the specific piece of code that shows that window. If you were to rename a window, VB's string based approach doesn't help you identify which strings are used to reference that window.
RB's strong type checking and compile time binding of identifiers can detect and instantly show you these errors while they're still in the IDE and not let them go undetected in deployed software.
Errors that only show up at runtime are much harder to find and require extensive testing even for simple changes.
RB's strong type checking is a huge benefit and to me not being able to hold identifiers in strings seems well worth the trade off for the much improved error checking.
Regards, Joe Huber _______________________________________________ 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>
