ActiveDeveloper FAQ:
Edition: May 6th 2005

Scope of ActiveDeveloper ...

1) Can I use ActiveDeveloper to Edit Objective-C source ?
2) Can I use ActiveDeveloper with Xcode ?
3) Can I use ActiveDeveloper with InterfaceBuilder ?
4) Can I use ActiveDeveloper with GDB ?
5) Can I use ActiveDeveloper with Bundles ?
6) Can I use ActiveDeveloper on multi-person projects ?

ActiveDeveloper Project Activation ...

7)  Project Activation - What is that ?
7b) Project Activation - Minimal ?
7c) Project Activation - Partial ?
7d) Project Activation - Complete ?
8)  How to - Create a Projects AD.projectimage file ?
9)  How to - Start an ActiveDeveloper Session ?

ActiveDeveloper Sessions ...

10) Workspace files (*.wsp) - What are they ?
10) How to use Workspace files (*.wsp) ?
11) How to use Eval, Display and Inspect ?
12) How to use appropriate Objective-C Selections ?

13) How to use the Class Editor ?
14) How to use the Class Category Editor ?
15) How to use automatic Header file Generation ?

Common Pitfalls ....

16) Don't - reload Class Definitions - use Categories
17) Don't - reload Global C-level Variables - use Static

Advanced Topics ....

18) Define Your Compilation Environment - in Preferences ...
19) SpeedUp Incremental Compilation ...

ActiveDeveloper FAQ:

Scope of ActiveDeveloper ...

1) Can I use ActiveDeveloper to Edit Objective-C source ?

Yes, this is a main purpose of ActiveDeveloper, and it even
auto-generates your header files from your source files.

For development, ActiveDeveloper is designed to fit in along side
Xcode and InterfaceBuilder. Being an Editor that sets you
interactive with your projects via incremental compilation and live
runtime Object Inspection.

Check the User Guide sections on Activation of your own Projects for details

Back to Index

2) Can I use ActiveDeveloper with Xcode ?

YesActiveDeveloper is designed to work in concert with Xcode.

ActiveDeveloper will be your place for editing Activated classes plus
your new Object level Debugger.

Xcode will continue to be your Makefile interface and C level
Debugger plus Xcode will continue to be your editor for those classes
you choose not Activate for ActiveDeveloper.

Add your ActiveDeveloper *.wsp and *.projectimage files to your
Xcode projects for easy access by Drag and Drop
from Xcode to ActiveDeveloper.

Check the User Guide sections on Activation of your own Projects for details

Back to Index

3) Can I use ActiveDeveloper with InterfaceBuilder ?

Yesthe ActiveDeveloperIB.palette enables exactly this.
Think of it as an Activation of the InterfaceBuilder.

And, its carefully designed NOT to instantiate any objects into your NIB's.
So your NIB's don't get to depend on ActiveDeveloper .

First, launch the InterfaceBuilder once as usual and load the IBPalette into it.
This ensures that IB will later automatically load the IBPalette when launched ...

Thereafter, to launch an ActiveDeveloper session with the InterfaceBuilder, simply
select the ActiveDeveloperIBPalette projectimage, and click Start in ActiveDeveloper.
This will launch IB together with the IBPalette and form an ActiveDeveloper session.

From there on, you can develop your View subclasses, Palettes and Inspectors right
inside of the InterfaceBuilder, where they belong.

Check the User Guide Manual Demos to start an ActiveDeveloper session with IB

Back to Index

4) Can I use ActiveDeveloper with GDB ?

Yesit's also possible to use ActiveDeveloper when you are running
your Application under a GDB session ... just attach GDB after you
have entered into an ActiveDeveloper session.

Check the User Guide Manual Demos for how to start an ActiveDeveloper session

Back to Index

5) Can I use ActiveDeveloper with Bundles ?

Yesbut be aware, that you can only link the ActiveDeveloperLib ONCE ...
So, link it into your core applications - instead of into any of your Bundles.

Check the User Guide sections on Activation of your own Projects

Back to Index

6) Can I use ActiveDeveloper on multi-person projects ?

Yes,and in Large scale projects with multiple developers, ActiveDeveloper
can even be used and liked to different extents ... such as

