29.11.2014 Views

Smalltalk and Object Orientation: an Introduction - Free

Smalltalk and Object Orientation: an Introduction - Free

Smalltalk and Object Orientation: an Introduction - Free

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 15.4: Creating a project<br />

To enter the project select the enter button on the window. To exit a project select the Exit project<br />

option from the VisualLauncher from within the project. Exiting the project in this way will bring you<br />

back up a level <strong><strong>an</strong>d</strong> your desktop will be restored to the state it was in when you entered the project.<br />

You c<strong>an</strong> delete a project by closing the project window. For example, if I wished to destroy the project<br />

in Figure 15.4, then I would close that window using the Windows-95 close icon.<br />

Root<br />

User Interface<br />

Data<br />

M<strong>an</strong>agement<br />

Operations<br />

Database<br />

interface<br />

Sensor<br />

interface<br />

Figure 15.5: Project hierarchy<br />

Projects c<strong>an</strong> be nested hierarchically to <strong>an</strong>y depth (although it is rarely useful to go beyond 2 or 3<br />

levels). This me<strong>an</strong>s that the project structure illustrated in Figure 15.5 c<strong>an</strong> easily be constructed. In this<br />

structure, at the top level the developer sees the User Interface project, the Data M<strong>an</strong>agement project<br />

<strong><strong>an</strong>d</strong> the Operations project. When the user enters the Data M<strong>an</strong>agement project, then they see the<br />

Database Interface project <strong><strong>an</strong>d</strong> the Sensor Interface project.<br />

This me<strong>an</strong>s that, when they are working on the user interface project, they do not see the windows<br />

they have been us ing in <strong>an</strong>y of the other projects. They c<strong>an</strong> thus leave one of the other projects in a<br />

particular state <strong><strong>an</strong>d</strong> come back to it later.<br />

15.5.3 Ch<strong>an</strong>ges <strong><strong>an</strong>d</strong> projects<br />

In addition to the ch<strong>an</strong>ges file created for the whole imag e, a project has its own ch<strong>an</strong>ges set. This<br />

ch<strong>an</strong>ges set is a summary of the ch<strong>an</strong>ges which have been made to that project. This me<strong>an</strong>s that, unlike<br />

the ch<strong>an</strong>ges file, it does not include all ch<strong>an</strong>ges to the system. Instead it lists those classes which have<br />

been modified within the current project.<br />

The ch<strong>an</strong>ges set of a project c<strong>an</strong> be accessed using the Inspect Ch<strong>an</strong>geSet option from the ch<strong>an</strong>ges<br />

menu on the VisualLauncher. If you wish to save the ch<strong>an</strong>ges made to a project, you c<strong>an</strong> do it using the<br />

file out as .. option from the right mouse button menu (middle on a three button mouse) available from<br />

the left h<strong><strong>an</strong>d</strong> window of this inspector. This c<strong>an</strong> be a useful way of exch<strong>an</strong>ging ch<strong>an</strong>ges with other<br />

developers.<br />

15.5.4 Warnings about projects<br />

There are two points you should note about projects. The first it that they are only a visual aid to project<br />

org<strong>an</strong>ization. That is, all the source code ch<strong>an</strong>ges you make are global to the current image. M<strong>an</strong>y<br />

developers when they first encounter projects assume that ch<strong>an</strong>ges in one project will be limited to that<br />

project. They aren’t <strong><strong>an</strong>d</strong> this c<strong>an</strong> be rather counter intuitive. Care should therefore be taken when<br />

modifying classes in one project which may be used in <strong>an</strong>other project. Secondly, as all ch<strong>an</strong>ges are<br />

actually made to the whole image, it i s a mistake to assume that when a project is deleted, its affects<br />

will also be deleted.<br />

127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!