TweetFollow Us on Twitter

November 92 - Software Review - Ad Lib 1.0b4

Software Review - Ad Lib 1.0b4

Jeffrey J. Barbose

First there was text-based (Rez) creation of 'view' resources for MacApp development. Then came ViewEdit: graphical creation of views. Simple 'view' format, simple tool. Next was IcePick, which pushed the state of the art of graphical editing systems, exploiting every nook and cranny of the MacApp 2.0 'view' definition with style, finesse and power. When MacApp 3.0 and the new robust and highly functional 'View' format came along, IcePick dropped the ball, to this day still not providing for direct creation of 3.0 views. The kludgy mechanisms provided by Apple to maintain compatibility with 2.0-view formats, coupled with the fact that use of the new view format provided substantial conceptual and productivity gains forced a reticent retreat to buggy, awkward yet 3.0-view-supporting ViewEdit.

Prayers for an alternative to ViewEdit for editing 3.0-views ostensibly had been answered with the introduction of Ad Lib. Arguably, it exploits all the goodies associated with 3.0 'View's, but with a confusing menu bar, scattered access to view attributes and some rough edges on the data entry mechanisms, it's certainly no panacea for view-editing woes. Put another way, it represents one step up and two steps back in MacApp view editing.

Overview

The Menu Bar

One of Ad Lib's more confusing qualities is the layout of its menus, which will be described in detail. But first, a cursory look:
  • File – in addition to the standard HIG-compliant menu items, a Preferences item is available. (Figure 1)
  • Edit – includes items for clipboard-base manipulation of views as well as several view-specific items for creating, opening and accessing information in views.
  • View – not to be confused with a menu that contains items for 'View' manipulation, this menu rather provides for customization of behavior of Ad Lib itself with respect to how the 'View's being built are displayed.
  • Object – this menu provides for the manipulation of 'View's with respect to their hierarchy, inheritance, placement and attachments.
  • Window – provides access to Ad Lib's floating windoids (see Figure 2), and also contains the list of all currently open windows.
As you can see, direct 'View' manipulation is spread out over three of Ad Lib's five menus, requiring the user to memorize their locations. Some reorganization is in order here.

The Floating Windows

Ad Lib uses three separate floating windows (or windoids) to provide special functionality (see Figure 2):
  • Object Palette – a very well done-if non-standard-presentation of all possible MacApp standard view types. Each view type is represented by an icon well (much like Double Helix™'s icon wells or the tab-wells found in many word-processors' rulers). New views are added by dragging the icon for the desired view type into the view-in-progress, where they can subsequently be placed and resized.
  • Attributes – contains most view-specific attributes. Another point of confusion arises here: why not put all attributes within this windoid? Instead of having such access to all view-specific attributes, the user must select the Class Hierarchy item from the Object Menu, which produces a hierarchical menu specific to the selected 'View's inheritance. (There is, however, an interesting and very helpful behavior having to do with en masse view editing that will be explained later.)
  • Information – in the unzoomed configuration, it provides only the coordinates of the current mouse position, expressed relative to the currently selected view. When zoomed out (which should be the default), it also provides a magnifying-glass or 'fat-bits' view in the cursor's neighborhood. This is invaluable for lining up view boundaries and for resolving aesthetic anomalies.

The Cool Stuff

Ad Lib significantly extends the boundaries of resource-creation tools, both in terms of bridging the gap between static resource editor and dynamic environment, and providing context-specific 'intelligence'.

At first blush, apparently (and conspicuously) missing is the functionality of IcePick's famed 'Run-Time Mode', in which the views could be 'run' to see what they'd look like and how they'd perform (in limited ways), without having to incorporate them into an executable application. Instead, Ad Lib provides the means of attaching TAdorners, TBehaviors, TDrawingEnvironments, etc., to the views at the resource level (thanks to 3.0-'View's), and further provides what the documentation calls handlers "…[which] are powerful, general purpose behaviors that allow your views to respond to specific messages by sending new messages to various objects within your program." (Ad Lib Preliminary Documentation).

These handlers are somewhere in between TCommands and TBehaviors in their functionality. They respond to messages or triggers (e.g., button hits, menu selections), and consequently generate an event or perform a simple action.

Ad Lib allows for view run-time testing by using MacApp itself to run the prototyped views, along with their associated behaviors, adorners, handlers, and so on. Several source files ship with Ad Lib that extend MacApp to support behaviors-as-resources, as well as for attaching behaviors to the application object itself. To the point, a bare-bones TApplication-specifically, the derived class TBehaviorApp which ships with Ad Lib-becomes the testing environment for nascent views.

