TweetFollow Us on Twitter

IAC Toolkit 2
Volume Number:7
Issue Number:8
Column Tag:Tools of the Trade

UserLand's IAC Toolkit

By Neil Ticktin, Los Angeles, CA

About the author

[Neil is the President of The Truin Group -- a consulting and software development firm in Los Angeles. He is one of the authors of Extender DialogHandler by Masters Publishing and has been developing Macintosh software and writing technical documentation since 1986.]

What is IAC Toolkit?

UserLand’s IAC Toolkit is an Application Program Interface (API) and system software for adding interapplication communication (IAC) to your application. It is both System 6 and System 7 compatible. On the surface, IAC Toolkit can be placed in the same tool category as Apple’s AppleEvents or Microsoft’s Dynamic Data Exchange (DDE). But, once you look deeper at all three, you will see that IAC Toolkit stands in a class by itself.

What can IAC Toolkit do for you?

As a developer, you already well know that no program can do everything. Sometimes, developers strive for this ultimate completeness, but many times they end up with a bad case of featuritis. The Macintosh helped to prevent this problem with the advent of the clipboard. It wasn’t necessary to be able to draw a picture in Microsoft Word because you could create a picture in MacDraw and paste it in to your Word document.

But, there are many situations that the clipboard does not handle at all or as well. For example, let’s take the scenario of putting together a mass mailing. The best tools for writing are obviously word processors. The best tools for keeping data organized are databases. With IAC, you could have your word processor make a request to your database and receive back information for the mailing list. With the clipboard, you would have to make a request in the database, copy the information, paste it into the word processor and possibly reformat it. Each time you wanted another mailing list you’d have to go through this process. But, with IAC, you could set up the query once and watch the applications do all the work.

With this all in mind, you can now think about creating a set of applications that are each very focused. This way, your applications will avoid the featuritis problem. By building a suite of applications, you can think about a different type of development and release schedule. For example, instead of one massive program with a 18 month development cycle, you can release three different products with a six month development cycle each. This is a lot easier on your company’s cash flow.

How does it work?

The IAC Toolkit comes with a manual, examples and the necessary files. The files included are headers, THINK C and MPW libraries, and the UserLand INIT that you will need for System 6 use. To install the product on a System 6 machine, you simply copy the UserLand INIT into the System Folder. The header and library files simply need to be copied to their appropriate place within your compiler environment.

To actually implement IAC code in your message receiving application you would do the following:

• Add initialization and closing code

• Load up the symbol table with the verbs your application supports

• Add a call to the UserLand event filter

• Implement your “handleverb” routine

• Implement the verb handlers

• Implement your required-event handlers (open, open document, quit, and print document)

• Set the MultiFinder attributes of your project

• Add a few UserLand STR# resources to your resources

To implement the message sending code, you would do the following:

• Set up a new verb message

• Push the necessary verb parameters

• Send the verb message by “ending” it.

An Example

Let’s take a look at a very simple example that implements the “quit” message. To test the example, I used the “Noogie” program to send a “quit” message to my tester application. The tester application was taken from the “Bullseye” example in the THINK C package.

The first thing I did was to modify Noogie so that it sends the message to Bullseye instead of UserDex (another UserLand example). To do so, I simply changed the “idotherprogram” constant in noogie.h from “UDEX” to “BlEy” (the signature I used for the bullseye example).

Next, I went into the bullseye project and added the “#include <land.h>“ line and added some macros and global variables at the top of bullseye.c.

/* 1 */

#include “land.h”
#define notoken  0L
#define quitprogramtoken  ‘quit’
boolean quitNow; /* global flag variable */

Then I added the UserLand IAC Toolkit library to my bullseye project. The toolkit has initialization and close routines which I placed in the main program. You can also see the initialization and checking of the “quitNow” variable to enable quiting from a routine. In addition, there is the initialization of the landglobals structure and the call to landaddverb. The landglobals structure contains a pointer to the handleverb routine so that when a verb comes in, that routine is called. The landaddverb call loads up the symbol table with the information needed for each verb handled.

/* 2 */

