Hi Robert (and everyone else) --

Thanks for taking the time to give me such a long and welcoming message. 
Like you, I'm depending on lists as my only contact with other 
programmers--first for Python, then VB .NET, and now finally for Delphi 
(...the best of the three languages for my purposes, much as I liked Python 
:-)

I thought you provided a nice rationale for the advantages of separating the 
GUI from the business class(es) (or custom made components) of an app. I was 
sold before--and now I'm even more sold!

I'm curious about some of the specifics people use to exchange information 
between the separate classes/components. At the level where I am now, I tend 
to think about getting info from the GUI object to the business object by 
just directly accessing one or more of the business class's variables or 
properties. Similarly, I think about info going the other way by just 
writing functions in the business class which return info ready to be used 
by a GUI element. For both data input and output in the business class I 
tend to make these variables have class level scope, so they can easily be 
manipulated by any procedures/functions I write.

Still, it doesn't always go smoothly--that's why I'm curious about what 
other people do. What if, for example, I need a business class function to 
return multiple kinds of data? (...I guess I'm not totally up on all the 
possible data types that a function can return).

Here's another example: I've got some code that I almost automatically copy 
and paste into everything I do so that the application will create an .ini 
file to store window position and size. I often make other entries in the 
code before I'm finished--if I'm writing a game, for example, I might want 
to store a high scores table, or another application might include a most 
recently used file list. Even if I concentrate only on the code common to 
all my apps, I haven't fully figured out how to put the code into a separate 
class/component that I could reuse, because the procedure stores (or sets) 
settings for the main form, e.g., Form1. To put this kind of code in a 
separate class, wouldn't you need to pass in Form1--or a reference to every 
Form1 property that's being saved in the .ini file? ... Seems like it's more 
efficient to just copy and paste the code from one app to the next.

What do you think?

Thanks again for your response; I think I'm going to like this group :-) --  
Al 
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to