With MacApp 3.x, text strings and style information for views were moved into separate resources, allowing such information to be shared among any views in the application. Ad Lib does some serious bookkeeping for you with these resources, in that it checks for identical resources and opts to use those instead, eliminating redundancy. In Ad Lib, text and style information is entered directly, as you would in any word processor or text editor. This mechanism is far superior to ViewEdit's two-step method of creating text and style resources and associating them with views through resource IDs. Ad Lib will then create (or reference, if the resource already exists) the appropriate resources for you. There are some caveats to watch out for when editing these resources outside of Ad Lib, but Ad Lib uses an internal time-stamp and so can detect when changes were made by another editor. If the file was, in fact, changed by another appli-cation, Ad Lib suggests a rebuilding of the resource count tables (see Figure 3) before proceeding (this is highly advised in order to avoid text and style resource corruption).

The Paradigm

For all its attention to making the minor things work according to standard Macintosh Interface Guidelines (as in direct entry of text strings and styles), Ad Lib takes on an odd, pseudo-modal paradigm in navigation of the created view tree(s). Rather than providing an addition view (Á la the Finder's Outline View or IcePick's Hierarchy View) for traversal, Ad Lib instead has a double-click, separate-window mechanism for discerning, navigating and altering the view hierarchy. This user action, when used repeatedly to chase down deeply-nested views, results in quite a number of stacked windows (which later need to be closed manually). It smacks, oddly enough, of WordPerfect 1.0's penchant for nested dialogs and old-style DOS-like menu screens. Some people may find this the most natural and comfortable way of doing things, but judging by the praise heaped on the System 7 Finder's Outline View, I'd say they were in the minority.

The Hooks

As mentioned above, Ad Lib ships with several source code files (see Figure 4), including an example of how to use Ad Lib and the MacApp derived classes as a run-time view testing environment. The files contained in the 'MacApp Extensions' Folder implement the functionality that Ad Lib's handlers require. The following classes are supplied:
  • THandlerBehavior – derived from TBehavior, provides Ad Lib-style message handling (user-defined actions) to your objects;
  • TBehaviorApp – attaches any behaviors (specifically 'BHVR' resources) to the application object;
  • TBroadcastCmdKey, TCmdKeyBehavior – proves an easy mechanism for attaching command-key equivalents to your controls;
  • THandlerInitMsgCmd – used internally to initialize handler messaging;
  • HScratch – used internally as temporary storage for messaging information.

The 'Prototyping Example' Folder contains the files necessary for building an application called ProtoApp. ProtoApp can be used as the environment for run-time testing of your views (and related resources) by adding the code for any behaviors you may have created and including your view resources to it.

Provided as an example of specific view testing is TestApp. By following the instructions in the README file, a ProtoApp is built and the specific view resources for TestApp are then simply rezzed into it.

Ad Hoc Ad Lib

A better feel for Ad Lib can be had by specific examples. To that end, Ad Lib will be put through its paces, both in its view sketching mechanics and usability, and in terms of its organizational and informational facilities.

A Simple(?) Scrollable Window

One of the most common view types in any Macintosh application is the standard horizontally- and vertically-scrolling window. Once Ad Lib is launched, the user is presented with an empty window which contains a list of the newly created views (see Figure 5). This is the dialog that's presented every time a new window or new view is created using the Edit menu (subviews, however, are almost always created from the Object Palette). As you might expect, the resource ID is suggested by Ad Lib for each view/window to avoid duplicates.

After this dialog is dismissed, an empty window appears on the screen (see Figure 6 on the next page). With Ad Lib, windows are created like any other view, and displayed as such (unlike IcePick and ViewEdit, where the TWindow is a special case). To access or change the specific attributes of the window, open the Attributes windoid from the Window Menu. This floating window contains the only the most frequently accessed attributes of a TWindow. Here you can set size, position, title and WDEF number, among other basic things. To access the remaining TWindow attributes, go to the Object Menu's Class Hierarchy item. Here you will see, in reverse order, the complete inheritance of the currently-selected object (in this case, TWindow). Selecting from this hierarchical menu presents a dialog containing the specific definable fields (see Figure 7 on the next page). This mechanism presents some serious difficulties to the new Ad Lib user, since all attributes are not in any one place. Also notice that the information contained is not mutually exclusive (see Figure 7). ViewEdit's approach to this, while mechanically cumbersome, makes more sense to the user in that all view information can be accessed in one place.

Before creating any view hierarchy, Ad Lib's utility windoids should be used (available from the Window menu):

  • show the Object Palette windoid;
  • show the Information windoid and zoom it out so that the magnifier view is also shown;
  • show the Attributes window. Get in the habit of supplying necessary information (like view ID) as soon as the view is added to the hierarchy.

