12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

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.

322 Day 9<br />

Creat<strong>in</strong>g a new form from the Object Repository is treated differently based on whether a<br />

project is open at the time. If a project is open, the new form is added to the application as<br />

a form/unit pair. If no project is open, a new form and unit are created as a standalone form.<br />

Use this option when creat<strong>in</strong>g a new base form to add to the Object Repository.<br />

If you choose to create a new unit or text file, the new file is simply created <strong>in</strong> the Code Editor<br />

(and, <strong>in</strong> the case of a new unit, added to the current project). You might create a new text<br />

file for several reasons. For example, let’s say you wanted to implement a configuration file<br />

(an .INI file) <strong>in</strong> your application. You could create a new text file <strong>in</strong> the Object Repository<br />

<strong>in</strong> order to <strong>in</strong>itially create the configuration file. You create a new unit any time you want to<br />

start a new source file for your application that is not associated with a form.<br />

Choos<strong>in</strong>g a new DLL or console application results <strong>in</strong> a new project be<strong>in</strong>g created with the<br />

project set up for a DLL or console application target. Creat<strong>in</strong>g a new Automation, Component,<br />

or Thread object will result <strong>in</strong> a dialog box be<strong>in</strong>g presented that asks for more <strong>in</strong>formation<br />

about the object you are creat<strong>in</strong>g.<br />

The Object Repository Views<br />

The actual Object Repository w<strong>in</strong>dow is a W<strong>in</strong>32 list view control similar to the right side<br />

of W<strong>in</strong>dows Explorer (where the files are listed). As such, it has several views that you can<br />

choose from: Large Icons, Small Icons, List, and Details. By default, the view is set to Large<br />

Icons. To change the Object Repository view, right-click on the Object Repository and<br />

choose the view you want from the Object Repository speed menu. Figure 9.2 shows the<br />

Object Repository with the Dialogs page selected and the view set to Details.<br />

Figure 9.2.<br />

The Object Repository<br />

<strong>in</strong> Details view.<br />

The Object Repository speed menu also shows several sort<strong>in</strong>g options. You can sort by object<br />

name, description, date, or author.

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

Saved successfully!

Ooh no, something went wrong!