Very Isolated - only one developer wants to use it to solve
particular problems - maybe mainly as an Object Debugger.

Partly - more developers wants to use it for those parts
of their code - where interaction really makes a difference.

Exclusively - all developers develop all classes with ActiveDeveloper.

Check the User Guide Demo sections for light use and Sample sections for intense use

Back to Index

ActiveDeveloper Project Activation ...

7) Project Activation - What's that ?

To start developing with ActiveDeveloper there is a small effort you have to do
to your code projects - called ActiveDeveloper Activation. This can be either

Minimal 1) You add a few lines of code to your apps Controller,
2) Start linking your project against the libActiveDeveloper.a
3) Create an AD.projectimage file - describing to
    ActiveDeveloper how to work with your application.

This allows you to use ActiveDeveloper with your app as
an Object level Debugger and Objective-C scripting shell.
Partial In addition to the above, you start Editing some of your classes
with ActiveDeveloper (the more frequently changing ones).
This involves splitting the methods of your classes into separate
Class Category files.

This gives you incremental compilation of Objective-C methods
and automatic header generation from source files on these classes.
Complete In addition to the above, you go all the way to Editing all of your
projects Objective-C classes with ActiveDeveloper.

This gives you incremental compilation of Objective-C methods
and automatic header generation from source on all project classes.

To take your Project through an ActiveDeveloper Activation you go through 1-3 steps.

In Step 0 you have the original source code not yet using ActiveDeveloper.
In Step 1 you do a Minimal Activation to run in ActiveDeveloper sessions.
In Step 2 you continue to Activate those Classes of your app where you work most
to allow incremental compilation and automatic header file generation.
With most existing or maintenance projects it's fine to stop here.
In Step 3 you just Activate more and more classes - and start grouping some
of them together and organize your code with a top level Project header
to make it easier to Refactor your code.
Reaching Complete Activation makes most sense for new and smaller projects.

Check the User Guide sections on Activation for how to Activate your code -
Sample 3 (Minimal) Sample 4 (Partial) Sample 5 (Complete) Activation

Back to Index

8) How to - Create a Projects AD.projectimage file ?

To launch an ActiveDeveloper session you need an AD.projectimage file to describe how
ActiveDeveloper should work together with your Project application. In here you find
two kinds of information:

- Launch information: ProjectName, Executable path and eventual Arguments
- Compile information: Additional Header, Library and Framework paths

Create a new AD.projectimage file with ActiveDeveloper from the "New Project" Menu item
Use the Project Window to add your info (ProjectName and Executable path are mandatory)
ProjectName should be the exact name of your application without the .app extension.

Then Save your AD.projectimage file - and try to read it back in by "Refresh from File"
to verify that your Launch and Compile informations have been accepted correctly ...

Check the first User Guide Manual sections on Activation of your own Projects for details

Back to Index

9) How to - Start an ActiveDeveloper Session ?

1) Launch the ActiveDeveloper.app,
2) Open your apps AD.projectimage file with ActiveDeveloper
3) Start your App using the Start button in ActiveDeveloper

Using the "Start" Button in ActiveDeveloper is the ONLY way to start an
ActiveDeveloper Session with your Application. When you Launch your Application
normally it will run normally - but outside of an ActiveDeveloper session.

Like this you can have many Activated applications in your Environment that
you use every day - and still run them in and out of ActiveDeveloper sessions
just as you like.

Check the User Guide Manual Demos for more details

Back to Index

ActiveDeveloper Sessions ...

10) Workspace files (*.wsp) - What are they ?

*.wsp is the new ActiveDeveloper Workspace Objective-C file type.

They give you an interactive scripting shell for native Objective-C code.

You type in compound statements of Objective-C code, select them, and have
them executed immediately with edit-compile-play cycles like 1-2 seconds.

The Workspace editor gives you two text panes for editing your Workspace files.
In the upper text pane you write eventual #import statements #define statements
and in the lower text pane you can edit Objective-C statements and make
selections for execution.

The namespace (scope) used for executing your Objective-C code selected in a
Workspace file is the global namespace - or a Qualified Class namespace if you
type a class name into the top text field.

Check the following questions on how to make selections and execute them.

Back to Index

