Questions and Answers
Written by Larry Salomon, Jr.
Carsten Haerle (Carsten_Haerle@ms.maus.de) writes:
I have a simple but interesting question concerning the help menu in PM applications. I searched for hours and days but I didn't find the answer to it. Even all the documentation in the toolkit, the developers connection and the DAP library volume didn't give me an answer, or they are even inconsistent. I think an answer would be of high value to all PM app developers so it would be a good idea to publish in EDM/2 (if someone finds an answer to it).
Now for the question(s).
To answer your first question, there is no correct way. If you use the MIS_HELP flag, you have to intercept the WM_HELP message just like you would have to intercept the WM_COMMAND message without the MIS_HELP flag. For consistency, I usually omit the flag. What you do with the items is fairly standard (this answers your second question):
A week ago I asked you if there was an OS/2 equivalent for errno and sys_errlist. You answered me no then. I've found now that it is possible to get the message string that belongs to an error number. The file OSO001.MSG that can be found in the directory \OS2\SYSTEM contains all the error messages. By using the function DosGetMessage you can get the text string that goes with a certain error number. So if you now have an error returned by DosRead() (for example) you can get the corresponding text string.
I've included a small source listing below. You're free to do with it what you like. Perhaps it is of use for someone. [Editor's note - the source is in the file DOSERROR.C] Not Available
Klaus Johannes Rusch (email@example.com) writes:
One of the deficiencies of the REXX language is the limitation to one return value. While external data queues and files are possible means of communication, the code snippet below offers superior performance and usability.
This also proves useful when writing structured data of arbitrary length and contents to a file. (Admittedly, this was the author's first use of the Return() and ParseReturned() functions.)
Return: Return '|' || C2X(ARG(1)); ParseReturned: Return X2C(SUBSTR(ARG(1), 2));The following example shows how to use these functions to return multiple values of arbitrary length and content:
/* REXX */ Parse Value MyProc(parms) With r1 r2 r3; r1 = ParseReturned(r1); r2 = ParseReturned(r2); r3 = ParseReturned(r3); /* : */ Exit 0; MyProc: Procedure; Parse Arg parms; /* : */ Return Return(r1) Return(r2) Return(r3);[Editor's note - the source is in the file RETSAMP.CMD]Not Available