Objective-Everything Release 5.  Copyright ©1994-1998 by TipTop Software, Inc.  All Rights Reserved.

Frameworks, linking, loading, and meddling

Static linking

Usually, in order to take advantage of Objective-Everything functionality, when you build your own application you link with Objective-Everything frameworks. By default Objective-Everything frameworks live in /Local/Library/Frameworks and include:

If you are building a GUI-less ("legacy") application that you should link with ObjCore.framework and whatever language frameworks you want to use. If you are building a GUI application (i.e., AppKit-base application), you should also link with ObjAppKit.framework.

Dynamic bundle loading

If an application supports bundle loading, you can dynamically load Objective-Everything into that application at runtime. The Bundle example in ObjCore.framework/Resources/Examples is a trivial bundle which you can use to load ObjCore.framework and ObjAppKit.framework into an application.

Here is how you can load this bundle in ProjectBuilder:

  1. Copy the Bundle example into a writeable directory (e.g., /tmp) and compile it. This will result in ObjBundle.bundle package.
  2. Copy ObjBundle.bundle into /Local/Developer/PBBundles/
  3. Run ProjectBuilder. In the Preferences panel, select "Bundles", click "Add", and select "/Local/Developer/PBBundles/ObjBundle.bundle". Quit ProjectBuilder.

Now, when you run ProjectBuilder, ObjBundle will be loaded. Note that the "Objective" menu appears under "Tools". You can now use ObjBrowser to investigate the guts of ProjectBuilder, use the Objective languages to script it, etc.

Meddling

In addition to static linking and dynamic loading, you can use Objective-Everything in any OpenStep application, even if Objective-Everything is not statically linked, or dynamically loaded via the above-described bundle loading mechanism.

There are three different ways to do this:

1. objmeddle

Run application with Objective-Everything loaded in. In a shell type:

objmeddle <path-to-application-executable>

Note: the objmeddle script lives in /Local/Developer/Executables/. If this directory is not in your path, you may want to add it in your shell initialization script (~/.cshrc, or ~/.bashrc, etc.)

ObjMeddle depends on the dynamic loading mechanism available in Mach, and consequentially, this does not work under Windows.

For example, to run Objective-Browser inside EOModeler:

objmeddle /System/Developer/Applications/EOModeller.app/EOModeler

Then, in EOModeler, click Tools->Objective->Browse->Bundles to browse the guts of EOModeler.

2. objgdb

The objgdb script simply runs an application in gdb with Objective-Everything preloaded:

objgdb <path-to-application-executable>

For example, to run Yap.app this way, and to programmatically make it run an open panel:

objgdb /System/Developer/Applications/Yapp.app/Yap
run
continue

Now, for example, to programmatically make Yap run its open panel, click Objective->Interact->Interactor. Click "Load Tcl", and click "Tcl". Type:

$NSApp sendAction: open: to: [nil] from: $NSApp

3. objattach

The objattach script lets you load Objective-Everything into an already running application. This is done via the gdb attach functionality.

objattach <application-name>

For example, to attach gdb with Objective-Everything to FileMerge.app:

[Run FileMerge.app if it's not already running.]
objattach FileMerge.app
continue

Now, run Objective-Browser, e.g.: Objective->Browse->NSApp


Note: Objective-Everything only knows about instances which are either created after it is initialized, or instances which are in some manner returned to Objective-Everything. As a consequence, if you want to look at "live instances" information in Objective-Browser, objmeddle and objgdb will give you the most information because Objective-Everything is initialized early.


Platform issues

objmeddle objgdb objattach
OpenStep/Mach + + +
Rhapsody + + - (1)
Windows - (2) + - (3)

(1) objattach does not work in DR2 because GDB attach is broken.
(2) objmeddle cannot work in Windows.
(3) objattach


[previous][contents][next]