Will,
> > QUESTION: I do a Dim f as Folderitem outside
> > the loop and then continually re-use the same
> > f inside the loop. Is that the recommended
> > way to do it?
>
> Sure. I don't know how else you would do it.
Ah, but you're only looking at what works <grin>. I have a gift,
however, at exploring different approaches that don't work.
Example: Since I knew how to create a file using a Save dialog box, I
tried to start the process using the Save Dialog box - by using
f=GetSaveFolderItem("",FileName) - and then modifying the Properties of
the FolderItem (e.g., AbsolutePath, Name, etc.) before actually creating
the file. (As you know, it didn't work.)
So, in a sense, I was trying to re-use f as FolderItem in that approach,
but I learned that it wasn't viable. I think I also tried putting the
Dim f as FolderItem within the loop, but that didn't work either. It's
amazing how inventive you can be when you don't know what you're doing!
When I went from QuickBASIC, BASIC PDS, etc. to VB-DOS and (earlier
forms of) Visual Basic, that was a major paradigm shift for me to
absorb, learning to think in terms of the user and not the programmer
controlling the progress of the program. Now, moving on to classes and
Object-Oriented Programming is another major paradigm shift for me.
Yes, OOP was also present in VB 6, but I was able to ignore it and
program just as I had done in VB 3. With RB, however, there's no
escaping it: I'm forced to learn good principles of programming whether
I want to or not <grin>.
I appreciate your patience with an old codger, er, "senior citizen" like
me, as - like an old dog? - I try to learn some new tricks. One
difference between me and the dog is that the dog didn't have the help
available to him that I have here. So I _am_ learning new tricks (even
if - from time to time - I still manage to come up with amazingly
ignorant questions).
Barry Traver
P.S. As a "thank you," I have begun to upload some things to RB Garage.
There's also source code (which runs on a Mac as well as a Windows PC)
for a NimRow game at http://traver.org/realbasic. The source code
should be fine, but I'm not sure if I archived the executables in the
most optimal way (but you don't need them anyway). Feedback would be
appreciated.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|