Appendix A

Answers to Quiz Questions


CONTENTS

Day 1

  1. You can create and modify JavaScript forms through the Form Designer.
  2. The IntraBuilder Explorer lets you view, run, and design the files that comprise a JavaScript application.
  3. IntraBuilder Professional supports Microsoft SQL Server and InterBase.
  4. 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.
  5. IntraBuilder can connect to Microsoft Access tables through ODBC.

Day 2

  1. Shift+f2 opens the currently selected file in design mode. f2 runs the file.
  2. 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.
  3. The default location of the Solution Application home page is
    C:\Program Files\Borland\IntraBuilder\Apps\Index.htm
  4. The Knowledge Base Search is not case sensitive.
  5. The default Web server port is 80.
  6. A document alias lets a Web server work with files outside the root document folder.
  7. The Sample forms each demonstrate a single JavaScript concept, while the Solution Applications provide turn key systems that combine many JavaScript techniques.

Day 3

  1. The options property determines what values appear in a select list.
  2. The form background property lets you set a background image for a form.
  3. When you move past the last row in a table, the cursor is at end of set.
  4. The Database component lets you work with tables through SQL-Link drivers.
  5. The dataLink property links a Text control to a field.

Day 4

  1. Custom components can contain property values, linked events, and custom methods.
  2. 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.
  3. 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.
  4. Before saving a multiple page form, set the current form page to page one.
  5. 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.
  6. Anything that you can add or set on a standard form can be inherited from a custom form class.
  7. The easiest way to add a custom component to the Component Palette is through the Set Up Custom Components dialog.
  8. Controls on page zero are visible on all form pages of the form.
  9. You can set the current form page through the form's pageno property.
  10. Custom form classes provide an easy way to establish a common look and feel to your application.
  11. All components are visible when viewing page zero.

Day 5

  1. The Report Expert creates detail and summary reports.
  2. You can choose between tabular or columnar layouts.
  3. Place page heading controls within the page template but outside of the stream frame.
  4. Moving a field value within a detail band may not move the field heading if the field was not added through the Field Palette.

Day 6

  1. 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.
  2. The _sys object contains methods that execute when you work with the IntraBuilder Explorer.
  3. The Script Pad lets you quickly try out JavaScript statements and expressions.
  4. 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.
  5. You can use the Method Editor to create and modify methods from within a designer.

Day 7

  1. dBASE table security enables the creation of user- and group-level encryption.
  2. The Query object provides access to tables, while the Database object provides access to SQL connections.
  3. When you run a table, IntraBuilder displays a data entry form with Text controls for each field.
  4. You can assign a password to a Paradox table through the Database Administration dialog.
  5. You can load an existing SQL script or build the SQL statement visually using the Query Builder.

Day 8

  1. On secure pages, the address starts with https instead of http.
  2. The m and p in mcp stand for Macmillan and Publishing.
  3. Indexes greatly enhance the speed of quick searches when you are looking for complete values rather than substring matches.
  4. The HTML editor is available only with the Gold version.
  5. Navigator Gold supports GIF and JPEG images.
  6. Enter JAVASCRIPT: as a location to open Netscape Navigator's Script Pad.

Day 9

  1. The start tag for a list item is <LI>. The end tag is </LI>.
  2. 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.
  3. After dropping a table onto the Form Designer, remove the full path from the new Query object's sql property.
  4. The filter property is part of the Rowset class.
  5. An object is an instance of a class. The class is only a definition of something.
  6. The scope resolution operator is ::, as in class::Form_onServerLoad.

Day 10

  1. The most user-friendly filterOptions setting is 3 - Match partial length and ignore case.
  2. The most performance-unfriendly filterOptions setting is 3 - Match partial length and ignore case.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

Day 11

  1. Prefix any single quote that occurs within a lookup value with a triple backslash when using the Rowset::applyLocate() method or the filter property.
  2. 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.
  3. If the dataSource of an image is empty, the IntraBuilder Server substitutes a black-and-white image that says "IntraBuilder."
  4. A binary field is empty if its value is equal to an empty string.
  5. 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.
  6. The autoEdit property lets you toggle a form between read-only and read-write with a single method call.

Day 12

  1. 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".
  2. Arrays are zero-based. Length returns a value that is one higher than the highest valid index to the array.
  3. 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.
  4. If the Text control's value property is outside of the range of the template, it evaluates to zero.

Day 13

  1. 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.
  2. <BR> is the HTML tag for line break.
  3. 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.
  4. Little d and big BASE.
  5. Trick question. There are actually two classes with toUpperCase(): String and StringEx.
  6. 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.

Day 14

  1. 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.
  2. 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.
  3. The Paradox AutoIncrement field type creates unique numeric key values when you append new rows to a table.
  4. 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.
  5. You can use a report's preRender event in much the same way that you use a form's onServerLoad event.
  6. The Group::agSum() method can sum field values in a self-evaluating code block.

Day 15

  1. 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.
  2. The Desktop Properties dialog lets you specify an alternate script editor.
  3. The Toolbars and Palettes dialog lets you configure the look and position of the toolbars.
  4. 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.
  5. 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.
  6. The View menu has an option for controlling the status bar.

Day 16

  1. During Script development you can use the Script Pad for many purposes, including the following:
  2. In the Custom folder.
  3. 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.
  4. 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.
  5. You can manage the security options for users, groups, resources, and policies.

Day 17

  1. From the Form Designer, you can select File|Set Up Custom Components to add .cc files onto the Component Palette.
  2. The ActiveX.cc file is located in the Custom folder. The default location for the Custom folder is
    c:\Program Files\Borland\IntraBuilder\Custom
  3. 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
  4. 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().
  5. The application security components allow you to manage users, groups, resources, and policies.

Day 18

  1. Three reasons for Java's fast and widespread acceptance are as follows: Java is cross-platform. Java has simple object orientation. Java is secure.
  2. LiveConnect is a feature of Netscape Navigator. It allows interaction between JavaScript and Java applets.
  3. The code property names the Java class, and the codeBase property identifies where the class can be found.
  4. Java source files have a class extension. The source files end in a java extension.
  5. The params property is an associative array.
  6. Microsoft refers to the Internet Explorer version of JavaScript as JScript.

Day 19

  1. IntraBuilder is an OLE automation client only.
  2. wrd = new OleAutoClient("word.basic");
  3. 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.
  4. extern unsigned int MadeUp( char*, long* ) "madeup.dll";
  5. The type void* cannot be used for the return value. Because a pointer is a 32-bit memory address, use the long type instead.
  6. 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.

Day 20

  1. 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.
  2. An object reference is the address of an object.
  3. An object reference variable is the variable, property, or array element in which the address of the object is stored.
  4. 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.
  5. 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.
  6. The generic scope resolution operators are class:: and super::.
  7. The class is the blueprint; the object is the actual functioning entity.
  8. There is no difference between an instance and an object.

Day 21

  1. 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.
  2. SQL queries perform better when the sequence is defined through an ORDER BY clause rather than an indexName property.
  3. Use masterRowset to relate the native dBASE and Paradox table types. Otherwise, use masterSource.
  4. 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.
  5. The source and destination properties of UpdateSet work with colon-delimited string values to differentiate between database connections.
  6. 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.