Appendix A
Answers to Quiz Questions
CONTENTS
- You can create and modify JavaScript forms through the Form
Designer.
- The IntraBuilder Explorer lets you view, run, and design the
files that comprise a JavaScript application.
- IntraBuilder Professional supports Microsoft SQL Server and
InterBase.
- IntraBuilder Client/Server supports Oracle, Sybase, Microsoft
SQL Server, InterBase, Informix, and DB2. The retail version contains
SQL-Link drivers for all supported servers. The trial version
supports but does not contain SQL-Link drivers. You can use the
trial version with 32-bit SQL-Link drivers from C++ Builder or
Delphi.
- IntraBuilder can connect to Microsoft Access tables through
ODBC.
- Shift+f2 opens the currently selected file in design mode.
f2 runs the file.
- All versions of IntraBuilder come with the Knowledge Base,
Security Administration, Contact Manager, Phone List, and Guest
Book applications. IntraBuilder Professional and IntraBuilder
Client/Server also include Web utilities and an InterBase version
of the Knowledge Base.
- The default location of the Solution Application home page
is
C:\Program Files\Borland\IntraBuilder\Apps\Index.htm
- The Knowledge Base Search is not case sensitive.
- The default Web server port is 80.
- A document alias lets a Web server work with files outside
the root document folder.
- The Sample forms each demonstrate a single JavaScript concept,
while the Solution Applications provide turn key systems that
combine many JavaScript techniques.
- The options property determines what values appear
in a select list.
- The form background property lets you set a background
image for a form.
- When you move past the last row in a table, the cursor is
at end of set.
- The Database component lets you work with tables through SQL-Link
drivers.
- The dataLink property links a Text control to a field.
- Custom components can contain property values, linked events,
and custom methods.
- You can create a custom form class in any of the following
ways: selecting File|Save as Custom when designing a standard
form, programming the custom form class with JavaScript, or using
the Custom Form Class Designer.
- You can select multiple controls by dragging a rectangle around
them in the Designer. You can also select one control, hold down
the Shift key, and click on additional controls.
- Before saving a multiple page form, set the current form page
to page one.
- Page zero is the "global page." It shows all controls
on all pages. Also, anything you place on it shows up on all other
pages.
- Anything that you can add or set on a standard form can be
inherited from a custom form class.
- The easiest way to add a custom component to the Component
Palette is through the Set Up Custom Components dialog.
- Controls on page zero are visible on all form pages of the
form.
- You can set the current form page through the form's pageno
property.
- Custom form classes provide an easy way to establish a common
look and feel to your application.
- All components are visible when viewing page zero.
- The Report Expert creates detail and summary reports.
- You can choose between tabular or columnar layouts.
- Place page heading controls within the page template but outside
of the stream frame.
- Moving a field value within a detail band may not move the
field heading if the field was not added through the Field Palette.
- Server-side JavaScript executes entirely on your Web server.
Applications that are completely server-based require only that
users have browsers supporting HTML 2.0.
Client-side JavaScript requires Web browsers that support JavaScript.
For maximum accessibility, your applications should be primarily
server-based.
You should supplement server-side JavaScript with client-side
JavaScript as necessary.
The trade-off is this: Even though exclusively using server-side
JavaScript makes your applications more accessible, they will
be less functional than apps that include client-side code. The
answer is to not pick one approach over the other. Rather, you
should build as much of your app as possible in server-side JavaScript,
and then supplement it as necessary with client-side code.
- The _sys object contains methods that execute when
you work with the IntraBuilder Explorer.
- The Script Pad lets you quickly try out JavaScript statements
and expressions.
- The Script Editor lets you edit the JavaScript that defines
a form or report. You can also use any other text editor for the
same purpose.
- You can use the Method Editor to create and modify methods
from within a designer.
- dBASE table security enables the creation of user- and group-level
encryption.
- The Query object provides access to tables, while
the Database object provides access to SQL connections.
- When you run a table, IntraBuilder displays a data entry form
with Text controls for each field.
- You can assign a password to a Paradox table through the Database
Administration dialog.
- You can load an existing SQL script or build the SQL statement
visually using the Query Builder.
- On secure pages, the address starts with https instead
of http.
- The m and p in mcp stand for Macmillan
and Publishing.
- Indexes greatly enhance the speed of quick searches when you
are looking for complete values rather than substring matches.
- The HTML editor is available only with the Gold version.
- Navigator Gold supports GIF and JPEG images.
- Enter JAVASCRIPT: as a location to open Netscape
Navigator's Script Pad.
- The start tag for a list item is <LI>. The
end tag is </LI>.
- By opening the Form in the script editor and using search
and replace to replace all references to the Query object.
There is no way to modify a query reference name through the Form
Designer.
- After dropping a table onto the Form Designer, remove the
full path from the new Query object's sql property.
- The filter property is part of the Rowset
class.
- An object is an instance of a class. The class is only a definition
of something.
- The scope resolution operator is ::, as in class::Form_onServerLoad.
- The most user-friendly filterOptions setting is 3
- Match partial length and ignore case.
- The most performance-unfriendly filterOptions setting
is 3 - Match partial length and ignore case.
- Database::executeSQL() is the only method that can
create a primary key on a Paradox table. You can define a primary
key by passing a CREATE TABLE command that includes the
PRIMARY KEY option to the Database::executeSQL()
method.
- Query by form calls the Rowset::applyLocate() method
that searches for a value without restricting the current rowset.
Filter by form adds a filter to the rowset and allows navigation
to only those rows that match the filter expression.
- An IntraBuilder application can include JavaScript expressions,
SQL expressions, and dBASE expressions. SQL expressions are allowed
in Database::executeSQL(), Rowset::applyLocate(),
and the filter property of the Rowset class.
dBASE expressions are allowed in the expression property
of the DbfIndex class.
- From fastest to slowest: dBASE, Paradox, Access. Faster speeds
are achievable through data sources such as Oracle and Microsoft
SQL Server when using SQL-Links with IntraBuilder Client/Server.
Refer to Day 21 for more information on creating fast applications
for SQL databases.
- Prefix any single quote that occurs within a lookup value
with a triple backslash when using the Rowset::applyLocate()
method or the filter property.
- The onImageServerClick receives the top and left
position of a mouse click on the image. You can use these parameters
to determine what region of the image was clicked.
- If the dataSource of an image is empty, the IntraBuilder
Server substitutes a black-and-white image that says "IntraBuilder."
- A binary field is empty if its value is equal to an empty
string.
- JavaScript: this.form.title1.rowset.next(-1)
English: Move the row pointer to the previous row for the
Title1 query that belongs in the current form.
- The autoEdit property lets you toggle a form between
read-only and read-write with a single method call.
- The Form Designer always streams out the height,
width, color, and text properties for
an HTML control. If the color is set to "black",
you can remove the color property without altering the
appearance of the control because the default color is "black".
- Arrays are zero-based. Length returns a value that is one
higher than the highest valid index to the array.
- Functions defined within a class are methods. Functions defined
after the closing class bracket that appears at the end of a JavaScript
form file are standard functions, not methods.
- If the Text control's value property is outside of
the range of the template, it evaluates to zero.
- Use this.parent.parent to refer to a form from a
rowset event. The parent of the rowset is a query, and the parent
of a query is a form.
- <BR> is the HTML tag for line break.
- The groupName property determines how to group radio
buttons. If you create six radio buttons, you can break them into
two groups of three by assigning one groupName to three
of the controls and another groupName to the remainder.
- Little d and big BASE.
- Trick question. There are actually two classes with toUpperCase():
String and StringEx.
- In Navigator 3.0, you can select Options|General Preferences
and check the Always Use My Colors option to force Web pages to
use a custom browser defined color scheme. The same option is
available in Netscape Communicator by selecting Edit|Preferences|General
Preferences.
- Controls on page zero appear on all other pages. If you want
toolbar buttons to appear on every page of a form, placing the
controls on page zero eliminates the need to move them when you
change pages.
- To create a bulleted list in HTML, you need to use the <LI>
and <UL> tags. The <LI> tag delimits
items in the list. The <UL> tag goes around the
entire list of items.
- The Paradox AutoIncrement field type creates unique
numeric key values when you append new rows to a table.
- If you pass the SQL command to the constructor of a new Query
object, IntraBuilder sets the sql property to the SQL
command and activates the query.
- You can use a report's preRender event in much the
same way that you use a form's onServerLoad event.
- The Group::agSum() method can sum field values in
a self-evaluating code block.
- IREG0009.DBF is the custom component registry table.
You can use this table to specify toolbar images and tabs for
custom components. The table resides in the designer\forms folder.
Note that the last four digits of the table name correspond to
the country code and will vary in international releases of IntraBuilder.
- The Desktop Properties dialog lets you specify an alternate
script editor.
- The Toolbars and Palettes dialog lets you configure the look
and position of the toolbars.
- The Application tab of the Desktop Properties dialog contains
an option for suppressing the Expert prompt. You can also avoid
the prompt by opening the designers from the Script Pad.
- You can check the multi-user lock option in the Desktop Properties
dialog to prevent other users from modifying tables that you are
currently using.
- The View menu has an option for controlling the status bar.
- During Script development you can use the Script Pad for many
purposes, including the following:
- Testing statements and expressions.
- Listing debug information to the results pane by embedding
_sys.scriptOut.writeln() statements in your script.
- Opening, running, and compiling scripts with _sys.scripts.design(),
_sys.scripts.run(), and _sys.scripts.compile().
- In the Custom folder.
- The output is 4.
On line 5, the preprocessor substitutes the value 4 for
OUTPUT_HTML, which is defined in Intra.h. Because
DEBUG is never defined, line 5 is the only line that
is sent to the compiler.
- It allows you to display dates and times using string names
for months, days, and so on. The Windows Control Panel settings
determine the display of date and time strings.
- You can manage the security options for users, groups, resources,
and policies.
- From the Form Designer, you can select File|Set Up Custom
Components to add .cc files onto the Component Palette.
- The ActiveX.cc file is located in the Custom folder.
The default location for the Custom folder is
c:\Program Files\Borland\IntraBuilder\Custom
- The following script causes a runtime error when alert(OUTPUT_HTML)
executes. OUTPUT_HTML is defined as a numeric 5
in the intra.h file, and DEBUG is not defined.
The alert() function requires a character string parameter.
#include "intra.h"
#ifdef DEBUG
alert("Debugging");
#else
alert(OUTPUT_HTML);
#endif
- The DateEx class contains several methods that make
it easier to get formatted date strings. These include DateEx::getSDate(),
DateEx::getSDay(), DateEx::getSMonth(), DateEx::getSTime,
and DateEx::getSTimezone().
- The application security components allow you to manage users,
groups, resources, and policies.
- Three reasons for Java's fast and widespread acceptance are
as follows: Java is cross-platform. Java has simple object orientation.
Java is secure.
- LiveConnect is a feature of Netscape Navigator. It allows
interaction between JavaScript and Java applets.
- The code property names the Java class, and the codeBase
property identifies where the class can be found.
- Java source files have a class extension. The source
files end in a java extension.
- The params property is an associative array.
- Microsoft refers to the Internet Explorer version of JavaScript
as JScript.
- IntraBuilder is an OLE automation client only.
- wrd = new OleAutoClient("word.basic");
- You must pass the exact number of parameters that are contained
in the function prototype. This does not apply to functions whose
parameters are defined with the ... data type keyword.
- extern unsigned int MadeUp( char*, long* ) "madeup.dll";
- The type void* cannot be used for the return value.
Because a pointer is a 32-bit memory address, use the long
type instead.
- The structure contains 12 bytes. The UINT data type
is the same as an unsigned int (line 1), which is four
bytes. The COLORREF is a DWORD (line 4), which
is an unsigned long (line 2), which is four bytes. The
LONG is a long (line 3), which is also four
bytes. Refer to Table 19.1 for the size of each base type.
- Properties and variables are attached to objects. Variables
are scoped to methods, and methods can be called from anywhere
as long as they're in memory. Properties and methods are encapsulated
within objects.
- An object reference is the address of an object.
- An object reference variable is the variable, property, or
array element in which the address of the object is stored.
- Interprocess communication is the sharing or transfer of data
between objects. An example of interprocess communication is setting
a property in a second form to match a value in a property on
the first form.
- The form reference is the automatically generated
internal reference; it contains the address of the form. The this
reference is an internal reference to the current object.
- The generic scope resolution operators are class::
and super::.
- The class is the blueprint; the object is the actual functioning
entity.
- There is no difference between an instance and an object.
- Metadata is the data that defines the table structures, indexes,
procedures, and other items that make up a database. You can re-create
an empty database using the metadata from another database. Metadata
is stored in system tables.
- SQL queries perform better when the sequence is defined through
an ORDER BY clause rather than an indexName
property.
- Use masterRowset to relate the native dBASE and Paradox
table types. Otherwise, use masterSource.
- You can use a SQL DELETE FROM command to delete the
appropriate row from the RDB$GENERATORS system table.
InterBase 4.2 does not support a DROP GENERATOR command.
- The source and destination properties of
UpdateSet work with colon-delimited string values to
differentiate between database connections.
- IntraBuilder contains SQL Trace and Output Log options that
record all interactions between the SQL-Link driver and the database
server. The InterBase Communication Diagnostic tool and InterBase
Server Manager can detect connection problems and database corruption.