main() {
 InitMacintosh(); /* bullseye init routine */
 if (!landinit()) {
 return;
 }
 landglobals.handleverbroutine = &handleverb;
 landaddverb (quitprogramtoken);
 SetUpMenus();  /* bullseye init routine */
 SetUpWindow(); /* bullseye init routine */
 
 quitNow = false;
 for (;quitNow == false;)
 HandleEvent(); /* bullseye routine */
 landclose();
}

Finally, I created a “handleverb” routine that actually does the work of each verb. In this case, we have only one verb -- “quit”. It sets the boolean flag so that the main program will clean up and exit.

/* 3 */

boolean handleverb (hverb)
hdlverbrecord hverb; {
 switch ((**hverb).verbtoken) {
 case quitprogramtoken:
 SysBeep(4);
 SysBeep(4);
 SysBeep(4);
 quitNow = true;
 break;
 }
 }

That is all there is to being able to receive verbs and handle them via IAC Toolkit. Now, sending is a bit more difficult, especially since the manual doesn’t really go into it, but at least you get a head start with receiving messages which is more important for initial System 7 compatibility anyway.

The Code

Their code is well written and fairly compact. In fact, the UserLand INIT for System 6 machines is only 5K. The INIT takes up about 6K in your user’s System heap plus space for each message as it is transferred. Their main “land.h” header file is a 12K document.

While first working with the code, I did run into a number of slightly annoying problems. These were caused mostly by changes in THINK C’s interfaces. (Symantec is making a move to make THINK C code source compatible with MPW C). I found UserLand’s technical support to be very responsive here, although they almost always do technical support via call backs.

I did find two other very minor annoyances. First, true, false, and boolean were declared without the use of a #ifndef and therefore conflicted with other tools I was using. And, I prefer that routine names be mixed case instead of all lower case to be more readable, but this is a personal style difference.

All of their demonstration code was thoroughly debugged and commented in the necessary places. The examples ran without a hitch. UserLand is extremely confident about their engine for handing IAC. They say that it has had millions of messages sent through it without a hitch. That confidence comes through in the right places.

Compatibility is the product’s strongest feature. If you write an application using IAC Toolkit,

• You will be fully compatible with any other IAC Toolkit or AppleEvent program.

• Your users can use IAC on either System 6 or System 7.

• You will be using a fully tested and debugged toolkit.

The Documentation

Fortunately, the only major thing that I do not like about this product is its documentation. The good news is that the IAC toolkit manual is only about 70 pages long. In fact, I was able to read it cover to cover in about an hour.

The bad news is that it does not get close enough to the first time IACer. There are step by step instructions on how to write an application that can receive and handle IAC verbs, but at times, these steps are unclear. Worse yet, there are no examples in the manual describing how to send IAC verbs. They are covered in the reference portion of the manual, but not in a way that is easy to follow. The manual basically says to see the “Noogie” example to see how this works. And, in fact, Noogie comes with full C source, but I would like to see something in the documentation to supplement the example. The documentation reflects UserLand’s belief that it’s much more important to support IAC servers, not clients.

The manual is small, so finding things is not too bad. Their is an index which is best used to find where routine declarations are located in the reference. Finally, in all fairness, while I would like to see a lot more in the manual, it is better than Apple’s Event Manager documentation.

Pricing

At this time, UserLand IAC Toolkit sells for $395 for the development package. When you are ready to ship an application, you’ll need to get a 5 year distribution license from UserLand. “The cost is $4000 for a fully-paid; royalty-free license to include the Toolkit with as many of your company’s applications as you like.” When you license the code from UserLand, you will receive the full source for the Toolkit as soon as you return the non-disclosure agreement.

Now, while some of you may think that $4000 is a lot of money to license a programming tool, you should think about the amount of time this product will save your programmers and what their time is worth. For those of you that are working on low dollar products or shareware, discuss your problem with UserLand, maybe you and they can come up with a creative solution. UserLand certainly seems open to this idea.

Where is this leading

If you haven’t heard by now, UserLand is not only in the business of producing IAC Toolkits, but much more importantly, a user scripting system called Frontier. UserLand Frontier is the first general-purpose user scripting utility for external control of the Macintosh OS and its applications.

