This is what someone must have posted sometime as I find it in my app:
// Prevent app from doing some automatic text replacements such as ordinary quotes to smart quotes.
#if TargetCocoa then
Declare Function NSClassFromString Lib "Cocoa" (aClassName As CFStringRef) As Ptr
Declare Function documentView Lib "Cocoa" selector "documentView" (obj_id as Integer) as Ptr
Declare Sub setAutomaticQuoteSubstitutionEnabled lib "Cocoa" selector "setAutomaticQuoteSubstitutionEnabled:" (id as ptr, value as Boolean)
Declare Sub setAutomaticDashSubstitutionEnabled lib "Cocoa" selector "setAutomaticDashSubstitutionEnabled:" (id as ptr, value as Boolean)
Declare Sub setAutomaticTextReplacementEnabled lib "Cocoa" selector "setAutomaticTextReplacementEnabled:" (id as ptr, value as Boolean)
Var myTextArea as ptr = documentView (t.Handle)
setAutomaticQuoteSubstitutionEnabled (myTextArea, false)
setAutomaticDashSubstitutionEnabled (myTextArea, false)
setAutomaticTextReplacementEnabled (myTextArea, false)
#endif