10) How to use Workspace files (*.wsp) ?

Workspace files (*.wsp) are your new ActiveDeveloper friend ...

A Workspace is a place for growing Objective-C code interactively
with immediate feedback that it works as intended. This can be used
for many different purposes:

New code Many Workspaces are play fields for new code, and will loose
their importance over time, as you have grown the code and
incorporated the essence of it over to your Classes.
Testing Some Workspaces are holding Testing code and live on forever
along with your Project code. You don't have to make separate
Testing applications in their own Xcode projects anymore.
SysAdmin Other Workspaces are more shell script like, holding those
15 small Project related calls, that you use day in and day out.
But haven't yet found the time to build into a full application.

Check the following questions on how to make selections and execute them.

Back to Index

11) How to use Eval, Display and Inspect ?

You will notice Eval, Display and Inspect buttons in several ActiveDeveloper
windows - in Workspaces, the Object Browser and in Class Editors:

They all work similarly - giving you a scripting shell for native Objective-C
code with edit-compile-play cycles like 1-2 seconds.

Evaluate Compiles and executes your code in the window scope, where it
is selected. This makes sense whenever you want to just check
syntax, change state or create side-effects on your object structure.
The return value of your code is ignored.
Display Compiles and executes your code in the window scope, where it
is selected. The resulting value of your selected code, which is
regarded as anObject or nil, is then Transcribed into an NSString
and showed in the System Transcript. (Using the -description; method)
Inspect Also compiles and executes your code in the window scope, where it
is selected. The resulting value of your selected code, which is
regarded as anObject or nil, is then added to a the Object Browser
for Inspector. From here you can then continue to work with
the Resulting Object, view it's Instance Variables and also Browse
around the entire Object Graph behind this object.

To apply them, you simply Select a compound statement of Objective-C code
and click one of the buttons - et voila - off you go.

You can also copy and paste code from a Workspace file into the Object Browsers
text pane. This works similarly except that your namespace (scope) for self changes
to become that of the currently inspected object in the Object Browser.

Here is an overview of namespace (scope) for self across the windows.

- Workspaces have Global Scope
- Class Editors have Class Scope
- Object Browsers have Object Scope

- plus Workspaces can have Qualified Class Scope - if you set the top text field.

Check the following questions on how to make selections and execute them.

Back to Index

12) How to use appropriate Objective-C Selections ?

With ActiveDeveloper, you can select compound Objective-C statements
in all your windows. A compound Objective-C statement is a selection
of code that would qualify for being isolated into a method of its own.

Here are three simple, but illustrative Examples:

[NSArray arrayWithObjects: @"First", @"Second", nil];

return [NSArray arrayWithObjects: @"foo", @"bar", nil];

id result;
result = [NSArray arrayWithObjects: @"A", @"B", @"C", nil];

If you select a Statement in the middle of a method, ActiveDeveloper
will append a return on the fly. So, the last line of your selection should be
a valid statement by itself or an explicit return anobject; statement;
- and don't include any empty lines at the bottom of your Selection.

Finally, if you want to define Local Variables, you should do this before
the first real Statement - just like you would inside a Method scope.

Check the User Guide Manual Demos and Samples for more details.

Back to Index

13) How to use the Class Editor ?

With the ActiveDeveloper Class Editor you can create New Classes in
source code form, and have them Loaded directly into your running
application under development.

The Class Editor open Classes from *.m files and when you Save,
it will also auto-generate their accompanying Header files *.h.
(This is disabled in the Demo version).

We have provided you with a default Template for Class Definitions. If you
have a better taste for how a Class Definition Template should look like,
you can customize it in the NIB file.

When you create new classes you should also add them to your Xcode
project and rebuild at the next convenient opportunity. Else you will have
load the new class again next time you launch an ActiveDeveloper session.

For further Details:       See Header File Creation:

Back to Index

14) How to use the Class Category Editor ?

With the ActiveDeveloper Class Editor you can also create Class Categories
in source code form, and have them Loaded directly into your application
under development.

The Class Editor open Class Categories from *.m files and when you Save,
it will also auto-generate their accompanying Header files *.h.
(This is disabled in the Demo version).