Frontier works with applications even if they don’t use the IAC Toolkit. Frontier is Apple event-aware and uses the Apple Object Model. When Frontier is used with an IAC-aware application, it will be as if the application had user scripting built in to it from the beginning. But better yet, you could easily combine the efforts of multiple applications in one script.

Frontier is different from utilities such as QuicKeys™ or Tempo™ which record macros. Frontier is a full programming language with structures and logic. Its scripting system’s interface is based on an “outline processing metaphor”. This should be no surprise when you realize that the president of UserLand is Dave Winer, the creator of ThinkTank and MORE.

UserLand realizes that many of Frontier’s scripting users may not have programming background. As a result, Frontier has a professional programming language, based on the syntax of C combined with BASIC’s interactivity. Behind the scripting system is full blown object database which is a cross between a language symbol table and a computer filing system. UserLand considers this object database to be extremely robust and powerful while remaining much more friendly than traditional programming languages.

In UserLand’s words, “Frontier provides five fundamental benefits:

• It offers a better scripting environment than those provided by individual programs.

• The user can script applications that never had integrated scripting.

• The user can write scripts that control the file system and operating system.

• The user needs to learn just one language to write scripts for many applications.

• Because Frontier is built around IAC, scripts can be written that integrate the functions of multiple applications.”

There are those people who say that people should wait for AppleScript, but remember, we are still waiting to find out what AppleScript is, let alone when it might ship. Many people believe that shipping dates are probably still years off.

In addition to the Macintosh OS, UserLand is currently exploring the possibility of extending Frontier (and hopefully IAC Toolkit) to control Microsoft DDE-based applications. UserLand is also investigating the possibilities of Windows, OS/2, Unix and PenPoint versions, but has not yet announced any of these.

Frontier will be available in two versions: the complete development system with scripting and a run-time version that will only be able to execute scripts. Frontier runtime will be priced at under $200. As of this writing, Frontier is expected to ship in October, 1991.

The Bottom Line

First and foremost, I strongly recommend this product. Last year, I took the [very long] time to read about AppleEvents in the pre-release version of Inside Macintosh, Volume VI. I can honestly tell you that I have no idea what I read. Even with its limitations, UserLand IAC Toolkit’s manual allowed me to understand the basic fundamentals of IAC and got me to the point that I could implement them within hours.

Obviously, UserLand has developed IAC Toolkit so that when the time comes for Frontier to ship, there will be a number of IAC aware products on the market. This goal has forced them to make IAC as simple as possible. Their toolkit has accomplished this task.

I’ve seen pre-release versions of Frontier running. It is an exciting product. From a developer’s point of view, you will want this utility to be able to take full advantage of your application. The easiest way to accomplish this is to use IAC Toolkit to implement interapplication communication in every one of your programs.

For those of you out there that are worried about a third party writing an operating system level utility, you need to hear a few things. First, Apple is interested in IAC Toolkit working well for developers, perhaps because they did such a poor job of helping with AppleEvents. In fact, it seems that Apple has given UserLand its semi-official blessing through an agreement reached in October, 1990 to make UserLand’s communication protocol fully compatible with Apple’s. Second, there are a number of companies that have written OS level utilities -- have you ever heard of Adobe Type Manager™? Next, realize that UserLand has important people involved. Dave Winer is responsible for the Macintosh’s greatest outliners. In addition, UserLand has Jean-Louis Gassée on its board of directors. And, although Jean-Louis is no longer at Apple, he certainly has an idea of where they are going (at least as much as anyone can).

From a technical point of view, IAC Toolkit is a top notch product, although its documentation could use some polishing. UserLand’s technical support was both responsive and accurate.

What more can I tell you? You should be thinking IAC. If you want to have any time left to develop the rest of your product, you should be thinking UserLand IAC Toolkit.

For more information, contact:

UserLand Software, Inc.

490 California Avenue

Palo Alto, CA 94306

Voice: 415-325-5700; Fax: 415-325-9829

Retail Price: $395 for the toolkit, $4000 5 yr licensing fee (with full sources).

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
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
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and 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.