Using the filenamedialog function to prompt for filename. If user presses CANCEL or ESCAPE, a zero (0) is returned instead of null string as document states.
I fixed the documentation. FileNameDialog has always returned 0 when the user cancels the dialog, and it has always been documented wrong. At least all the way back to IBM Object REXX 2.1 which is the earliest Object Rexx I still have available.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=191588
Originator: NO
I'll take a look at that.
Logged In: YES
user_id=191588
Originator: NO
The initial code check in to CVS shows that for ooRexx, the FileNameDialog has always returned 0 if the user cancels or uses escape.
250 fSuccess = OpenFileDlg(load, pszFiles, pszInitialDir, szFilter, hWnd, title,
251 defext, multi, chSepChar);
252
253 if ( pszInitialDir )
254 LocalFree(pszInitialDir);
255 if ( fSuccess )
256 {
257 / we simply use the allocated string as return code and let REXX free it /
258 retstr->strptr = pszFiles;
259 retstr->strlength = strlen(pszFiles);
260 return 0;
261 }
262
263 if (CommDlgExtendedError())
264 RETERR
265 else
266 RETC(0);
267 }
So, in my mind this is a documentation error. I'll fix the documentation.
Logged In: YES
user_id=191588
Originator: NO
Committed revision 1700.
I fixed the documentation. FileNameDialog has always returned 0 when the user cancels the dialog, and it has always been documented wrong. At least all the way back to IBM Object REXX 2.1 which is the earliest Object Rexx I still have available.
This was a documentation clarification bug. The clarification was in the 4.0.0 release docs.