# $Id: README 1 2004-08-20 11:17:52Z znek $


ABSTRACT
========

SOPEX provides basic infrastructure for developing SOPE applications
using Xcode on Mac OS X. SOPEX consists of a framework, a project
template and several file templates. The SOPEX.framework provides functionality 
for launching and debugging SOPE applications. SOPEX applications can be 
launched as normal Desktop applications and provide their own, integrated web 
browser (using Apple's WebKit). Doing so, SOPEX applications are fully 
functional stand-alone HTML applications.


PREREQUISITES
=============

SOPEX depends on the following frameworks to be properly installed:

a) SxXML
b) SxCore
c) SOPE
 
Please note that in order for SOPE to run properly you need to have
installed at least one SaxDriver in /Library/SaxDrivers. The SOPE
installer should take care of this, however.


DEBUGGING
=========

When debugging SOPEX apps in Xcode, you'll pretty soon experience that
gdb doesn't attach to the process you're expecting to ... that is because
gdb attaches itself to the frontmost process which is the application wrapper.
The web application is a process which gets forked off the application
wrapper. So if you want to debug the web process, you have two options:

a) attach gdb to this process manually (the process's pid is available from the
statistics panel)
b) launch the application from Xcode with the --daemon option set. Something
like this will do the trick (all arguments in a single row):
--daemon -WOProjectDirectory
/Network/Users/znek/Projects/unchecked/znek/MulleCMS2/ -WOCachingEnabled NO
-WODebuggingEnabled YES -WODebugComponentLookup YES 

It's totally clear to me that a) and b) aren't perfect. A perfect solution
would probably be to attach gdb on demand (via a menu command). I don't know
if Xcode is scriptable enough to do this. Someone with more knowledge on the
subject please elaborate!


USEFUL DEBUGGING DEFAULTS
=========================

At present there's a limited set of NSUserDefaults aiding in the debugging
of SOPEX applications. Please note that all user defaults for SOPE applications
will work as well.

-WOPort <number>:
 if set, forces the child process to be launched on this specific port.
 Useful for debugging with tcpdump.
                      
-SNSPort <number>:
 if set, forces the parent process to listen on this port number for
 SNS connections. Useful for debugging with tcpdump.

-SOPEXDebugEnabled <bool>:
 Global debug message trigger.

-SOPEXDebugWebConnection <bool>:
 Use this to trigger debug messages in SOPEXWebConnection.


TODO
====

- preferences (optional debugging options, etc.)
- session statistics, resource consumption (real mem, virtual mem)
- working auth panel
- SOPEXBrowserWindow: make favIcon work


Known BUGS
==========



Prebinding Notes
================

General technical information about prebinding is available from Apple at
http://developer.apple.com/documentation/Performance/Conceptual/LaunchTime/Tasks/Prebinding.html#//apple_ref/doc/uid/20001858.

OGo frameworks currently use the range from 0xC0000000 to 0xCFFFFFFF.

Any questions and feedback regarding our use of this range should go to
Marcus Müller <znek@mulle-kybernetik.com>.


SOPEX: 0xC6000000 - 0xC6FFFFFF
=============================

0xC6FF0000 SOPEX