Office of Digital Humanities
Back     BYU LiveCode Lessons Gateway

DigHT 310
External Files Exercise:
Text Editor

In this exercise you will create a simple text editor using the commands introduced to you in class.

(If you wish, you may use the TextEditorTemplate.rev stackfile in the Templates folder on the DigHT 310 class file server as a basis for this exercise.)

The text editor we will build in class has the following basic functionality:

  1. A button that allows the user to choose a file to open.
  2. A field in which the text of the opened file is displayed.
  3. The user should be able to change the text that is in the field.
  4. There should be a button that allows the user to save the changed text back to the original file.

Before the next class period you should add at least two enhancements to your text editor. They could include any of the following or any of your own choosing. (Just be sure to point out to me what they are.)

  1. Save the style of the text (e.g., bold, italic, colors) along with the text itself.
  2. Provide a way to create a new, blank document. Make sure that your application asks the user for a name before saving it the first time.
  3. Make the stack and field resizable.
  4. Check for changes to the text and require saving before you open another file.

There is a stack that demonstrates a possible solution in the Keys folder. It is called TextEditorKey.rev. There is also an enhanced key there.

When you are finished, drop your stack, with your name on it, into the Homework Drop folder in the DigHT 310 folder. Due next class period.

Back     BYU LiveCode Lessons Gateway
Maintained by Devin Asay.
Copyright © 2005 Brigham Young University