--- np2/macosx/dialog/dialogutils.cpp 2003/10/31 16:55:06 1.1 +++ np2/macosx/dialog/dialogutils.cpp 2003/11/06 18:27:59 1.2 @@ -90,4 +90,20 @@ void setjmper(BYTE *board, BYTE value, B } } +void getFieldText(ControlRef cRef, char* buffer) { + Size size, outSize; + GetControlDataSize(cRef, kControlNoPart, kControlStaticTextTextTag, &size); + GetControlData(cRef, kControlNoPart, kControlStaticTextTextTag, size, buffer, &outSize); + *(buffer+outSize)=NULL; +} + + +UINT32 getFieldValue(ControlRef cRef) +{ + char buffer[255]; + char* retPtr; + + getFieldText(cRef, buffer); + return(strtoul(buffer, &retPtr, 10)); +}