We have provided you with a default Template for Class Categories. If you
have a better taste for how a Class Category Template should look like,
you can Customize in the NIB file.

For further Details:       See Header File Creation:

Back to Index

15) How to use automatic Header file Generation ?

With the ActiveDeveloper Class Editor you only have to use the *.m source files
when you edit Class Definitions and Class Categories. When you Save them back,
ActiveDeveloper will auto-generate their accompanying Header files *.h.

Both the Class and the Category Editor give you 4 text panes to work with.

Left 1) The top interface view goes first into the Header file as a
Prefix and is used for #imports, #defines and module scope variables.

2) The middle interface view is auto-generated class interface
code extracted from the Right side implementation view - and goes
second into the Header file. This view is therefore read only.

3) The bottom interface view goes last into the Header file as a
Suffix and is used in Class files to #imports the Class Category
header files. This encapsulates the Class / Category splitup inside the
Class Definition ... keeping the rest of your code un-aware
Right The source text view to the right is for your implementation.
The text here will be Saved into the implementation files *.m

Please enjoy the middle left interface view also as an Outline view
of your Source code ... Click any of the methods signatures in here to navigate
around your source code in the right view.

Class Definition interface generation:

ActiveDeveloper converts @implementation { } -method; @end sections in your source
code to form identical @interface { } -method; @end sections in your header files.

Class Category interface generation:

ActiveDeveloper converts @implementation (Category) -method; @end sections in your
source code to form identical @interface (Category) -method; @end sections in your
header files.

Method Declaration generation:

ActiveDeveloper extracts method declarations from your method
implementations. This is done by selecting all method implementations
having +/- as first character on the line, and transcribing these up
until and including any eventual semi-colon ;

To keep some methods Private, simply put a space before their +/-.

To implement short methods in 1 line of code, like getters/setters,
simply put a semi colon between the signature and the implementation, like:

    - (id)myOnelineGetter; { return object; }

To make Classes conform to Protocols, please put the <protocol> conformance
behind a // comment on the Class @implementation definition line, as below:

@implementation     MyClass  :  NSObject     // ---  <protocol> ----
.....
@end

Check the User Guide Samples on Activation for more details

Back to Index

Common Pitfalls ...

16) Don't - reload Class Definitions - use Categories

In ActiveDeveloper you can Create and Load Class Definitions on the fly,
but you can NOT reload them.

When you need to change an instance variable or pick a new super class,
you have to stop your running app, rebuild it with Xcode and Start a new Session.
In our experience - it doesn't happen nearly as often as method changes.

If this happens often to you. The best way to keep your sessions longer is to
have one or two dummy instance variables in your frequently changing classes
When you need a new instance variable (in the middle of a session) just start
using one of the dummies via Getter/Setter methods in the name of the new
instance variable you need. This will keep the session flowing.

And, the next time it's convenient to break the session, then just rename dummy
inside the Getter/Setter methods as you add the new instance variable and rebuild

Back to Index

17) Don't - reload Global C-level Variables - use Static

If you have Global C-Level Names inside a Class Category file, like
functions, variables or structs, then you can Load these files ONCE.
But you can NOT reload newer Class Category editions on the fly.

Therefore we suggest, that you

1) make all C-Level Names static, that you don't refer to elsewhere
2) put all Names in the Class Definition file - that you DO refer to elsewhere.

Back to Index

Advanced Topics ....

18) Define Your Compilation Environment - In Preferences ...

In addition to the project specific Compiler information you put into the
AD.projectimage file of every project that you Activate for ActiveDeveloper.
You can also give ActiveDeveloper Compiler information for all Projects.

This is done in the Preference panel. Here you can set Compiler options,
add Include Directories and link Frameworks.

- OtherCFlags:   Here you specify Compiler Options (like -O)
- OtherIncludes: Here you add Include Directories (like -I.) to
     match your #import Statements

Back to Index

19) SpeedUp Incremental Compilation ...

It's much faster to Compile directly on the Local Hard drive of your computer
than on a Network mounted drive.

Therefore, we suggest you choose your Compilation Area somewhere on
your computers Local Hard drive, when you specify it in ActiveDevelopers
Preference Panel.

Back to Index

Home News Jobs Products Download Purchase Consulting Contact Us