Episode 3: Now I Remember
May 26th, 2007

Summary

Today’s episode covers a whole lot of new features and programming ideas. A few viewers sent in e-mails wondering how to save window position and size even after you quit the program, today, I’ll answer that for you. We will go into saving a preferences file, creating a text file, writing to it, and loading the data from it. Our functions will be contained within an easy to swallow Module that can be used in any project. We also learn how to parse data according to industry standards (sort of) and use the parsed data within the application. I also review functions and add a new technique when using them, passing and returning variables using the function.
A new GUI control is introduced, GroupBox, and we deal with EditFields, Dynamic StaticText, & PushButtons. Some of the programming concepts include, Functions, TextInputStream, TextOutputStream, InStr, Mid, Modules, FolderItem, and more

Show Notes
  • Explain the project we are going to be creating
  • Explain what a preference file is and why it’s useful
  • Add GUI elements to Window
  • GroupBox
  • EditField
  • StaticText
  • PushButton
  • Create Dynamically Updating StaticText to show our current Window properties
  • Create a new Module to contain our Preferences functions
  • Create our main load, save, and parse functions
  • Talk about passing and returning variables in a function
  • Explain how to create a TextOutputStream and export the data to file
  • Explain how to create a TextInputStream and how to read data from a file
  • Parsing the data we just read in.
  • Show our data being read and set to the window properties
  • Complete by saving and loading preferences with the application events

Downloads

Download the rb project file (8 kB)
here

Watch the tutorial on blip.tv
here

Tip: You can download the episode and watch it fullscreen AFTER it has completly loaded by right-clicking on the movie