Forum unknown
· Programming
#Modula 2 Pointers
3 messages in this thread
I couldn't find any documentation about the cliStandardInput,
currentinput, cliStandardOutput, and the currentoutput fields in the
CommandLineInterface record. My bet it that they are of type FileHandle.
In experimenting with them (see the program I just uploaded to DL13,
DOSTUF.ARC) I found that both input fields were the same, and both output
fields were the same. They matched the prCIS and prCOS fields in the
Process structure when the program was invoked from CLI. However when I
routed the program's output to a file (using > ) the prCOS field was
different (I assume it was the FileHandle to the output file).
I think you and Larry are confusing the purpose of the prWindowPtr
field in the Process structure. This field is used to tell AmigaDOS where
to display its errors. Usually this is 0, and tells AmigaDOS to open a
requester on the Workbench screen (the CANCEL/RETRY type). If the field is
set to -1, AmigaDOS will not display an error to the user, but will return
an error code to the calling program. If the field is some positive value,
it's taken as an address of a window to display the error requester in. If
you modify this field in you program, make sure you reset it to its
original value before you quit.
What is it exactly you're trying to do? Are you trying to find out
the pointer to the CLI window? If so, then look at DOSTUF.ARC. I've
converted Andy Finkelstein C example of how to extract the WindowPtr to a
CLI window. I've used the new M2 compiler from Oxxi, which declares things
a bit differently, so you'll probably have to spend a few minutes
rearranging things. Using the Oxxi package, it took me 8 seconds to
compile the program, and another 3 to link it. F-A-S-T!! Hope this
helped. – Steve –
I had come to the same conclusion regarding the pr_WindowPtr member, and
am still looking for a relatievely easy way to find the window. I really do
think it should not be necessary to dispatch packets and muck about with
message ports, but so far no luck finding a link to the CLI window.
I don't know what Jim is trying to do, but I am trying to attach
AtermClock to a CLI window (the one I launch the ClockLoader from). It's a
gadget, and as such doesn't mess up the scrolling like a window does.
The next thing I want to do is to attach menus to the CLI window, mainly
just for the excercise, but possibly for a practical reason if it works
out. I can think of lots of ways to use that pointer. 🙂
I had come to the same conclusion regarding the pr_WindowPtr member, and
am still looking for a relatievely easy way to find the window. I really do
think it should not be necessary to dispatch packets and muck about with
message ports, but so far no luck finding a link to the CLI window.
I don't know what Jim is trying to do, but I am trying to attach
AtermClock to a CLI window (the one I launch the ClockLoader from). It's a
gadget, and as such doesn't mess up the scrolling like a window does.
The next thing I want to do is to attach menus to the CLI window, mainly
just for the excercise, but possibly for a practical reason if it works
out. I can think of lots of ways to use that pointer. 🙂