To make this window scroll properly, we need to create the familiar MacApp hierarchy: the main subview of the window is a TScroller, which extends from the origin of the content region to the topLeft of the GrowIcon; the TScroller should be set to sizeRelativeSuperView in both dimensions; and a single TView (sizeFixed or sizeVariable) drawn inside the TScroller that will serve as the root view for the enclosed view hierarchy. Ad Lib takes an interesting perspective on TScrollers: they are considered attachments to a view, like Adorners or Behaviors, not equals with other view types. Consequently, the approach to creating a scrolling view is this:

  • Drag a TView icon from the Object Palette and drop it in the window.
  • In the Attributes windoid, give the view a unique ID (such as 'main'), and set the location to (0,0). You'll see the small TView change location as you do this.
  • Grab to bottom right handle of the new view and drag it down to the upper left of the GrowIcon. As the first attempt at aligning it properly, just get it near to the GrowIcon and then use the magnifier view to fine tune. (see Figure 8) Notice that the Information windoid shows current cursor position, the magnified view of area around the cursor, and the ID of the view that the cursor is presently in.
  • Since the TView is already selected, select the 'Scroller…' item from the Object menu. Again the user is presented with only the most frequently used attributes to edit. Here, the scrollability of the view can be set (the user must check the 'View Has Scroller' box since it defaults to false), as well as the number of scrollbars (if any) and some of their attributes. (see Figure 9next page )
  • To access additional fields of the scroller (it is frequently necessary to access the TView-level fields of TScrollers), you must select the TView item from the Class Hierarchy item of the Object menu. The TScroller's ID must be set. For a scrolling resizable window, the TScroller's size determiners must be set to 'Relative to Superview', so that the scroller's size always changes when the window is resized. Note that the size determiners of the TView to which this TScroller is attached should be set to something other than sizeRelativeSuperview or to sizeSuperview; otherwise, there's no need for scrolling!

This is a lot of work to do, just to get basic scrolling into a standard Macintosh window. The process would be much more efficient here if access to attributes was collected into or accessible from a single place. The notion of a scroller being an attachment to a view turns out to be more encompassing than the traditional notion of TScrollers treated as just another view type: by attachment of a conceptual scroller, one gets the scrollbars and enclosed view as a single addition. Some mechanization of the process of attaching a scroller would also speed things up considerably. Ad Lib could easily prompt the user for all the necessary information, or better, have a canned scrollable view or window available.

In lieu of that, included on the Frameworks Disk Subscription for this issue is a file named 'Simple Window.view'. This file contains the view resource defined and created above.

Complex Ad Libbing

Development of complex views using Ad Lib presents unexpected challenges, as well as benefits. Creating complex view resources involves three primary activities:
  • View sketching and view hierarchy traversal;
  • Attachment of needed resources (Behaviors, Adorners);
  • Wiring the views and their resources into TBehaviorApp for testing (and as final implementation, in some cases).

The most glaring omission from Ad Lib's view editing arsenal is that of an outline view for traversing and editing the nascent 'View' hierarchy. Instead, it offers two distinct ways of accessing views-within-views, depending on whether the 'Subview Access' item in the View menu.

First, the view hierarchy can be 'flattened', so that all subviews are accessible by clicking on them while the 'Subview Access' item is on. This kind of direct access works in most cases, but can get cumbersome and even confusing when the hierarchical arrangement is crucial to the operation of the view (such as radio buttons within a cluster). For instance, if 'Subview Access' is on, newly added views become subviews of the view that they're dropped into. If 'Subview Access' is off, the views are added as direct subviews of the window (or topmost view, if there's no window). To add to the confusion here, views can be brought to the front or moved to the back, neither of which changes the actual view hierarchy.

The alternative way of traversing and editing the hierarchy is with the 'Subview Access' item off. In this 'mode', only the views which are direct subviews of the current view can be selected. When a view is selected and the View menu item 'Edit Subview' is chosen, a new window opens. This new window is a placeholder for the subviews of that selected view. In Figure 10, the window entitled "<TCluster>" represents the extent of the cluster behind it and contains the cluster's subviews, namely, three checkboxes.

While this second method clears up any ambiguities in hierarchical organization, for deep view trees the screen can get cluttered with stacked placeholder windows very quickly (anyone remember WordPerfect for Macintosh 1.0?)

By selecting multiple views, certain mathematical alignment operations can be performed on the views as a group. (Figure 11) While adequate for basic cases, this method of auto-alignment falls far short of IcePick's Aligning, Spreading and Same-Sizing of clustered controls/views.

