Article Preview
Buy Now
| Print: | |
| PDF: |
Beginner's Corner
File Things, Part One
Working with "folderitems"
Issue: 3.6 (July/August 2005)
Author: Marc Zeedar
editor-at-rbdeveloper.com
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 7,907
Starting Page Number: 32
RBD Number: 3614
Resource File(s):
3614.sit Updated: Monday, July 25, 2005 at 11:27 AM
Related Web Link(s):
http://www.strout.net/files/rb/StringsModule.rb.zip
Known Limitations: None
Excerpt of article text...
It's a rare computer program that doesn't work with files -- even the simplest projects needs to save preferences or data, or at least open a document -- but beginners are often confused by REALbasic's approach to working with files.
When I first started using REALbasic, I found folderitems bewildering. I was able to stumble through and work with them, but the process seemed complex. It took me a while to figure out why folderitems were so intimidating.
The main reason for the seeming complexity is not RB's object-oriented design -- having a file class makes complete sense -- but that RB requires two classes in order to actually open or save a file.
The concept of the folderitem class is easy to grasp: it's a simple file class that represents a file on disk and gives you the tools to create or delete a file or folder, or set various properties of that file (such as visibility).
What's confusing is that folderitems don't give you a way to actually work with the contents of a file: to read and write data. Instead, folderitems allow you to create a new kind of object -- a data stream -- that lets you manipulate the actual contents of the file.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







