Hi folks,

  has anybody implemented the Hillegass example regarding NSFormatter (chapter 26 in the 3rd edition of "Cocoa Programming for MAC OS X") in rubycocoa?

  I failed to transcript the isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: method on the pages 336+337: 

def isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription(partPtr, selPtr, origString, origSel, error_ptr)
    NSLog("partPtr.class = #{partPtr.class}")
    NSLog("partPtr.inspect = #{partPtr.inspect}")
    partial = partPtr.cast_as('@')
    NSLog("partial.class = #{partial.class}")

 I started with some test-printout, but when entering the cast statement, it blows up! here is the correspondig console output:

2010-03-07 09:27:38.170 TypingTutor[6519:a0f] partPtr.class = OSX::ObjcPtr
2010-03-07 09:27:38.171 TypingTutor[6519:a0f] partPtr.inspect = #<OSX::ObjcPtr:0x29f036 cptr=0xbfffd4dc allocated_size=0 encoding=@>
Program received signal:  “EXC_BAD_ACCESS”.
sharedlibrary apply-load-rules all

any ideas?

best regards

Wolfgang Kittenberger