#

VisualWorks Tools
Launcher
The VisualWorks Launcher is the main window from which you perform operations in the development environment. The Launcher also displays the System Transcript view, a running list of informational messages generated by VisualWorks or your code.
The Launcher is displayed when you start VisualWorks, and a copy of it remains open until you exit the VisualWorks development environment.
Launcher window menu bar: File , System , Browse , Tools , Window , and Help .
File Menu
File Browser
Open a File Browser.
Open File...
Prompt for the name of a file, and open it in a Workspace.
Save Image
Saves the image with its current name.
Save Image As...
Prompt for an image filename. The name of the current image is provided as a default. Save the entire working environment in the named image file. To create a new image file, keeping the previously saved image safe, enter a new name.
Perm Save Image As...
Prompt for an image filename, without the " .im " extension. The name of the current image is provided as a default. Save the entire working environment in the named image file. When the image file is restarted, all objects currently in Old Space will be promoted to Perm Space .
Perm Undo As...
Prompt for an image filename, without the " .im " extension. The name of the current image is provided as a default. Save the entire working environment in the named image file. When the image file is restarted, all objects currently in Perm Space will be promoted to Old Space ; this is the opposite of the command Perm Save As... .
Save Headless As...
Prompts for an image name, then saves the image set to run in headless mode. Splash screen and sound are disabled. Refer to the Application Developer's Guide for setup information.
Set VisualWorks Home...
Prompt for a directory path. Assign this path as the current "home" directory for VisualWorks.
Exit VisualWorks...
Exit the VisualWorks environment, closing all windows. Prompt to save the current image.
System Menu
Parcel Manager
Open a Parcel Manager.
Load Parcel Named...
Prompt for the name of a parcel and load it into the current image. Specify only the name of the parcel (omitting the " .pcl " extension). The parcel loader will search on the current directory path.
Unload Parcel Named...
Prompt with a list of all currently loaded parcels, and unload all parcels that are selected on the list (selected parcels are indicated with a check mark next to the name).
Changes->Change Sets
Open a Change Set Browser on all change sets in the current image. The active change set will be highlighted.
Changes->Condense Changes
Condense the system changes file to eliminate all but the most recent change for each class or method. All duplicates will be permanently purged from the file.
Changes->Open Override List
Open an empty Override List tool.
Changes->Browse System Overrides
Open an Override List tool displaying all overrides currently in the system.
Collect Garbage
Invoke the compacting garbage collector to reclaim all unused memory. All memory managed by the object engine is compacted, except for the zone known as Perm Space . To compact the entire object memory, use Collect All Garbage .
Collect All Garbage
Invoke the global garbage collector to reclaim all unused memory. All memory managed by the object engine is compacted, including for the zone known as Perm Space .
Clear Transcript
Clear the contents of the Transcript window.
Settings
Open the Environment Settings Tool.
See also:
Environment Settings
Changes and Change Sets
Browse Menu
System
Open a new System Browser.
Class/Variable/Name Space...
Prompt for a class, variable, or name space name and open a specialized browser on that object. The wildcard character " * " may be used to select from a group of names.
Senders of Selector...
Prompt for a selector, and open a list browser on all methods referencing it. Equivalent to the Senders command in the System Browser.
Implementors of Selector...
Prompt for a selector, and open a list browser on all its implementors. Equivalent to the Implementors command in the System Browser.
References to Variable...
Prompt for the name of a shared variable, and open a list browser on all methods referencing it. All name spaces will be searched.
Ambiguous References
Open a browser on any ambiguous references that are the result of a parcel load or file-in to the image. I.e., code that references shared variables in two different name spaces but which have the same name.
See also:
Set options for browsing
Debug Menu
Disable/Enable Probes
Toggles processing of software probes.
Remove All Probes...
Removes all software probes from the system.
Remove Unused Watch Windows...
Discards all open watch windows that are no longer in use.
Remove Unused Debug Variables...
Removes all debug variables that are no longer in use.
Browse Probes
Opens a method browser on all methods containing probes.
Inspect Debug Variables
Opens a variable browser on all debug variables.
Probe Library -> Load...
Opens a file dialog to select and load externally saved probe definitions.
Probe Library -> Save...
Opens a file dialog to save the current probes into an external file.
Watch Library -> Load...
Opens a file dialog to select and load externally saved watch expressions.
Watch Library -> Save...
Opens a file dialog to save the current watch expressions into an external file.
Watch Library -> Inspect
Opens an inspector on curernt watch expressions.
Watch Library -> Clear...
Clears all current watch expressions.
Test Library -> Load...
Opens a file dialog to select and load externally saved conditional breakpoint expressions.
Test Library -> Save...
Opens a file dialog to save the current conditional breakpoint expressions into an external file.
Test Library -> Inspect
Opens an inspector on curernt conditional breakpoint expressions.
Test Library -> Clear...
Clears all current conditional breakpoint expressions.
Open Process Monitor
Opens the process monitor.
Tools Menu
Workspace
Open a new Workspace window.
Change List
Open a new Change List.
Advanced->Profiles->Time
Open a new Time Profiler (only if Advanced Tools parcel is loaded).
Advanced->Profiles->Allocations
Open a new Allocations Profiler (only if Advanced Tools parcel is loaded).
Advanced->Profiles->Benchmark Runner
Open a new System Benchmark Runner (only if Advanced Tools parcel is loaded).
Advanced->Class Reports
Open a new Class Reporter (only if Advanced Tools parcel is loaded).
Advanced->Benchmarks
Open a new Benchmarks Runner (only if Advanced Tools parcel is loaded).
Advanced->Full Browser
Open a Full System Browser (only if Advanced Tools parcel is loaded).
DLL and C Connect
Open a new DLL and C Connect Finder window (only if DLLCC is loaded).
Database->Ad Hoc SQL
Open an Ad Hoc SQL Tool.
Database->Data Modeler
Open a new Data Modeler.
Database->Canvas Composer
Open a new Canvas Composer.
Database->New Data Form...
Create a new Data Form, providing the opportunity to define a canvas for it.
Database->New Database Application...
Create a new Database application and then open a User-Interface Painter on its canvas.
See also:
Changes and Change Sets
Window Menu
Toolbar
Toggle the appearance of the Launcher's tool bar.
Refresh All
Refresh all VisualWorks windows.
Collapse All
Collapse all open windows.
Restore All
Restore all collapsed windows to their full size.
New Launcher
Close the current Launcher window and re-open a new one. Reset the contents of the System Transcript.
Help Menu
Load Help
Loads help. Only displayed if help is not yet loaded.
Launcher Help
View Help topics for the Launcher window.
Topics
Open a Help Browser on all available topics.
Rebuild Help Library
Rebuild the Help Browser database.
Object Reference
Open a Help Browser containing reference information on every class in the system.
Installation Workspace...
Open a Workspace containing step by step installation instructions.
System Workspace...
Open the System Workspace.
About VisualWorks...
Open a window containing version information about the current image. In addition to the version ID, display any patches that have been made, and any parcels that are loaded.
Workspace
A Workspace is a window in which you can test Smalltalk code by evaluating Smalltalk expressions. More than one Workspace can be open at one time. Further, a single workspace can have multiple workspace pages, each holding a different workspace.
Use the Workspace's menus to edit text and evaluate Smalltalk expressions.
Workspace menu bar: <Operate> Menu , Page , Edit , Smalltalk , Options .
<Operate> Menu
Accept
Keep the last change.
Format Selection
Applies source code formatting to the selection.
Do it
Execute the highlighted text as a Smalltalk expression.
Print it
Same as do it , except a description of the resulting object is inserted in the text. The printed string becomes the current selection, so it can be deleted easily.
Inspect it
Same as do it , except an inspector is opened on the resulting object.
Debug it
Open a debugger on the selected expression before evaluating.
File it In
File in the selected code.
Explain
Display an explanation of the selected expression.
Cut
Delete the selection and place on the clipboard/buffer.
Copy
Leave in place, but place the selection on the clipboard/buffer.
Paste
Insert from the clipboard/buffer.
Find
Find the next occurrence of a specified string.
Replace
Replace the next occurrence of a string with a specified string.
Hardcopy
Print this workspace.
Cancel
Reverse the last change.
Page Menu
New
Create a new workspace on a new page.
Open
Open another workspace on a new page.
Save
Save all changes to this workspace
Save As...
Save this workspace page under a new name.
Rename
Rename this workspace page.
Tear Off
Remove this page from this multipage workspace and open it in a single-page workspace.
Remove
Close this workspace page. If changes have been, made you are given the chance to save before closing.
Edit Menu
Undo
Reverse the last change.
Cut
Delete the selection and place on the clipboard/buffer.
Copy
Leave in place, but place the selection on the clipboard/buffer.
Paste
Insert from the clipboard/buffer.
Find
Find the next occurrence of a specified string.
Replace
Replace the next occurrence of a string with a specified string.
Select All
Select all text in the workspace.
Encoding
Options to set the encoding for the text.
Boss In...
Load code from an existing BOSS file.
Boss Out...
Save code out to a BOSS file.
Smalltalk Menu
Do it
Execute the highlighted text as a Smalltalk expression.
Print it
Same as do it , except a description of the resulting object is inserted in the text. The printed string becomes the current selection, so it can be deleted easily.
Inspect it
Same as do it , except an inspector is opened on the resulting object.
Debug it
Open a debugger on the selected expression before evaluating.
File it In
Load code into the workspace from a selected file-out file.
Namespaces...
Select which namespaces to import into the workspace environment.
Options Menu
Toolbar
Toggle the tool buttons display On or Off.
Status Bar
Toggle the status bar On or Off.
System Browser
The System Browser is the principal programming tool in VisualWorks. Use it for "browsing" the code library, defining new classes, name spaces or parcels, as well as for editing, compiling and printing any selected portion of source code.
To display categories, parcels, or packages in the upper-left view of the navigator, choose the corresponding item from the Browser menu.
When packages or parcels are shown, condition indicators are used to indicate their state ( see: Component condition indicators; and Component source code indicators).
System Browser menus: Browser , Edit , Find , View , Category , Package , Parcel , Class , Protocol , and Method .
Each view in the System Browser also has a pop-up <Operate> menu that duplicates the functionality of the menu bar.
Specialized browsers are available for examining individual categories, classes, protocols, and methods. Each specialized browser provides a subset of the functionality of the System Browser. Use Spawn from the <Operate> menu to open a specialized browser.
See also:
Browse a class category
Browse a class
Browse a protocol
Browse a method
Set options for browsing
Menus
Browser Menu
Undo
Undo the last action.
Redo
Redo the last action.
Refresh
Update all views to reflect changes made by other open browsers.
Category
Set the navigator to display the system using class categories.
Package
Set the navigator to display the system using packages. (Note: Store must be loaded for this option).
Parcel
Set the navigator to display the system using parcels.
Edit Menu
Find
Prompt for a string of text. Scan the contents of the code tool and highlight the next occurrence of the search string.
Replace
Open a dialog prompting for find and replace strings. Scan the contents of the code tool, replacing each occurrence of the Find: text with that of the Replace: text. Options are provided to start at the beginning of the view, at the position of the current selection, and to scan forward or backward.
Undo
Reverse the most recent cut or paste in the code tool.
Copy
Place a copy of the highlighted text in memory.
Cut
Place a copy of the highlighted text in the paste buffer, then delete the original.
Paste
Delete the highlighted text (if any), then place a copy of the most recently copied or cut selection in that location. To open a dialog presenting the five most recent text segments that have been copied or cut, hold down <Shift> while selecting Paste .
Do It
Execute the highlighted text as a Smalltalk expression. The scope of execution is the selected class, so class variables can be used in the expressions, and self refers to the selected class.
Print It
Execute the highlighted text as a Smalltalk expression and insert the resulting object in the text. The printed string becomes the current selection, so it can be deleted easily.
Inspect It...
Same as Do It , except an inspector is opened on the resulting object.
Debug It...
Same as Do It , except a debugger is opened on the code before it is evaluated.
Accept
Compile the code and, assuming no errors are found, place it in the image.
Cancel
Restore the entire text to its condition when it was last compiled (with Accept ).
Format
Impose standard font characteristics and indentation conventions on the code.
Explain
Insert an explanation of the selected literal or variable. The explanation frequently contains a Smalltalk expression that you can execute (using Do It ) to get more details.
Hardcopy
Print a copy of the text or code on paper. To save hard-copy to a file, use the Settings Tool.
See also:
Environment Settings
Find Menu
Package...
Prompt for a package, and display its definition in the browser.
Name Space...
Prompt for a name space, and display its definition in the browser.
Class...
Prompt for a class name, and display its definition in the browser.
Shared Variable...
Prompt for a shared variable, and display its definition in the browser.
Method...
Prompt for a method, and display its definition in the browser.
References to Symbol...
Prompt for a symbol, and find all references to it within the current scope of the browser.
Classes Defining Variable...
Prompt for a variable, and find all classes that define it within the current scope of the browser.
Implementors Matching...
Prompt for a selector, and find all implementors whose selector matches it within the current scope of the browser.
Methods with Strings Matching...
Prompt for a string, and find all methods that contain it, within the current scope of the browser.
Reference Path to...
Prompt for a block, and inspect the path from root to an object for which the specified block answers true.
All Reference Paths to...
Prompt for a class name, and inspect the path from root to any instance of this class.
View Menu
New
Create a new view on the current method.
Remove
Delete the currently selected view.
Spawn
Spawn a new browser.
Parcel Menu
New...
Define a new parcel.
Load
Prompt for a parcel to load into the image. A list of all parcels available on the current parcel path will be displayed.
Save
Open a dialog for saving the parcel. Prompt for a filename (do not include the " .pcl " extension) and save options. Store the parcel in the specified file, selecting options to control parcel sources and loading behavior.
Rename
Prompt for a new parcel name. Replace the current parcel name with the new one.
Unload
If no parcel is selected, open a multi-select dialog to select parcels for unload. If a parcel is selected, unload the current parcel without disturbing the current change set. Check for dangling references (methods extending defined classes or classes inheriting from defined classes) before proceeding to unload.
Remove
Like Unload , but also record removals in the current change set.
Discard
Discard the parcel leaving the code defined by the parcel in the system. Discard any overridden extensions or uninstalled code. Useful when constructing a deployment image that does not require parcels.
Empty
Move all code out of the selected parcel but keep the code and the parcel in the system.
Build->Add File-In
File-in a file and add the filed-in code to the parcel.
Build->Add Changes
Add the contents of the current change set to the parcel.
Build->Remove Changes
Remove the contents of the current change set from the selected parcel.
Build->Add to Changes
Add the contents of the selected parcel to the current change set.
Build->Remove from Changes
Remove the contents of the parcel from the current change set.
Build->Make Remove Script
Prompt for a file name. Make a script that removes the parcel's code from the system and save it in the specified file. The file contains a series of Smalltalk expressions; it may be evaluated using the File in command.
Browse->Unparcelled methods used exclusively
Compute the set of messages sent from within the selected parcel and nowhere else in the image. Open a Parcel method list browser on the result. Note: may take some time.
Browse->Unparcelled methods in defined classes
Open a Parcel method list browser on methods in classes defined by the parcel but not in the parcel.
Browse->Extension methods
Open a Parcel method list browser on methods in parcel on classes not defined by the parcel.
Browse->Overrides of Others...
Open a method list browser on those methods overridden by the current selection.
Browse->Overridden by Others...
Open a method list browser on those methods defined by the selected parcel that have been overridden by other components.
Browse->Changed methods
Open a method list browser on methods in parcel that have changed since last the parcel was saved.
Browse->Overridden extensions
Open a Change List on the original overridden versions, and a method list browser on the current versions of methods overridden by the parcel.
Find Name Space...
Prompt for a name space, and display its definition in the browser.
Find Class...
Prompt for a class name, and display its definition in the browser.
Find Shared Variable...
Prompt for a shared variable, and display its definition in the browser.
Spawn
Spawn a new browser on the currently selected parcel.
File Out As...
Prompt for a filename. Store a description of each class and method in the selected parcel, in a form that enables the class (including all of its methods) and any extension methods to be placed in another VisualWorks image with the File In command. Does not file out the parcel itself.
See also:
Managing Parcels
Category Menu
New...
Prompt for a new category name. Add the new category immediately above the currently selected category (if one is selected) or at the bottom of the list.
Move->to Parcel...
Prompt for a target parcel, and move the currently selected category into it.
Move->to Package...
Prompt for a target package, and move the currently selected category into it.
Rename...
Prompt for a new name, then replace the currently selected category name, both in the list and in all class definitions under that category. An existing category name cannot be duplicated.
Remove...
Delete the currently selected category. If the category still contains one or more classes, confirm, then delete the classes also. References to the classes remain intact.
Refresh
Update all views to reflect changes made by other open browsers.
Find Name Space...
Prompt for a name space, and display its definition in the browser.
Find Class...
Prompt for a class name. Highlight the specified class in the class view (and its category, in the category view). If a wildcard character is used, display a dialog of all classes with matching names. For example, the pattern C*View displays a list of all classes beginning with " C " and ending in " View ."
Find Shared Variable...
Prompt for a shared variable, and display its definition in the browser.
Spawn
Open a new browser on just the classes in the selected category (a Category Browser).
File Out As...
Prompt for a filename. Store a description of each class in the selected category, in a form that enables the class (including all of its methods) to be loaded into another VisualWorks image with the File In command.
Hardcopy
Print a hard-copy description of each class in the selected category.
See also:
Class Categories
Class Menu
New->Class
Display a template for creating a new fixed-size class which contains instance variables. Edit the template and select Accept to create the class.
New->Indexed Class
Display a template for creating a new, variable-length class which contains variables that are pointers to other objects. Edit the template and select Accept to create the class.
New->Byte Indexed Class
Display a template for creating a new, variable-length class containing indexable byte-sized fields. Edit the template and select Accept to create the class.
New->Name Space
Display a definition template (in the code tool) for creating a new namespace. Edit the template and select Accept to create the name space.
New->Shared Variable
Display a definition template (in the code tool) for creating a new shared variable. Edit the template and select Accept to create the variable.
New->Extension in Package...
Create an extension of a class or name space in a new package.
References
Open a browser on all methods that refer to the currently selected class.
Initialize
If a class is selected, send the message initialize to it. If a shared variable is selected, and it has an initializer, initialize its value using the initializer.
Create Subclass...
Prompt for the name of a new class, then create and insert the class into the class hierarchy under the currently selected class.
Rename...
Prompt for a new class name. Rename the class and update a methods containing references to it.
Remove...
Prompt for confirmation, then delete the selected class and its methods.
Safe Remove...
Remove the selected class, first checking for any references to it.
Move->to Category...
Prompt for a target category, and move the currently selected class into it.
Move->to Name Space...
Prompt for a target name space, and move the currently selected class into it.
Move->Definition to Parcel...
Prompt for a target parcel, and move the currently selected definition into it.
Move->Selection to Parcel...
Prompt for a target parcel, and move the currently selected class into it. Only the parts of the class that are within the current package are moved. If multiple packages are selected, all parts of the class within all selected packages are moved to the parcel. If the navigator is set to view categories, the complete class (methods and shared variables) are moved to the parcel.
Move->All to Parcel...
Prompt for a target parcel, and move the currently selected class into it. The complete definition, including shared variables, is moved.
Move->Definition to Package...
Prompt for a target package, and move the currently selected class into it.
Move->Selection to Package...
Prompt for a target package, and move the currently selected class into it. Only the parts of the class that are within the current package are moved. If multiple packages are selected, all parts of the class within all selected packages are moved to the package. If the navigator is set to view categories, the complete class (methods and shared variables) are moved.
Move->All to Package...
Prompt for a target package, and move the currently selected class into it. The complete definition, including shared variables, is moved.
Override->in Parcel...
Prompt for a parcel name. Create an override for the selected class in the specified parcel.
Override->in Package...
Prompt for a package name. Create an override for the selected class in the specified package.
Override->Restore...
Restore an override from the image.
Override->Remove...
Remove an override from the image.
Store->Browse Versions...
Browse all versions of the selected class in the repository.
Store->Browse Removed Methods...
Browse all methods stored in the repository for this class that are not loaded.
Store->Compare with...
Browse differences between the loaded class and a version in the repository.
Other->Convert to Sibling
Create an abstract class and make the selected class a sibling with its subclasses under the new abstract class.
Other->Inspect All Instances
Inspect all instances of the selected class.
Other->Browse Methods with Source Matching...
Open a browser on all methods of the selected class matching a pattern.
Other->Find Reference Path to an Instance...
Inspect the path of references from Root to any instance of this class.
Other->Find All Reference Paths to an Instance...
Inspect all reference paths from Root to any instance of this class.
Other->Check Protocols...
Verify that both the selected class and its superclass use the same protocols.
Instance Variables ->References
Browse all methods referencing the instance variable within the current scope of the browser.
Instance Variables ->Readers
Browse all methods accessing the instance variable within the current scope of the browser.
Instance Variables ->Writers
Browse all methods modifying the instance variable within the current scope of the browser.
Instance Variables ->Add...
Add an instance variable to the selected class.
Instance Variables ->Rename...
Rename an instance variable and all its references.
Instance Variables ->Remove...
Remove an instance variable if it is not referenced.
Instance Variables ->Push Up...
Move the instance variable definition to the selected class' superclass.
Instance Variables ->Push Down...
Move the instance variable's definition to the subclasses that reference it.
Instance Variables ->Create Accessors...
Create accessing methods for the selected instance variable.
Instance Variables ->Abstract...
Create accessing methods for an instance variable and change all direct variable references to use them.
Instance Variables ->Protect...
Convert from indirect to direct instance variable access, removing all accessing methods that are no longer used.
Class Instance Variables ->References
Browse all methods referencing the class instance variable within the current scope of the browser.
Class Instance Variables ->Readers
Browse all methods accessing the class instance variable within the current scope of the browser.
Class Instance Variables ->Writers
Browse all methods modifying the class instance variable within the current scope of the browser.
Class Instance Variables ->Add...
Add a class instance variable to the selected class.
Class Instance Variables ->Rename...
Rename a class instance variable and all its references.
Class Instance Variables ->Remove...
Remove a class instance variable if it is not referenced.
Class Instance Variables ->Push Up...
Move the class instance variable definition to the selected class' superclass.
Class Instance Variables ->Push Down...
Move the class instance variable's definition to the subclasses that reference it.
Class Instance Variables ->Create Accessors...
Create accessing methods for the selected instance variable.
Class Instance Variables ->Abstract...
Create accessing methods for a class instance variable and change all direct variable references to use them.
Class Instance Variables ->Protect...
Convert from indirect to direct class instance variable access, removing all accessing methods that are no longer used.
Spawn
Open a new browser on the selected class.
Spawn Hierarchy
Open a new browser on the currently selected class and its superclasses and subclasses.
File Out As...
Prompt for a filename. Store a description of the currently selected class, in a form that enables the class (including all of its methods) to be loaded into another VisualWorks image with the File In command.
Hardcopy
Print a hard-copy description of the class.
See also:
Classes
Protocol Menu
New...
Prompt for the name of a new protocol, then add that name in the protocol view. Add the new protocol immediately above the currently selected one (if one is selected) or at the bottom of the list.
Move->to Parcel...
Prompt for a target parcel, and move the currently selected protocol into it.
Move->to Package...
Prompt for a target package, and move the currently selected protocol into it.
Rename...
Prompt for a new name, then update the protocol view.
Remove...
Prompt for confirmation, and delete the selected protocol and its methods. To resolve references, use the Senders command before you delete a protocol.
Find Method...
Display a dialog that lists all of the instance methods (if the instance switch is selected) or class methods of the currently selected class. Select a method name to display its code in the code view.
Spawn
Open a new browser (a message category browser) on the methods in the currently selected protocol.
File Out As...
Prompt for a filename. Store a description of the methods in the currently selected protocol, in a form that enables the methods to be loaded into another VisualWorks image with the File In command.
Hardcopy
Print a hard-copy description of the methods in the currently selected protocol.
See also:
Protocols
Method Menu
Senders
Open a browser (a Method Browser) on all methods that send the currently selected message. Use the fold-out menu to browse senders of other messages in the currently selected method.
Implementors
Open a browser (a Method Browser) on all methods that implement the currently selected message (i.e., methods having the same name that exist in other classes as well as this one). Use the fold-out menu to browse implementors of other messages in the currently selected method.
Hierarchy Senders
Open a browser (a Method Browser) on all methods that send the currently selected message. Only search methods in the current class hierarchy. Use the fold-out menu to browse senders of other messages in the currently selected method.
Hierarchy Implementors
Open a browser (a Method Browser) on all methods that implement the currently selected message (i.e., methods having the same name that exist in other classes as well as this one). Only search methods in the current class hierarchy. Use the fold-out menu to browse implementors of other messages in the currently selected method.
Local Senders
Open a browser (a Method Browser) on all methods that send the currently selected message. Use the fold-out menu to browse senders of other messages in the currently selected method.
Local Implementors
Open a browser (a Method Browser) on all methods that implement the currently selected message (i.e., methods having the same name that exist in other classes as well as this one). Use the fold-out menu to browse implementors of other messages in the currently selected method.
Move->to Protocol...
Prompt for a target protocol, and move the currently selected method(s) into it.
Move->to Parcel...
Prompt for a target parcel, and move the currently selected method(s) into it.
Move->to Package...
Prompt for a target package, and move the currently selected method(s) into it.
Move->to Component...
Move the body of the currently selected method to another component, leaving a forwarder and thereby not changing the external interface of the class that contains the original method.
Override->in Parcel...
Prompt for a parcel name. Create an override for the selected method(s) in the specified parcel.
Override->in Package...
Prompt for a package name. Create an override for the selected method(s) in the specified package.
Override->Restore...
Restore an override from the image.
Override->Remove...
Remove an override from the image.
Rename...
Prompt for a new class name. Replace the name in the system dictionary and update the class view.
Remove...
Prompt for confirmation, then delete the selected class and its methods.
Safe Remove...
Remove the selected class, first checking for any references to it.
Store->Browse Versions...
Browse all versions of the selected method in the repository.
Store->Compare with...
Browse differences between the loaded method and a version in the repository.
Store->Revert
Load the version of the method stored in the repository for this package version.
Visibility->Show Only In Selected Package
Show only methods and shared variables within the selected parcels/packages.
Visibility->Show Only In Selected Package
Show only methods and shared variables within the selected parcels/packages.
Visibility->Show All Inherited
Display all methods inherited from superclasses.
Visibility->Show All Except for Object
Display all methods inherited from superclasses, with the exception of those in class `Object` .
Visibility->Show No Inherited
Display only methods belonging to the currently selected class.
Shared Variable->References
Browse all references to a shared variable.
Shared Variable->Initailize
Initialize a shared variable.
Refactoring->Add Parameter...
Add a parameter to the selected method and change all senders to pass a default argument.
Refactoring-> Remove Paramter
Remove an argument from the method if all implementors of the method do not use the argument.
Refactoring->Inline All Self Sends
Inline the selected method into all senders of self, removing the method if there are no senders.
Refactoring->Push Up
Move the selected method to the selected class' superclass.
Refactoring->Push Down
Move the selected method to the selected class' subclasses.
Spawn
Open a new browser (a Method Browser) on the currently selected method.
File Out As...
Prompt for a filename. Store a description of the currently selected method, in a form that enables the method to be loaded into another VisualWorks image with the File In command.
Hardcopy
Print a hard-copy of the method source.
Inspect...
Open an Inspector on the currently selected method / shared variable.
See also:
Methods
Tools Menu
Zoom
Expand/contract the code view.
Source
Display the source code tool.
Comment
Display the comment code tool.
Hierarchy Diagram
Display the hierarchy diagram code tool.
Rewrite
Display the rewrite editor tool.
Code Critic
Display the code critic tool.
Set Undo Count
Set the size of the undo buffer.
Set Default Name Space
Set the default name space to be displayed when a browser is opened.
Toolbar
Toggle the toolbar on all browsers.
Status Bar
Toggle the status bar on all browsers.
Component condition indicators
In the parcels view, individual parcels appear with characters following their name to indicate the parcel's state:
*
Parcel is "dirty"; it has been modified in some way.
<
Parcel has been loaded.
!
Parcel has uninstalled (partially loaded) code.
+
Parcel has overridden methods on loading.
See also:
Component source code indicators
Component source code indicators
The Browser uses special text formatting to indicate the status of code with respect to parcels:
Bold
Used to mark any class or method that contains something defined by the selected component.
Red
Used to indicate items defined in more than one component. This indicates a warning about potential conflicts.
Text is displayed in any combination of the above emphases as appropriate.
See also:
Component condition indicators
Browser Icons
The browser's navigator uses a number of special icons to distinguish code components, special system classes, as well as the condition of individual methods.
System Browser Tools
In addition to its basic browsing functionality, the VisualWorks browser includes additional features for use by experienced developers.
The browser provides a framework for adding special-purpose code tools. Standard tools are available for editing component properties, code checking, automated code rewriting, and unit testing.
See also:
Component Properties Tool
Code Rewrite Editor
Code Critic
Refactorings
Component Properties Tool
When viewing a package, bundle or parcel, click on the browser's Properties tab to view the selected component's properties.
Deployment Prerequisites
Deployment prerequsites are an array of prerequisite components. Each individual prerequisite is a name, version pair.
In the case of parcels, the parcel loader searches along the parcel path for " .pcl " files that have the required name and attempts to load them. All parcels have a version which is an arbitrary string, that defaults to an empty string. Each parcel can also define a prerequisite version block which it can use to select appropriate versions of prerequisite parcels.
See also:
Prerequisite Version Action
Development Prerequisites
Development prerequisites are used when loading from Store. Each prerequisite is an array with a type (`#parcel` `#package` `#bundle` or `#any` ), a name and a version string. Developement prerequisites are usually a superset of the deployment prerequisities.
See also:
Deployment Prerequisites
Warning Suppression Action
Components may specify a warning suppression action . This must be a block taking one argument, the name of a prerequisite component being loaded. The block should answer true if warnings caused by loading the prerequisite should be suppressed.
The warning suppression block is run before any of the component's code is loaded. Consequently, it cannot and should not mention any code in the component to which it belongs.
Prerequisite Version Action
Components may specify a prerequisite version action . This must be a block taking three arguments, the name of a prerequisite component being loaded, its version string, and the version string defined in the component's list of prerequisites.
The block should answer true if the prerequisite's version is acceptable, and should be loaded. Otherwise the loader will continue to search for another component of the same name with a different version.
Pre-read Action
A component's `preReadAction` is a zero argument block, which is run before any of the component is read, but after any of its prerequisites are loaded. The block should answer true if loading is to continue; any other return value will abort the load.
Pre-load Action
Loading actions are one argument blocks that take the package / parcel being loaded as an argument.
In the case of parcels, the `preLoadAction` is run after all the code from a parcel has been parsed but before the code has been installed in the system. Hence the `preLoadAction` may happen too late to do things that affect the contents of a parcel. Use the `preReadAction` if you want an action that runs before the parcel's contents are parsed.
In the case of packages, code is currently compiled definition by definition so the pre-read and pre-load actions are run immediately consecutively.
preReadAction <code parsed from parcel and built> preLoadAction <code installed into the system> postLoadAction
See also:
Pre-read Action
Post-load Action
Loading actions are one argument blocks that take the package / parcel being loaded as an argument.
In the case of parcels, the postLoadAction is run after all the code from a parcel has been parsed but before the code has been installed in the system. Hence the postLoadAction may happen too late to do things that affect the contents of a parcel. Use the `preReadAction` if you want an action that runs before the parcel's contents are parsed.
In the case of packages, code is currently compiled definition by definition so the pre-read and pre-load actions are run immediately consecutively.
preReadAction <code parsed from parcel and built> preLoadAction <code installed into the system> postLoadAction
See also:
Pre-read Action
Pre-unload Action
Unloading actions are actions run when unloading a package or parcel. The preUnloadAction is run before unloading commences. It is a one-argument block that takes the package or parcel being unloaded as an argument. The postUnloadAction is a zero-argument block run after the package or parcel has been unloaded and discarded.
preUnloadAction <code removed from system> postUnloadAction
Post-unload Action
Unloading actions are actions run when unloading a package or parcel. The preUnloadAction is run before unloading commences. It is a one-argument block that takes the package or parcel being unloaded as an argument. The postUnloadAction is a zero-argument block run after the package or parcel has been unloaded and discarded.
preUnloadAction <code removed from system> postUnloadAction
Pre-save Action
Save actions are one argument blocks that take the package / parcel being saved as an argument.
preSaveAction
Component Properties
Component properties are stored in an `IdentityDictionary` , and what you see in the properties inspector is something that should have the same type of behavior as a normal DictionaryInspector.
You can add any key->value pair as a property. For example, one might want to add a `Author` property. To do so, use the <Operate> menu from the left pane of the inspector and select Add field... .
To Apply changes, you must first Accept them using the <Operate> menu in the inspector's right pane.
Any properties with a value of nil will be removed.
Code Rewrite Editor
The rewrite rule editor enables you to create search and replace patterns that work at the method's structural level. Unlike simple string matching, these patterns are applied to the method's parse tree.
The rewrite tool uses a special syntax to specify a transformation rule. When a transformation rule is applied, it affects the method(s) selected in the browser's navigator. You may specify a single method, or any number of methods, protocols, or classes as the target of a single transformation.
Open the rewrite editor by selecting the Rewrite tab of the browser's code tool.
For details, see the VisualWorks Tools Guide .
Code Critic
Use the Code Critic to screen application code for over sixty common types of bugs.
The Code Critic also provides a mechanism for applying a set of pre-defined transformation rules to your application code. These rules express "best practices" for code development, and are almost always safe to apply.
Open the Code Critic by selecting the Code Critic tab of the browser's code tool.
For details, see the VisualWorks Tools Guide .
Refactorings
The VisualWorks browser provides full functionality for code refactoring. Over two-dozen distinct refactoring operations are available for manipulating classes, methods, and individual statements within a method.
For details, see the VisualWorks Tools Guide .
Inspector
An inspector window allows you to examine objects by exploring their constituent objects, the values of the object's instance variables. You can also edit values, reorder collections, browse methods relevant to the object under inspection, and perform a variety of other operations.
Use the menus to manipulate the variables and their values. In the values pane, use Accept on the <Operate> menu to save a change to the object being inspected.
Inspector menus: Object , Edit , Go , History , Options .
Every object in the VisualWorks environment understands the message `inspect` ; for example:
OrderedCollection new inspect.
See also:
Debugging Techniques
Object Menu
Refresh
Update the values displayed.
Browse
Open a Class Browser on the selected item's class.
Spawn
Open a new Inspector on the selected item.
Spawn Owners
Open a new Inspector on the collection of owners of the selected item.
Edit Menu
Undo
Reverse the last edit.
Select All
Select all items in the variable list.
Copy
Copy the value of the selected variable to the clipboard/buffer.
Paste
Paste the value from the clipboard/buffer to the selected variable.
Add
Add a new variable to the list with the value as entered into the prompter.
Remove
Remove the selected variable.
Go Menu
Dive
Inspect the selected variable in the same inspector.
Back
Return to the previously inspected item.
Forward
Return to the inspected item you just returned from.
To Class
Inspect the class of the selected item.
To All Instances
Inspect the collection of all instances of the currently viewed class.
To New Instance
Inspect a new instance of the currently viewed class.
History Menu
This menu displays a list of items previously inspected in this Inspector. Select any item to return to that one.
Options Menu
Toolbar
Toggle the button toolbar On/Off.
Evaluation Pane
Open/close the evaluation pane, which is a workspace for this Inspector.
File Browser
Use a File Browser to view the contents of any directory or file, to edit a file, and to create new files or directories on the host's file system.
Enter the pathname of a directory or file using the pattern field . To display the contents of a file or directory entered in this field, press <Return>. The asterisk " * " serves as a wildcard character.
The directory view shows a hierarchical list of all volumes and directories available in the host's file system.
The names view displays the list of directories and files that match the pattern view's search string. To display the contents of a file, select it in the names view .
The contents view is a file editor with which you can modify the contents of a file and save the new version. Use the tab controls to view the properties of a file, or its contents in the following formats: text, binary, VisualWorks source code, or structured XML.
File Browser menus: Directory , File , View .
See also:
Files
Directory View Menu
Create...
Create a new directory.
Rename...
Rename the selected directory.
Remove...
Delete the selected directory.
Refresh
Refresh the File Browser.
Copy Name
Place a copy of the selected directory name in the paste buffer. Include the full path of the directory name.
Inspect
Open an Inspector window on the currently selected directory object.
Go to...
Prompt for a directory name, and display the contents of the specified directory in the File Browser.
Go to Default
Go to the VisualWorks default directory. This is typically the VisualWorks "home" directory.
File Dialog Directories->Go to Default Open Location
Go to the default location for opening files (if specified).
File Dialog Directories->Go to Default Save Location
Go to the default location for saving files (if specified).
File Dialog Directories->Make this Default Open Location
Specify the default location for opening files using a file dialog.
File Dialog Directories->Make this Default Save Location
Specify the default location for saving files using a file dialog.
File View Menu
Rename...
Rename the currently selected file.
Remove...
Delete the currently selected file.
Copy Name
Place a copy of the selected file name in the paste buffer. Include the full path of the file name.
Inspect
Open an Inspector on the selected file object.
Edit
Open a Workspace on the selected file.
Open in Change List
Open a Change List on the selected Smalltalk source file.
Compare with System
Open a Change List on the selected Smalltalk source file, comparing its contents with that of the current image.
File in...
Compile the contents of the selected Smalltalk source file into the current image .
File into New Change Set
Create a new Change Set and then compile the contents of the selected Smalltalk source file into the current image, placing the definitions into the new Change Set.
Load
Load the currently selected parcel into the current image.
Contents View Menu
Refresh All
Refresh all views.
Zoom
Expand/contract the contents view.
Parcel Manager
Use a Parcel Manager to view, load or unload parcels from the current image.
The left-hand view presents the current parcel path . Use the Suggestions tab to see a pre-defined set of recommended parcels.
Click on the Directories tab, to view the parcel paths as a directory tree. Selecting a particular directory displays all the parcels contained within it. Select the Loaded tab to view all parcels that are currently loaded into your working image.
By selecting a particular category, you may view a list of recommended parcels in the names view. Select a parcel in the names view to view its properties.
To load a parcel, select it from the names view, and choose Load from the <Operate> menu.
To browse a selected parcel that has already been loaded in the image, select Browse from the <Operate> menu.
Parcel Manager menus: File , Parcel .
See also:
Managing Parcels
File Menu
Load Parcel File...
Prompt for the name of a parcel file, and load it into the current image.
Close
Close the Parcel Manager.
Parcel Menu
Select All
Select all parcels in the current category / directory.
Load
Load the currently selected parcel into the current image.
Unload
Unload the currently selected parcel from the current image.
Browse
Browse the currently selected parcel. The action is only available for parcels that are presently loaded in the image.
Change List
Use the Change List to view all changes made to the image since the last time it was saved, and to reload these changes selectively. These features allow you to see the evolution of a change or revert code back to prior versions.
The Change List enables you to compare several groups of changes and analyze their differences. Use these features when you want to make comparisons or check for conflicts between changes in the image, changes made since the last time the image was saved, or changes saved in files or parcels. Changes from any available source (in the image, from a file, or from a parcel) can be analyzed and cross-compared.
Change List tool menus: File , Replay , Remove , Forget , Find , Conflicts , and Show .
The list view also contains a pop-up <Operate> menu with the following commands: View <Operate> Menu.
See also:
Changes and Change Sets
Recover changes
View <Operate> Menu
file in/out->read file/directory...
Prompt for a file- or pathname. Add the Smalltalk expressions contained in the designated file to the list being displayed. If a directory pathname is supplied, add the contents of all files (presumed to be Smalltalk code) in the directory to the list.
file in/out->write file...
Prompt for a filename. Store the code indicated by the displayed change entries in that file. Do not save entries on the list that are marked for removal.
file in/out->recover last changes
Display all changes made to the system since the last snapshot was made (i.e., the last image save operation).
file in/out->display system changes
Add the contents of the currently active Change Set to the displayed list of changes.
replay all->from here
Execute every change entry in the list from the current selection to the end. Only change entries that are not marked for removal will be executed. If there is no current selection, replay from the top.
replay all->from the top
Execute every change that is displayed in the list (and not marked for removal). If an exception occurs during the replay, the selection is left at the item which caused it.
remove all
Mark all displayed entries for removal. Use forget to delete marked entries.
restore all
Unmark all displayed entries so they won't be affected by a forget operation.
spawn all...
Open a new Change List window containing only the displayed entries (i.e., with all filter switches set to off but retaining the effect of the filters).
forget
Delete every entry that has been marked for removal by a remove operation.
replay selection
Execute the selected change entry.
remove selection
Mark the selected entry for deletion.
restore selection
Unmark the selected entry.
spawn selection...
Open a Method browser on the current system definition of the selected method. If there is no difference between the selected change entry and the definition in the system, do nothing. If the class or method doesn't exist in the system, open a text view on the changed method definition.
conflicts->check conflicts, save as...
Prompt for an output filename. Find each change entry in the list that affects the same class or method as another change entry, then save all versions of the affected code in the designated file.
conflicts->check with system, save as...
Prompt for an output filename. Find change entries in which the code differs from the system's current version and save both versions of the affected code in the designated file.
File Menu
Read file/directory...
Prompt for a file- or pathname. Add the Smalltalk expressions contained in the designated file to the list being displayed. If a directory pathname is supplied, add the contents of all files (presumed to be Smalltalk code) in the directory to the list.
Read different source from file/directory...
Prompt for a file- or pathname. Read changes from file(s) and compare the full source code for any differences with the code in the system. Add to the list each code change in the source file that differs. Perform a full source comparison, flagging any changes to formatting or comments.
Read different code from file/directory...
Prompt for a pathname. Read changes from file(s) and analyze the code for any differences with the code in the system. Add to the list each code change in the source file that differs. Perform a code comparison only, ignoring changes to formatting or comments.
Write file...
Prompt for a filename. Store the code indicated by the displayed change entries in that file. Do not save entries on the list marked for removal.
Recover last changes
Display all changes made to the system since the last snapshot was made (i.e., the last image save operation).
Display system changes
Add the contents of the current Change Set to the displayed list of changes.
Display all system changes
Add all the changes in the system (not just those in the current Change Set) to the displayed list of changes.
Display Parcel...
Prompt with a list of loaded parcels. Read changes from the selected parcel, and display them in the change list.
Replay Menu
This change
Execute the selected change entry.
All from the top
Execute every change that is displayed in the list (and not marked for removal). If an exception occurs during the replay, the selection is left at the item which caused it.
All from here on down
Execute every change entry in the list from the current selection to the end. Do not execute change entries that are marked for removal. If there is no current selection, replay from the top.
Remove Menu
Selection
Mark the selected entry for deletion. Entries marked for removal are displayed with struck text.
All
Mark all displayed entries for removal. Use forget to delete marked entries. Entries marked for removal are displayed with struck text.
All above
Remove all changes above the currently selected change.
All below
Remove all changes below the currently selected change.
Exchange removed
Exchange the sets of removed and unremoved changes. Unmark all entries in the list that are marked for removal and vice versa.
Same code as system
Remove those changes that have the same code as the system, ignoring changes to formatting or comments.
Same source as system
Remove those changes that have exactly the same source as the system. Perform a source comparison, flagging any changes to code, formatting, or comments.
Different code to system
Analyze each change in the list for differences from the code in the system, ignoring any changes in formatting or comments. Remove those changes that differ in effect from the system's versions.
Different source to system
Remove those changes that are not exactly the same as the system's versions. Perform a full source comparison, removing methods containing any changes to code, formatting, or comments.
Classes not in system
Remove those changes that have no class in the system.
Methods not in system
Remove those method changes that have no corresponding method in the system.
Old versions
Remove any conflicting changes in the list, leaving only the latest version of each change. Determine conflicts by comparing the code of the successive changes. If there is a selection in the list, only remove conflicting changes that occur before the selected item. If the left <Shift> key is pressed while selecting this action, remove later changes to leave only the earliest change.
Exact duplicates
Remove any duplicate changes in the list to leave only one version of each change. Perform a full source comparison on each change to identify duplicates. If the left <Shift> key is pressed while selecting this action, only remove duplicates later in the list; otherwise, remove duplicates earlier in the list.
Conflicts
Remove all changes in the list that conflict with other changes in the list (even if they're duplicates).
Changes containing string...
Prompt for a string, and remove all changes that contain text matching the string (the comparison is case-insensitive.)
Forget Menu
Forget these
Forget changes that have been marked on the list for removal. This command is useful in conjunction with the various filters used to restrict the list to a single class, method, type, &c.
Forget all
Forget every entry that has been marked for removal by a remove operation.
Restore selection
Unmark the selected entry.
Restore all
Unmark all displayed entries so they won't be affected by a forget operation.
Restore changes containing string
Prompt for a string, and restore all changes that contain text matching the string (the comparison is case-insensitive.)
Find Menu
Find file...
Prompt for a file name, and search for all changes in that file. Select and display these changes, enabling the file filter.
Find type...
Prompt for a string, and search for all changes of that type (e.g., class definition, method definition, &c). Select and display these changes, enabling the type filter.
Find class...
Prompt for a string, and search for all changes to that class. Select and display these changes, enabling the class filter.
Find protocol...
Prompt for a string, and search for all changes to that protocol. Select and display these changes, enabling the protocol filter.
Find selector...
Prompt for a string, and search for all changes to that selector. Select and display these changes, enabling the selector filter.
Spawn selection
Open a Method Browser on the current system definition of the same method. If there is no difference between the selected change entry and the definition in the system, do nothing. If the class or method doesn't exist in the system, open a text view on the changed method definition.
Spawn all
Open a new Change List window containing only the displayed entries (i.e., with all filter switches set to off but retaining the effect of the filters).
Spawn changes containing string
Prompt for a string, and spawn a Change List on those changes that match the string (the comparison is case-insensitive).
Class matching->Instance and class
Ignore the distinction between class and metaclass changes. Show both class and instance method changes in the list.
Class matching->Selected class only
Recognize the distinction between class and metaclass changes. Do not show both class and instance method changes. If a class method is currently selected in the change list, the list will be refreshed to eliminate instance methods; if an instance method is currently selected, the filter will be set to ignore class methods.
Same file
Toggle the filter for displaying entries contained in the same file as the selected item. This action has the same effect as clicking on the file filter switch.
Same type
Toggle the filter for displaying entries of the same type as the selected item. This action has the same effect as clicking on the type filter switch.
Same class
Toggle the filter for displaying entries of the same class as the selected item. This action has the same effect as clicking on the class filter switch.
Same protocol
Toggle the filter for displaying entries of the same protocol as the selected item. This action has the same effect as clicking on the protocol filter switch.
Same selector
Toggle the filter for displaying entries with the same method selector as the selected item. This action has the same effect as clicking on the selector filter switch
Same change
Toggle the filter for displaying entries with the same properties as the selected item. This action has the same effect as clicking on the same filter switch.
Conflicts Menu
conflicts->check conflicts, save as...
Prompt for an output filename. Find each change entry in the list that affects the same class or method as another change entry, then save all versions of the affected code in the designated file.
conflicts->check with system, save as...
Prompt for an output filename. Find change entries in which the code differs from the system's current version and save both versions of the affected code in the designated file.
Remove conflicts
Remove all conflicting changes from the list (even if they're duplicates).
Remove conflicts with system
Remove those changes that differ in effect from the system's versions. Analyze each change for any differences with the code in the system, ignoring changes to formatting or comments.
Add system conflicts
Add to the list new change entries for all messages in the list that conflict with the system.
Add original versions
Add to the list new change entries for all changes in the list that are also found in the sources files.
Add to change set
Add to the current change set those changes that correspond to the currently listed changes. Do not compile the contents of the change list into the system; modify only the contents of the current change set. Use the commands on the Replay menu to integrate the changes.
Remove from change set
Remove from the current change set those changes that correspond to the currently listed changes. Do not compile the contents of the change list into the system; modify only the contents of the current change set. Use the commands on the Replay menu to integrate the changes.
Build script to system
Spawn a new Change List window containing changes necessary to convert the contents of this change list to that of the current system. It is assumed that the current Change List contains complete code for one or more classes from some other foreign system which differs from the running image.
Show Menu
Show file
Toggle the display to list the file that contains each change item on the list. The format of each item in the list will be changed as long as this option is selected.
Show protocol
Toggle the display to list the protocol of each change item on the list. The format of each item in the list will be changed as long as this option is selected.
Show conflicts
Toggle the lower view of the Change List window to display two parallel panes. When this option is enabled, it is possible to see a source-level analysis of conflicts between methods.
Conflicts->Vertical view
Display the parallel conflict sub-views in a vertical arrangement. This option only works when Show conflicts has been enabled.
Conflicts->Horizontal view
Display the parallel conflict sub-views in an horizontal arrangement. This option only works when Show conflicts has been enabled.
Conflicts->Source differences
Emphasize (highlight) differences in the source text of conflicting changes.
Conflicts->Code differences
Emphasize (highlight) only the differences in the code of conflicting changes.
Conflicts->Emphasize in list
Toggle the emphasis of the items on the list of changes. When list items are emphasized, bold face is used to indicate changes, while italics are used to indicate no change.
Conflicts->Indicate same methods
Toggle the indication of methods which are the same. The text (same) will appear next to appropriate items on the list.
Line-end treatment->As in file
Do not normalize line-endings. When comparing source files that are produced on different platforms, the Change List automatically normalizes all line-endings. Use this command to toggle this process of normalization.
Line-end treatment->Converted to CRs
Normalize line-endings. When comparing source files that are produced on different platforms, the Change List automatically normalizes all line-endings. Use this command to toggle this process of normalization.
Change Set Browser
Change sets are listed in the
Project Browser
window. There is always a Default change set list. If no change set is selected, or if Default is selected in the Project Browser, all changes are recorded in the default change set. An empty change set is indicated with a " - " character following the name; a change set containing unsaved changes is indicated with a " * " character following the name.
Selecting a change set in the Project Browser makes it the active or "current" change set. All subsequent changes you make to the image will be saved in that change set.
The Project Browser has a menu bar with a single drop-down ChangeSet menu; it is identical to a pop-up <Operate> menu.
See also:
Changes and Change Sets
Recover changes
ChangeSet Menu
Add...
Prompt for a name. Create a new change set using the name provided.
File in from...
Prompt for an input file. Open the named file and file it into the current change set.
File out as...
Prompt for a filename. Store all changes in the current change set in the specified file.
File out all...
Prompt for the name of a directory. Store all change sets in that directory, saving each set in a separate file.
Package out as...
Prompt for a filename. Package and store all changes in the current change set in the specified file.
Rename as...
Prompt for a name. Rename the current change set using the name provided.
Remove
Delete the selected change set.
Bin out as...
Prompt for the name of a BOSS " .bst " file. Store all changes in the current change set in the specified file.
Remove Project Code
Expunge the code in the currently selected project.
Remove Script
Note: No longer supported.
Import Script
Note: No longer supported.
Empty...
Empty the active change set.
Browse
Open a method browser for all the changes in the selected change set.
Edit
Open a Change Set Editor on the selected change set.
Inspect
Open an Inspector on the selected change set.
senders...
Prompt for a selector. Open a list browser on all methods in the selected change set that reference the provided selector.
implementors...
Prompt for a selector. Open a list browser on all methods in the selected change set that implement the provided selector.
Find class...
Prompt for a class name. Highlight the next change set in the Project Browser that refers to specified class.
Find selector...
Prompt for a selector. Highlight the next change set in the Project Browser that refers to specified selector.
Exit
Close the Change Set browser.
Debugger
The Debugger enables you to look at the methods that are waiting for a return value when a program interrupt occurs. Use it to examine the values of variables in each context, dynamically change a value or a method, insert breakpoints, and restart execution at a chosen location with new values and new code experimentally in place.
The execution stack lists the message-sends that were waiting for a return at the time of the error. Use the stack view's <Operate> menu to proceed with the program's execution at the desired pace, and to expand the depth of the listing.
The stack inspector allows inspecting the selected expression's intermediate stack values.
Select a message-send in the stack view to display the corresponding method in the code view. Within the method, the current point of execution is automatically highlighted.
Use the two inspector views to examine and modify instance and temporary variables. The variables are updated as you choose different positions in the execution stack. Variables can be modified (using Accept ).
The Debugger window has several menus: Stack view, Method menu, Execute menu, Correct menu, and Code views.
See also:
Notifier
Debugging Techniques
Inspect and change a variable
Stack View Menu
Copy Stack Report
Copies the context list to the clipboard so it can be pasted into a document or workspace.
Show More Stack
This command adds more contexts to the context list. Under normal conditions the debugger opens with the stack size set to 500, so this command is seldom needed.
Filter Stack
When selected, filters out debugger process messages. Also enables highlighting stack entries according to patterns set up in Settings tool, on the Debugger page.
Use Short Class Names
When selected, displays only the class names, without the dotted-name prefix for classes that are not visible outside the Smalltalk name space.
Select Home Context
Searches the stack and selects the home context of the currently selected context. If the home context is not on the stack, a dialog will inform the user of the situation.
Inspect Context
Opens an inspector on the method context.
Bookmark Context
Highlights the stack item (context) and adds it as an item on the Stack / Bookmark menu, for easy access to this context.
Clear Bookmark
Clears the bookmark for this context.
Method menu
These items on this menu are the same as in the System Browser, with this addition:
Recompile with Full Blocks
Recompiles the method so that all the blocks are full blocks. This also has the effect of causing the method to be reentered, i.e., the execution state of the method is reset. An Accept command also causes the method to be reentered. This method is a temporary method and disappears when a method return is executed.
Execute menu
Step Into
The most detailed stepping operation. When a message send is selected, it sends the message and displays the resulting context. Otherwise, it steps through the method, stepping into blocks along the way.
Step
Steps through the method, stepping into blocks along the way.
Step Over
Steps through the method, stepping over blocks as they occur.
Restart
Initializes the selected context and restarts execution at beginning of its method, as if the debugger had just stepped into it. The method may be either a `CompiledMethod` or a `CompiledBlock` .
Return
Allows the selected method or block to discontinue further execution and return immediately to its sender.
Run to caret
Advances to the caret, either into or out of a block closure. This is limited to full block closures. If a return is encountered within the selected context before the caret is reached, execution will stop before executing the return. However, if the return is within a block closure the method may return, at which point execution will stop.
Jump to caret
Jumps over code to the next caret, without execution. It causes the execution point to be positioned at the beginning of the statement containing the caret. A jump to caret into or out of a block closure cannot be performed. However, it is possible to jump into and out of conditional blocks, because they have been optimized by the compiler and are not real block closures. Also, it is not possible to jump into a loop, even if it has been optimized by the compiler.
Run
Continues execution from the current location.
Run with Break on Return
This command and the next are useful for debugging loops. This command is similar to Run, except that an implicit breakpoint is set to be triggered upon return from the current context. Also, the debugger remains open. Execution stops either upon return from the context, or if another breakpoint is encountered before then. Execution is guaranteed to stop, so runaway loops can be interrupted.
Run with Break Again
Like Run with Break on Return , except that it does not establish a breakpoint to be triggered on return. This option becomes available only after a breakpoint has been set up by Run with Break on Return .
Terminate
Terminates the process being debugged and closes the debugger. This is the same action that occurs when the window is closed using a window close command.
Abort
This command is activated when the code is running, during one of the Step commands or Run with Break on Return . The step has to take a significant time to run before you will notice that the command is available.
Correct menu
Define method
Activated when when the top context is a MNU, this command inserts a new method definition for the not understood selector, which simply calls `halt` . The message is defined in `UndefinedObject` .
Correct selector
Activated when when the top context is a MNU, this command presents a list of suggested correct spellings of the not understood message selector. If the correct selector is in the list, select it, and the command corrects the source code, recompiles the method, then does the send.
Code View Menu
Find...
Prompt for a string of text. Scan the contents of the code view and highlight the next occurrence of the search string.
Replace...
Open a dialog prompting for find and replace strings. Scan the contents of the code view, replacing each occurrence of the Find: text with that of the Replace: text. Options are provided to start at the beginning of the view, at the position of the current selection, and to scan forward or backward.
Undo
Reverse the most recent cut or paste.
Copy
Place a copy of the highlighted text in memory.
Cut
Place a copy of the highlighted text in the paste buffer, then delete the original.
Paste
Delete the highlighted text (if any), then place a copy of the most recently copied or cut selection in that location. To open a dialog presenting the five most recent text segments that have been copied or cut, hold down <Shift> while selecting Paste .
Do it
Execute the highlighted text as a Smalltalk expression. The scope of execution is the selected class, so class variables can be used in the expressions, and self refers to the selected class.
Print it
Execute the highlighted text as a Smalltalk expression and insert the resulting object in the text. The printed string becomes the current selection, so it can be deleted easily.
Inspect it
Same as do it , except an inspector is opened on the resulting object.
Debug it
Opens a debugger on the expression allowing you to step through the execution.
Accept
Compile the code and, assuming no errors are found, place it in the image.
Cancel
Restore the entire text to its condition when it was last compiled (with Accept ).
Format
Impose standard font characteristics and indentation conventions on the code.
Explain
Insert an explanation of the selected literal or variable. The explanation frequently contains a Smalltalk expression that you can execute to get more details.
Insert breakpoint
Inserts a breakpoint probe.
Insert probe...
Opens a probe editor to add a new probe.
Modify probe
Opens a probe editor to modify the selected probe.
Remove probe
Provides submenu items to remove the selected or all probes.
Notifier
A notifier window opens when a program error occurs. The notifier displays the last five message-sends on the execution stack, indicating the message-sends that were waiting for a return when the exception occurred.
The Terminate button closes the notifier and aborts the context stack that raised the error.
The Proceed button closes the notifier and continues execution. This is advisable only when the error is a warning.
The Debug button closes the notifier and opens a Debugger to examine the conditions that led to the failure more closely.
See also:
Debugging Techniques
Resource Finder
Use the Resource Finder to browse and create resource methods. It may be used in conjunction with the User Interface Painter to build application models. To open a Resource Finder, select Browse->Resources in the VisualWorks Launcher window.
Select an application class in the left-hand view to display all corresponding resource methods belonging to that class.
The buttons below the menu options of the Resource Finder enable you to Browse the code for a selected class, Start the main interface (by sending open to the class), Add a blank resource to a new or existing class, Remove a resource, and Edit a resource.
To open a resource in a specialized editor, double-click on the list item or select it and click on the Edit button.
The Resource Finder has a menu bar with three menus: View , Class , and Resources .
The <Operate> menus in the class and resource views contain commands that are identical to the commands available in the drop-down menus.
View Menu
All Classes
Filter and display all classes that contain resource methods. This includes User Interface Painter canvas resources, Lens Data models and the application classes that use them.
User Classes
Filter and display only those classes that are not a part of the base VisualWorks image.
System Classes
Filter and display only those classes containing resources that are a part of the base VisualWorks image.
Recently Visited Classes
Filter and display only those classes that have been recently visited.
Classes By Category...
Display a list of class categories that contain resource-bearing classes. Filter and display only those classes that belong to the category selected from the list.
Sort By Name
Sort the list of resources (right-hand view in the Finder) by name.
Sort By Type
Sort the list of resources (right-hand view in the Finder) by type.
Update
Update the contents of the Resource Finder.
Exit
Exit the Resource Finder.
Class Menu
Start
Open the application currently selected. The model must implement the instance method open , or adhere to the conventions for subclasses of ApplicationModel .
Browse
Open a Hierarchy Browser or Class Browser (depending on your Settings preferences) on the selected model class.
Show Data Forms
Open a LensApplicationStructureView on the selected class. It works for any kind of class, but it's most useful when the selected class is a Data Form or a LensMainApplication . The opened window is a slave of the Finder.
File Out As...
Prompt for a file name and file out the selected class.
Rename As...
Prompt for a new class name. Replace the name in the system dictionary and update the class view.
Remove...
Prompt for confirmation, then delete the selected class and its methods.
Add...
Prompt for a new class name and create a new application class. If the new class created understands the message windowSpec , then the User Interface Painter is opened using that method.
Resources Menu
New Canvas
Open a Canvas Tool on a new canvas object.
New Menu
Open a Menu Editor on a new menu object.
New Image
Open an Image Editor on a new image object.
New Query
Open a Query Editor on a new query object.
New Data Model
Open a Data Modeler on a new data model.
Edit...
Edit the currently selected resource using the appropriate editing tool.
Senders
Open a new browser (a Method Browser) on all methods that invoke the currently selected resource.
Remove
Remove the currently selected resource.
User Interface Painter
Use the UI Painter to create visual specifications for windows. The Painter provides a canvas, on which you arrange widgets, a Palette Tool containing widgets and commands for arranging them, and a GUI Painter Tool , in you set window and widget properties.
You "paint" on the blank canvas by placing and arranging widgets on it to design the window you want in your application. When you install the canvas, the UI Painter produces a specification for the canvas and saves it as a resource method in the application model.
See also:
Canvas
GUI Painter Tool
Palette
Image Editor
Menu Editor
Canvas
The Canvas represents a window in your UI while you are adding and arranging visual components (widgets). It is initially blank, except for the title bar.
To populate the canvas, you select a widget on the Palette and drop it on the Canvas. You can then move the widget around to place it relative to the other widgets.
The Canvas includes an <Operate> menu that duplicates much of the functionality available in the GUI Painter Tool.
Canvas <Operate> Menu
Edit->Copy
Place a copy of the selected widget(s) in the paste buffer.
Edit->Cut
Place a copy of the selected widget(s) in the paste buffer, then delete the original(s).
Edit->Paste
Delete the selected element(s), then place a copy of the most recently copied or cut selection in that location.
Edit->Accept
Preserve the current state of the canvas. This does not update the application model.
Edit->Cancel->confirm
Revert the contents of the canvas to the last saved state.
Edit->Spawn
Open a new User Interface Painter on a copy of the current canvas.
Tools->Image Editor
Open a new Image Editor. If the canvas has been installed, look for a corresponding image resource in the application model.
Tools->Menu Editor
Open a new Menu Editor. If the canvas has been installed, look for a corresponding menu resource in the application model.
Tools->Hot_Regions_Editor
Open a new Hot Regions Editor.
Layout->Fixed
Set the currently selected widget to have a fixed size and position, relative to the top-left corner of the window. Use this command to set relative offsets to zero and make the widget size constant no matter how large the window is.
Layout->Relative
Set the currently selected widget to have a size and placement that is relative to the dimensions of the window.
Layout->Constrained...
Open a positioning dialog for the currently selected widget(s). Set the specified percentages and pixel offsets for the four sides of the widget. For more precise control, use the Position page in the GUI Painter Tool.
Layout->Be Bounded
Convert the selected widget from an unbounded (variable-width) to a bounded (fixed-width) type.
Layout->Be Unbounded
Convert the selected widget from a bounded (fixed-width) to an unbounded (variable-width) type.
Arrange->Snap To Grid
Align the currently selected widget(s) with the grid. Each element is aligned with the nearest grid point. Use the Grid menu to display or change the current grid settings.
Arrange->Group
Group the selected widgets into a single composite element.
Arrange->Ungroup
Ungroup the selected composite element into a group of widgets.
Arrange->Bring To Front
Bring the currently selected element to the front.
Arrange->Bring Forward
Bring the currently selected element forward one layer.
Arrange->Send To Back
Move the currently selected element behind all other elements on the canvas.
Arrange->Send Backward
Move the currently selected element one layer closer to the back.
Arrange->Align...
Open the Alignment dialog for positioning the currently selected group of widgets.
Arrange->Distribute...
Open the Distribute dialog for positioning the currently selected group of widgets.
Arrange->Equalize...
Open the Equalization dialog for adjusting the size of the currently selected group of widgets.
Special->Define Menu as Query
Open a Menu Query Editor. Use this command when building Database applications (Note: Only available when the Database parcel is loaded.)
Painter Tool
Opens or brings to front the GUI Painter Tool.
Palette
Opens or brings to front the Palette.
Install...
Open the Install dialog for the current canvas.
Define...
Open the Define dialog for the current canvas.
Browse...
Open a class browser on the current application.
Open
Opens the current canvas as an application window.
Palette
The Palette is the source of the interface components (widgets) that you add to a canvas. The Palette is opened automatically when you open a canvas.
To place multiple copies of one type of widget on the canvas, use the repeat switch (upper-right corner). As a shortcut to place the Palette in repeat mode, hold down the <Shift> key while selecting a widget.
Use the alignment buttons to position the horizontal and vertical alignment of the selected widgets on the canvas. Use the equalize and distribute buttons to position the spacing and size of widgets on the canvas.
Palette Components
The following widgets are available in the Palette Tool:
Action Button
Triggers a short action, such as printing, saving, deleting, or opening a dialog window.
Check Box
A toggle that enables the user to turn on or turn off some attribute in the application.
Click Widget
A holder of a graphical image that can be clicked on in various areas, defined using the Hot Regions Editor, to make selections.
Combination Box
A user-modifiable input field with a drop-down list of standard field entries. The application user can select from among the standard entries or fill in a nonstandard one. A combo box is similar to a menu button , except that a menu button does not provide an input field for nonstandard entries.
Dataset
A table with extra features such as in-column editing, dynamic resizing of column widths, and easy reordering of columns while the dataset is being added to the interface. In addition, any column in the dataset can be specified to be read-only, an input field , a combo box , or a check box .
Divider
A line segment that can be used to provide visual connection or separation between widgets. A divider is one pixel thick.
Group Box
A rectangle that surrounds groups of related widgets. The sides of the group box are one pixel thick. The group box optionally has a label embedded in its top border.
Hierarchical List
A list that indents list items to show hierarchical relationships.
Input Field
A region for presenting and/or entering data that is only one line long, such as a filename or other string.
An input field provides a customizable pop-up menu for searching and editing the input data. The user activates this menu using the <Operate> mouse button. Input fields can be made read-only, so that text can be displayed but not entered.
Label
A single line of text or a graphic image used as general titles, or in conjunction with another widget, such as a field, to describe that widget's purpose. For a multiline label, use a read-only text editor .
List
A list widget is useful for displaying any collection of objects. As an input device, the list enables the user to select one or more elements in the list as targets for operations such as browsing.
Lists have a built-in search ability, so the user can type the beginning letters of an item to find it in a large list (<Escape> starts a new search).
Menu Button
Provides the user with a well-defined set of options. A menu button can present a menu of commands or a menu of values. It is similar to a submenu in a menu bar, with two advantages: it can be placed anywhere on the canvas, and its label can change to reflect the current selection. A menu button is more visible to the user than a pop-up menu, but it uses space in the canvas.
Notebook
A means of presenting a hierarchy of information. The hierarchy may have one or two tiers, which are called the notebook's major and minor keys, respectively.
The minor keys either refine the subdivision imposed by the major keys or filter the information along a separate dimension. They may be connected to the major keys in such a way that each major key may display a different set of minor keys.
Percent Done Bar
A bar used to graphically represent the percentage of a task completed.
Radio Button
Enables the user to make a single selection from a limited list of choices. Selecting a radio button causes any other button in its group to be deselected.
Region
A shape that surrounds a group of widgets. A region may be rectangular or elliptic. Its borders can be one of four thicknesses, and its interior can be filled with a color.
Resizing Splitter
A divider that can be selected and moved to resize the panes or widgets to either side. Used to make resizable window panes.
Slider
A device for selecting and displaying a value from a range of values, such as the volume setting for a music program.
Spin Button
A widget for cycling through selectable options.
Subcanvas
An interface that has been included or embedded in another interface. A subcanvas can itself include another subcanvas, nesting as many levels as desired within the parent interface.
Tab Control
An alternative notebook widget with folder style tabs
Table
A means of displaying data that can be organized usefully in rows and columns. By default, a table is bordered and has both vertical and horizontal scroll bars.
Text Editor
A region for displaying and editing text. Built-in facilities are provided for line wrapping, changing the text style, cutting, copying, pasting, searching and replacing, undoing, and optionally executing Smalltalk expressions.
Tree View
An expandable/contractable, hierarchical list.
View Holder
A means of including a graphic image in an interface.
GUI Painter Tool
Use the GUI Painter Tool to set the properties of each widget on a canvas. The set of properties varies with each type of widget. For example, an input field can have a menu while a check box cannot.
The widgets on the current canvas are listed in the Tree View on the left. Grouped widgets are indicated an indented sub-list, or branch. By ordering widgets in the list, you set the tab order of widgets, from top to bottom.
Use Apply or press <Return> to apply the properties to the widget. The Prev and Next buttons can be used to move the tool's focus to another widget in the canvas, saving you the trouble of shifting the focus via the mouse.
Widget properties are organized in these categories: Basic , Details , Validation , Notification , Color , Position , Drop Source , and Drop Target .
Note: not all types of widgets have all these properties.
The menu bar contains the following menus: Edit , Tools , Layout , Arrange , Grid , Look , and Special .
See also:
Defining user interface support
Basic Properties
Aspect
Name of the method that the widget uses to fetch its value holder from the application model.
Label
Either the text that identifies the widget and forms a part of it, or the name of a method that supplies a graphic (provided that the Label Is Image property is also selected.
Label Is Image
Specifies that the widget is to be identified by a graphic used in place of a textual label. The method that supplies the graphic must be specified in the Label property.
ID
A symbol used to reference the widget programmatically.
Details Properties
Font
The font used for text in the widget's label or for any other text displayed by the widget. You can choose:
System
, which provides the font that matches the current platform's system font, if there is one.
Default
, which provides the font that is currently selected on the Text page of the Settings Tool.
Large
, which provides a font that is slightly larger than the default.
Small
, which provides a font that is slightly smaller than the default.
Fixed
, which provides a fixed-width font (useful for aligning text in columns).
Bordered
Specifies whether the widget is to be surrounded by a solid box.
Opaque
Specifies that the widget obscures any portion of any other widget it overlaps. Use this property used with passive widgets (such as regions, group boxes, dividers, etc.) for artistic effect.
Can Tab
Specifies that the user can transfer focus to the widget by tabbing. When a widget has focus, any keyboard input is directed to it.
Initially Disabled
Specifies that the widget is disabled when the interface is opened, overriding the focus policy.
Initially Invisible
Specifies that the widget is invisible when the interface is opened.
Validation Properties
Entry
Symbolic name for the widget's entry validation callback.
Change
Symbolic name for the widget's change validation callback.
Exit
Symbolic name for the widget's exit validation callback.
D. Click
Symbolic name for the widget's double-click validation callback. This property appears with List and Table widgets only.
Notification Properties
Entry
Symbolic name for the widget's entry notification callback.
Change
Symbolic name for the widget's change notification callback.
Exit
Symbolic name for the widget's exit notification callback.
D. Click
Symbolic name for the widget's double-click notification callback. This property appears with the List and Table widgets only.
Color Properties
V
Value of the selected color.
S
Saturation of the selected color.
H
Hue of the selected color.
Read
Displays the colors that are currently assigned to the four color zones for the selected widget on the canvas.
Foregrnd
Specifies whether to assign the selected color to the widget's foreground color zone. Clicking on the Foregrnd button toggles between assigning the selected color and assigning no color ( none ).
Backgrnd
Specifies whether to assign the selected color to the widget's background color zone. Clicking on the Backgrnd button toggles between assigning the selected color and assigning no color ( none ).
Selection Foregrnd
Specifies whether to assign the selected color to the widget's selection foreground color zone. Clicking on the Selection Foregrnd button toggles between assigning the selected color and assigning no color ( none ).
Selection Backgrnd
Specifies whether to assign the selected color to the widget's selection background color zone. Clicking on the Selection Backgrnd button toggles between assigning the selected color and assigning no color ( none ).
Position Properties
L
Positioning choices (proportion and offset) for the left edge of the selected widget.
T
Positioning choices (proportion and offset) for the top edge of the selected widget.
R
Positioning choices (proportion and offset) for the right edge of the selected widget.
B
Positioning choices (proportion and offset) for the bottom edge of the selected widget.
Proportion
Fraction of the window's width or height that precedes the widget's edge. Specify a value from 0 (the position of the left or upper window edge) to 1 (the position of the right or lower window edge). The proportionally-determined position can be further adjusted by the offset .
Offset
Number of pixels to adjust the widget's edge from the proportionally determined starting position. A positive offset adjusts the edge rightward or downward from the proportional setting. A negative offset adjusts leftward or upward from a nonzero proportion. An offset of 0 causes the position of the widget edge to be determined entirely by the proportion.
Drop Source Properties
Drag Ok
Symbolic name for the message that queries whether to initiate a drag and drop from the widget.
Drag Start
Symbolic name for the message that initiates the drag and drop.
Select on Down
Specifies the effect of pressing the mouse button down in a drop source list. Enable this property to allow the user to perform drag and drop as a single gesture.
Drop Target Properties
Entry
Symbolic name for the message to be sent by the DragDropManager when the user drags the mouse pointer into the widget's bounds.
Over
Symbolic name for the message sent by the DragDropManager while the user moves the mouse pointer within the widget's bounds.
Exit
Symbolic name for the message that is sent by the DragDropManager when the user moves the mouse pointer out of the widget's bounds.
Drop
Symbolic name for the message that is sent by the DragDropManager when the user releases the mouse button with the pointer inside the widget's bounds.
Edit Menu
Copy
Place a copy of the selected widget(s) in the paste buffer.
Cut
Place a copy of the selected widget(s) in the paste buffer, then delete the original(s).
Paste
Delete the selected element(s), then place a copy of the most recently copied or cut selection in that location.
Accept
Preserve the current state of the canvas. This does not update the application model.
Cancel
No effect--use Cancel->confirm .
Cancel->confirm
Revert the contents of the canvas to the last saved state.
Spawn
Open a new copy of the current canvas.
Tools Menu
Palette
Bring the Palette to the front.
Image Editor
Open a new Image Editor. If the canvas has been installed, look for a corresponding image resource in the application model.
Menu Editor
Open a new Menu Editor. If the canvas has been installed, look for a corresponding menu resource in the application model.
Reusable Data Form Components
Open a Palette with widgets that are predefined for use in data forms.
Layout Menu
Window->Fixed Size
Fix the size of the window specification to always open with the dimensions of the current canvas. Make sure no widgets are selected when you issue this command. Use the Install... command to save the setting.
Window->Min Size
Constrain the minimum size of the window specification to always open with at least the dimensions of the current canvas. Make sure no widgets are selected when you issue this command. Use the Install... command to save the setting.
Window->Preferred Size
Set the preferred size of the window specification to be the dimensions of the current canvas. Make sure no widgets are selected when you issue this command. Use the Install... command to save the setting.
Window->Max Size
Constrain the maximum size of the window specification to be at most the dimensions of the current canvas. Make sure no widgets are selected when you issue this command. Use the Install... command to save the setting.
Window->Clear All
Reset all size preferences in the window specification. By default, the minimum size of the window is 40 by 20 pixels, the preferred size is set to the current canvas size, and there is no maximum size constraint.
Fixed
Set the currently selected widget to have a fixed size and position, relative to the top-left corner of the window. Use this command to set relative offsets to zero and make the widget size constant no matter how large the window is.
Relative
Set the currently selected widget to have a size and placement that is relative to the dimensions of the window.
Constrained...
Open a positioning dialog for the currently selected widget(s). Set the specified percentages and pixel offsets for the four sides of the widget. For more precise control, use the Position page in the GUI Painter Tool.
Be Bounded
Convert the selected widget from an unbounded (variable-width) to a bounded (fixed-width) type.
Be Unbounded
Convert the selected widget from a bounded (fixed-width) to an unbounded (variable-width) type.
Arrange Menu
Snap To Grid
Align the currently selected widget(s) with the grid. Each element is aligned with the nearest grid point. Use the Grid menu to display or change the current grid settings.
Group
Group the selected widgets into a single composite element.
Ungroup
Ungroup the selected composite element into a group of widgets.
Bring To Front
Bring the currently selected element to the front.
Bring Forward
Bring the currently selected element forward one layer.
Send To Back
Move the currently selected element behind all other elements on the canvas.
Send Backward
Move the currently selected element one layer closer to the back.
Align...
Open the Alignment dialog for positioning the currently selected group of widgets.
Distribute...
Open the Distribute dialog for positioning the currently selected group of widgets.
Equalize...
Open the Equalization dialog for adjusting the size of the currently selected group of widgets.
Grid Menu
On
Enable the widget alignment grid.
Off
Disable the widget alignment grid.
X Only
Enable only the vertical grid lines.
Y Only
Enable only the horizontal grid lines.
Hide
Hide the widget alignment grid.
Show
Show the widget alignment grid. Note that the grid may be displayed even if it is not active.
Show If On
Only display the grid when it is enabled. When X Only or Y Only settings are enabled, only display the corresponding lines.
Grid Size 2
Set the grid resolution to be 2 canvas points.
Grid Size 4
Set the grid resolution to be 4 canvas points.
Grid Size 8
Set the grid resolution to be 8 canvas points.
Grid Size ...
Open a dialog and prompt for the grid resolution.
Keep In Window
Toggle a fence around the edge of the canvas, preventing any element from being dragged outside its bounding box.
Look Menu
Auto Select
Set the current canvas to automatically select its look to be appropriate for the target platform.
OS/2 CUA
Set the look of the canvas to the OS/2 CUA style.
Default Look
Set the look of the canvas to that of the current platform.
OSF Motif
Set the look of the canvas to the OSF Motif style.
MS Windows 3
Set the look of the canvas to the MS-Windows 3.x style.
Macintosh
Set the look of the canvas to the Macintosh System 7.x style.
MS Windows 4
Set the look of the canvas to the MS-Windows 95/NT style.
Special Menu
Define Menu as Query
Open a Menu Query Editor. Use this command when building Database applications (Note: Only available with the Database parcel is loaded.)
Canvas Tool Buttons
[Icon: Align Through Top]
Align the selected widgets along a horizontal line. Compute the alignment position as the top edge of the merged bounding box of all selected elements. For more precise control, use the Arrange->Align... command on the menu bar.
[Align Through Middle]
Align the selected widgets along a horizontal line. Compute the alignment position as the middle of the merged bounding box of all selected elements. For more precise control, use the Arrange->Align... command on the menu bar.
[Align Through Bottom]
Align the selected widgets along a horizontal line. Compute the alignment position as the bottom of the merged bounding box of all selected elements. For more precise control, use the Arrange->Align... command on the menu bar.
[Align Through Left]
Align the selected widgets along a vertical line. Compute the alignment position as the left edge of the merged bounding box of all selected elements. For more precise control, use the Arrange->Align... command on the menu bar.
[Align Through Center]
Align the selected widgets along a vertical line. Compute the alignment position as the middle of the merged bounding box of all selected elements. For more precise control, use the Arrange->Align... command on the menu bar.
[Align Through Right]
Align the selected widgets along a vertical line. Compute the alignment position as the right of the merged bounding box of all selected elements. For more precise control, use the Arrange->Align... command on the menu bar.
[Distribute Top to Bottom Edges]
Evenly space the selected widgets in a column. Compute the spacing between the edges of the widgets. For more precise control, use the Arrange->Distribute... command on the menu bar.
[Distribute Top to Bottom Centers]
Evenly space the selected widgets in a column. Compute the spacing between the centers of the widgets. For more precise control, use the Arrange->Distribute... command on the menu bar.
[Distribute Left to Right Edges]
Evenly space the selected widgets in a row. Compute the spacing between the edges of the widgets. For more precise control, use the Arrange->Distribute... command on the menu bar.
[Distribute Left to Right Centers]
Evenly space the selected widgets in a row. Compute the spacing between the centers of the widgets. For more precise control, use the Arrange->Distribute... command on the menu bar.
[Equalize Height]
Equalize the height of the selected widgets. For more precise control, use the Arrange->Equalize... command on the menu bar.
[Equalize Width]
Equalize the width of the selected widgets. For more precise control, use the Arrange->Equalize... command on the menu bar.
Install...
Create an interface specification for the current canvas and install it as a resource method in the application model. A dialog prompts for the class of the application model and the selector of the resource method, allowing you to create new ones.
Define...
Define an instance variable and accessor method for each selected widget. Prompt with a dialog listing the names of aspects and actions to be created in the application model. Toggle the check marks next to each aspect to prevent overwriting the existing accessor method in the model class.
Browse...
If a widget is selected, open a method list browser on all methods in the application model that refer to the widget's value model. If no widget is selected, and if the canvas has an application model, open a hierarchy browser on the application model class.
Open
Start the application. Equivalent to selecting open in the canvas <Operate> menu.
Image Editor
Use the Image Editor to create and modify simple bitmap illustrations and masks. To open an Image Editor, select Tools->Image Editor either from the VisualWorks Launcher window, or from the GUI Painter Tool.
The Image Editor has a menu bar with three menus: Image , Edit , and Draw .
Image Menu
Capture
Prompt for a region of the screen and capture it in the editor window.
Load...
Prompt for the name of a resource method (class & selector name) and load its contents into the image editor. Default to the application model currently being edited in the User-Interface Painter.
Install...
Prompt for the name of a resource method (class & selector name) and install the current image, overwriting the selected method. Install a mask if the Store B&W Mask setting is enabled.
Read
Read an image from the currently selected widget on the current active canvas.
Apply
Install the image directly onto the current (single) selection on the currently active canvas. Create an appropriate resource method for the class that holds the canvas. The selected widget must accept a label property.
Store B&W Mask
Toggle the setting that controls storing the image as a black & white mask. The image will be converted to a mask when it is installed.
Store Cached Image
Toggle whether a CachedImage is used to hold the image. Enable the use of a CachedImage to speed up image display.
Resize Image
Specify a new shape and size for the image being edited; prompt for a rectangle which can both clip and overlap the current image.
Edit Menu
Cancel
Cancel any changes, reverting the image to last state preserved with the Accept command.
Accept
Preserve a copy of the current state of the image being edited.
Copy
Prompt for a rectangular region of the image editor and copy it to the paste buffer.
Cut
Prompt for a rectangular region of the image editor and remove it, saving a copy in the paste buffer.
Paste
Prompt for a coordinate and copy the contents of the paste buffer to the image.
Draw Menu
Fill Rectangle
Prompt for a rectangular region of the image editor and fill it with the selected color.
Replace Color
Prompt for a color from the image and replace it with the currently selected color. Replace every occurrence of the color.
Color to B&W
Produce a mask by substituting black for any non-white colors in the current image.
See also:
Images, Cursors, and Icons
Menu Editor
Use the Menu Editor to create and edit menus, and to install menu specifications in application models. To open a new Menu Editor, select Tools->Menu Editor in the VisualWorks Launcher window.
By selecting a menu item in the left-hand view, all properties that belong to it are displayed in the right-hand view. The three groups of menu properties ( Basic , Details , and Default ) may be selected using the tabs along the bottom of the properties view.
The iconic buttons are short-cuts for various commands on the menu bar.
The Menu Editor has a menu bar with five menus: Menu , Edit , Move , View , and Test .
Menu
New
Clear the Menu Editor of the current menu and prepares for a new menu.
Load...
Load a menu from a specified class and selector into the Menu Editor.
Install...
Prompt for the method selector and class name where menu specifications are stored.
Read
Edit a menu that has been applied to a selected widget.
Apply...
Apply the menu in the Menu Editor to an associated canvas.
Exit
Quit the Menu Editor.
Edit Menu
New Item
Create a new top-level menu item. If a sub-level menu item is selected, the Menu Editor creates a new item at the selected level.
New Submenu Item
Create a new submenu item.
Add Line
Insert a divider line between two menu items.
Cut
Delete the selected menu item and place it into the paste buffer.
Copy
Copy the selected menu item into the paste buffer.
Paste
Place a cut or copied menu item after the selected menu item.
Delete
Delete the selected menu item.
Move Menu
Up
Move the selected menu item (and all its submenus) one level up in the hierarchy of the menu.
Down
Move the selected menu item (and all its submenus) one level down in the hierarchy of the menu.
Right
Make the selected menu item a submenu of the item above it.
Left
Move the selected menu item out one level in a hierarchical menu structure.
View Menu
Sample Menu Bar
Open a window that contains a test version of the menu bar that is currently entered in the Menu Editor.
Test Menu
Display the appearance of the menu currently entered in the Menu Editor.
Basic Properties
Label (Default)
Text of the menu item's label. Placing an & before a character creates a mnemonic key for that menu item. Mnemonic keys allow menu actions to be executed by keyboard keystrokes. To execute a mnemonic, press and hold the <Alt> key while pressing the mnemonic key.
Value
Name of the method that will perform the menu item's action.
ID
An identification for programmatic manipulation of the menu item. It specifies a Smalltalk symbol that you can use to reference the menu item.
Details Properties
Shortcut character
The keyboard shortcut (or accelerator key) for the specified menu item. Press and hold the <Alt> key while pressing the shortcut character to execute the menu item command.
Label image
The graphic image used in place of, or in combination with a textual label for the menu item.
Default Properties
On/Off Indicator
Prefix a check box as a toggle indicator to the menu item if the Initially on or Initially off radio buttons are selected.
Initially enabled
Enable or disable the menu item.
Initially hidden
Visually remove the menu item when this switch is turned on.