On May 2, 2007, at 9:46 PM, Allan Odgaard wrote:
On 5. Apr 2007, at 18:54, Gerd Knops wrote:
On Apr 5, 2007, at 12:26 AM, Allan Odgaard wrote:
[...]
Related to this, I have an ASSERT() macro which aborts() and does a stack dump from the place where it aborts, this stack dump has files and line numbers, and I’ve been pondering making that into clickable links -- the format though is not the standard: «file»:«line»:«message».
I have done just that, using a small perl postprocessor parsing the output from the run_xcodebuild.sh, looking for patterns and replacing them with txmt links. It is kind of ugly, my current project has source files divided into folders so I devised a small search routine that descends from TM_PROJECT_DIRECTORY to find the source file (ignoring _darcs/.svn repositories). Works fairly well, but just to ugly and specialized to my environment to share.
Ideally we'd come up with a standard pattern for error messages, and add that functionality into the xcode stuff. That way anyone could generate clickable links by just formatting log or error messages in a certain way.
Returning to this subject… the way we deal with it in ScriptMate is by setting a TM_FD variable for the process we launch. This process can then write HTML to that file descriptor, which will be shown as- is (i.e. interpreted) in the HTML output window.
You know, I still haven't forgiven you for removing that output option where one could enter a pattern. Since then my tools spend a lot more code on formatting output then on getting their job done. And now you want me to replace NSLog(@"I am here") with something that opens some stupid file handle, then has to write (to get a line break) something like NSLog(@"<ihateallan>I am here</ ihateallan>")? I hope you are kidding!
BTW for long-running processes the output window needs a clear button/ shortcut/context menu entry.
Gerd