Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!jkc From: jkc@eleazar.dartmouth.edu (Kevin Calhoun) Newsgroups: comp.sys.mac.programmer Subject: Re: String2Date (Script Manager 2.0) Message-ID: <12689@dartvax.Dartmouth.EDU> Date: 16 Mar 89 23:11:22 GMT Sender: news@dartvax.Dartmouth.EDU Reply-To: jkc@eleazar.dartmouth.edu (Kevin Calhoun) Organization: Dartmouth College, Hanover, NH Lines: 29 I take back all the nasty things I wrote (and thought) about the new Script Manager routine String2Date. I wrote: > err := InitDateCache(@myDateCache); > if err = noErr then > string2dateResult := String2Date(h^, GetHandleSize(h)-1, ^^^^^^^^^^^^^^^^^^ > @myDateCache, lengthUsed, dateTime); The problem here is that h is actually much larger than the text that represents the date I want to convert. If I make this err := InitDateCache(@myDateCache); if err = noErr then string2dateResult := String2Date(h^, StringLength(paramPtr, h^), @myDateCache, lengthUsed, dateTime); then everything is as hunky as it is dorey. So, sorry if I ruffled the feathers of the folks who worked on the Script Manager. The documentation warns that it's very sensitive to garbage input, and that's no joke. -- Kevin Calhoun Courseware Development Dartmouth College