Attachment of additional resources to the views is accomplished mostly from within the Object menu using various dialogs to supply needed information. Adorners and Behaviors are added by a similar mechanism. Through respective dialog boxes, they can be specified, added, removed and ordered. For example, in ViewEdit, the ordered firing of adorners was limited to 'First', 'Last', 'Before' or 'After'. Here, the order of adorners in the dialog's list determines the exact order in which adorners will be called (see Figures 12a, 12b). Plus, Ad Lib automatically adds an instance of THandlerBehavior (described above) to each view to which handlers have been added (see Figure 13). Simple attachments like Drawing Environments, Balloon Help references and text (where applicable) are available through equally simple dialogs.

Ad Lib handlers are also added through a dialog, but the purpose in adding handlers is to provide 'wiring' to your views for the run-time environment. Ad Lib supplies the code, handlers and message types for several common triggers: Apple Command, Command Key, Event, Idle, Initialize, Key Down, Key Up, Menu Command, Mouse Down, Mouse Up, Setup Menus and Update. The trigger type is selected from a popup menu and added to the handler list with a button click. Upon adding a trigger, additional information must be supplied, most importantly the action that this handler should take upon receiving the message. These actions are: Add Dependent, Close, Close & Free, Depends On, Doesn't Depend On, Enable Menu, Forward Message, Open Window, Pose Modal Dialog, Remove Dependent, Send Event, Send Menu Command, Send Update, Set User Value and User Defined. Most of these action types aren't documented (in the beta docs), but their meanings can be gleaned, if not simply by their name (e.g., Open Window) then by the nature of the information requested. A target must be specified in many cases (such as any of the 'Send…' actions). Valid targets are: Application, Document, Self, Subview, Superview, Target Chain, View, View (by Window), Window and Window (by ID). A short text description of the specific action can be supplied as well (see Figure 14).

This method of entry proves difficult in some situations because certain conventions must be followed to insure the proper flow of messages within the handler system. For instance, two handlers for each menu item must be created, namely a 'Setup Menu' handler to deal with enabling the menu item and a 'Menu Command' handler to dispatch the message to the proper resources and targets. For each of these operations, the user must not only be sure that all menu items are taken care of, but that a dummy handler forwards the message to 'self' (for those times when the message is to be resignaled or wasn't serviced by any handler). If you have a solid grasp of MacApp-style event handling chains, there really isn't a conceptual problem here. The difficulties arise in entering all this information through a dialog/list interface. Graphical entry of the messaging passing/routing chains would make more sense here.

Also included on the Frameworks disk is 'Complex Window.view'. It includes a simple window (containing a TPicture), the complex-view window described above, and a handful of other resources that were required as add-ons to ProtoApp:

  • an 'MBAR' resource (ID=128);
  • a 'PICT' resource, used in the TPicture views;
  • a 'CMNU' resource (ID=4) to supply menu items (which trigger the opening of our windows).

After adding these resources to the Ad Lib .view file (and having already built ProtoApp), it was a simple task of Rezzing it together with the ProtoApp file to produce a working application (drag the files 'Complex Window.view' and 'Amoco.r' to the 'Prototyping Examples' Folder within your Ad Lib folder)-far less effort than I had originally expected.

Ad Lib::DoPostCreate()

In general, Ad Lib does a very good job of helping to create, edit and manage all of data that 3.0 'View' resources are equipped to deal with. Usability could be significantly improved by a simple reorganization of the menubar, but perhaps the greatest improvements lie in consolidation of access to view attribute fields. As it stands, the user is often required to look in two places-sometimes many more places-to edit attribute fields of interest. And note that each of those places is a modal operation, something not looked highly upon by the Human Interface Police (and with good reason).

Small, but important, improvements can be made in automating some of the tasks into gestalts. For instance, in the creation of a scrolling view, the user could be prompted for pertinent information at the time the scroller is attached to a given view (and this is yet another place that better access to attributes would help, with or without automation).

However, I don't feel comfortable in ending a review of Ad Lib with criticism. It's a fine first version, and its coverage of 3.0-View enhancements is impressive indeed. Some of the paradigms it introduces, while not altogether traditional or standard, work quite well once grasped.

Given the current choices-use ViewEdit, go the IcePick->ViewPromoter->manual-hacking-of-view-attachments route, or get Ad Lib and use it immediately-well, there really is no question. And, for now, there really is no other editor besides Ad Lib. n

Thanks to G. Gordon Apple for his postings on AppleLink demonstrating certain caveats and to-dos associated with attaching scrollers and with post hoc deleting of scrollbars. Thanks also to Tom Tulinsky for prompting certain specific investigations into Ad Lib.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »

Price Scanner via MacPrices.net

Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more

Jobs Board

Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.