Yes I have seen that page. Nothing clicked for me.
> If not, please post some code that shows your problem and we'll take a
> look at it.
>
OK. In main() before NSApplicationMain() I load parse and eval all Nu
files in my app bundle like this:
NSAutoreleasePool *pool = [NSAutoreleasePool new];
id nu = [Nu parser];
for (NSString *nuFile in [[NSBundle mainBundle]
pathsForResourcesOfType:@"nu" inDirectory:nil])
[nu eval:[nu parse:[NSString stringWithContentsOfFile:nuFile]]];
[nu close];
[pool release];
The single nu file I currently is this:
;; TLOS9Analyzer
;; Classes to create blocks of OS-9 (CoCo) formatted disks.
;;
;; by tim lindner
(set $configDictionary (NSDictionary dictionaryWithList:(list
"Description" "Creates OS-9 LSN blocks out of track/side/sector
blocks.")))
(set $tag "OS-9 Logical Sector")
(class TLLSN is TLStreamAnalyzer
(- configuration is $configDictionary)
(- attributeDescriptors is nil)
(- tag is $tag)
(- analyzeStream:block withSettings:theSettings is
(block startBlockWithTag:$tag withPad:255)
(block addMeta:"LSN0" forName:"name")
(block addRange:(TLRange rangeWithBlock:"track 0,0 side 0,0
sector *,1" fromSection:"data" starting:0 withLength:0)
forSection:"data" expectedSize:256)
(block endBlock)
;; Calculate Allocation Bit Map length
(set LSN0 (block getDataFromBlock:"LSN0" fromSection:"data"))
(set ABMByteCount (LSN0 bigEndianUnsignedShortAtOffset:4))
;; Create ABM block
(block startBlockWithTag:$tag withPad:255)
(block addMeta:"ABM" forName:"name")
(set currentSector 2)
(while (>= ABMByteCount 256)
(set theString "track 0,0 side 0,0 sector *,#
{currentSector}")
(block addRange:(TLRange rangeWithBlock:theString
fromSection:"data" starting:0 withLength:0) forSection:"data"
expectedSize:256)
(set currentSector (+ currentSector 1))
(set ABMByteCount (- ABMByteCount 256)))
(set theString "track 0,0 side 0,0 sector *,#{currentSector}")
(block addRange:(TLRange rangeWithBlock:theString
fromSection:"data" starting:0 withLength:ABMByteCount)
forSection:"data" expectedSize:ABMByteCount)
(block endBlock)))
((TLStreamAnalyzer sharedAnalyser) addAnalyser:((TLLSN alloc) init))
When a use chooses the proper menu item, this subclass'
analzyeStream:withSettings: method is called. I only get the error:
*** -[NSNull parse:]: unrecognized selector sent to instance
0xa065a020
When I try to use string interpolation. Line 32 and 37.