Re: makedoc.exw
Kenneth Rhodes wrote:
>
> Attention Derek Parnell:
>
> I have not been able to run makedoc under linux.
Sorry.
Add this function ...
-- Displays a message on the screen and waits for acknowledgement.
-- It returns the Key (integer) used as the response.
-- The Style parameter can be one of ...
-- 0 ==> Press ENTER key to continue
-- 1 ==> [ Okay ] or [ Cancel ]
-- 2 ==> [ Abort ], [ Retry ] or [ Ignore ]
-- 3 ==> [ Yes ], [ No ] or [ Cancel ]
-- 4 ==> [ Yes ] or [ No ]
-- 5 ==> [ Retry ] or [ Cancel ]
-- { KEYLIST, KEYMSG} where KEYLIST is a sequence containing acceptable
-- key that will return control to the application, and KEYMSG is
-- a message showing the user what the options are.
--
-- Regardless of which style is used, the ENTER and ESCAPE keys will always
-- return control as well. The ENTER key signifies the default option and
-- the ESCAPE key represents the 'cancel' option. These are application
-- defined.
--
-- ** Examples:
-- res = show_msg("File has been updated.", "MYAPP", 0)
--
-- res = show_msg("Which fruit is required?", "MYAPP",
-- {"oOaAbB", "Orange, Apple or Banana"})
function show_msg(sequence pMsg, sequence pTitle, object pStyle)
integer lKey
sequence lKeys
sequence lCont
sequence lBorder
lKeys = "\r\n" & 27
lCont = "Press ENTER key to continue..."
if atom(pStyle) then
if pStyle = 1 then
lKeys = "oOcC" & lKeys
lCont = "[ Okay ] or [ Cancel ]?"
elsif pStyle = 2 then
lKeys = "aAiIrR" & lKeys
lCont = "[ Abort ], [ Retry ] or [ Ignore ]?"
elsif pStyle = 3 then
lKeys = "yYnNcC" & lKeys
lCont = "[ Yes ], [ No ] or [ Cancel ]?"
elsif pStyle = 4 then
lKeys = "yYnN" & lKeys
lCont = "[ Yes ] or [ No ]?"
elsif pStyle = 5 then
lKeys = "rRcC" & lKeys
lCont = "[ Retry ] or [ Cancel ]?"
end if
elsif length(pStyle) = 2 and
sequence(pStyle[1]) and
sequence(pStyle[2]) then
lKeys = pStyle[1] & lKeys
lCont = pStyle[2]
end if
lBorder = repeat('*', length(pTitle) + 8)
printf(1, "\n\n %s\n %s\n %s\n", {lBorder, pTitle, lBorder})
printf(1, "%s", {pMsg})
printf(1, "\n %s", {lCont})
lKey = get_key()
while find(lKey, lKeys) = 0 do
lKey = get_key()
end while
return lKey
end function
And then change all references to "message_box" to "show_msg".
--
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell
|
Not Categorized, Please Help
|
|