In this example we describe a music player as if we were operating it. We will see two kinds of tables in use, action and row. The action tables list things actions to be performed, step-by-step, one row at a time. Some actions will involve searching for music. We will check to be sure we've found the right music using a second kind of table, a row table. In the row table we will simply list each song, one per row, with columns showing different attributes of each song. We'll use these fixtures.

We'll write the remainder of this page as if it were describing stories for the music library/player. We'll use italics when we want to point out features of the framework. You might as well run the example now before you continue reading.

This is our most realistic example short of the SampleApplications. See the MusicExampleObjectModel to understand all of the objects in play here.


Browsing Music

The music browser starts up looking at the whole library of songs. We specify the library (an advanced feature) so that we know what we are talking about in this document.

fit.ActionFixture
start eg.music.Browser  
enter library Music.txt
check total songs 37

This is a the file that library reads. It is tab separated text. Try downloading it and looking at it with a spreadsheet. http:Release/Source/eg/music/Music.txt

We can pick songs and see details of our selection as we go.

fit.ActionFixture
enter select 1
check title Akila
check artist Toure Kunda
enter select 2
check title American Tango
check artist Weather Report
check album Mysterious Traveller
check year 1974
check time 3.70
check track 2 of 7

Yielding the display:

eg.music.Display
title: Property does not exist! eg_music_Display->titleartist: Property does not exist! eg_music_Display->artistalbum: Property does not exist! eg_music_Display->albumyear: Property does not exist! eg_music_Display->yeartime(): Method does not exist! eg_music_Display->timetrack(): Method does not exist! eg_music_Display->track
Handy Man James Taylor JT 1977 3.30 7 of 12
Sailing To Philadelphia James Taylor October Rose 2001 5.47 3 of 3
Ananas James Taylor Hourglass 1997 5.73 5 of 13
Another Grey Morning James Taylor JT 1977 2.73 4 of 12
Copperline James Taylor New Moon Shine 1991 4.37 1 of 12


This is our most complete standard example. You can run it against more than one fit implementation by choosing any one of these specialized RunScript.

(Caution: these scripts can't login. Run them from the public wiki pages.)