Message
Frame
The message frame is where UNIFACE puts
information about your program as it is run and compiled. However,
it does have some limitations
1. Accelerator
Keys do not work
In the ini file used by your
environment, if you have a section such as:
[accelerators]
; Accelerator to key mapping
fileopen=Ctrl+O
close=Ctrl+A
quit=Ctrl+F4
delete=Alt+D
editcut=Ctrl+X
editcopy=Ctrl+C
editpaste=Ctrl+V
editfind=F11
editfindnext=F12
Then you would expect to be
able to use the standard keys such as Ctrl+C and Ctrl+V to perform
cut and paste, however in the message frame this does not work
Instead you get the message:
I am yet to discover if there
is a reason for this.
2. Cut and Paste
The standard Windows 3.1 keys
do work however, so you can use:
Cut - Shift Delete
Copy - Ctrl Ins
Paste - Shift Ins
To cut and paste text to a text file on to the
operating system where your development runs, e.g. your PC, then you
can use the keystroke combination (on Windows, the Gold key is the +
on the numeric keypad):
Gold Space R X,
to remove the highlighted area to a text file.
To insert text from a file, you can use the
combination:
Gold Space I X
3. Search
To search for text in
the message frame you would usually use F11 to define your profile
and F12 to repeat the last search. These suffer from the same
problem as the 'cut and paste' keys.
You can use the Gold key sequences:
Gold Gold , - define profile
Gold , - search for text
4. Putmess_logfile
You can only view the
message frame if you can press the Gold M to invoke the screen, but
what if the application crashes, before you get a chance?
By adding an entry to your assignment file,
such as:
$putmess_logfile c:\temp\logfile.log
UNIFACE will automatically
copy every thing sent to the message frame to the specified logfile.
You can open the logfile (once UNIFACE has finished using it) in any
text editor such as Wordpad or Notepad
5. Putmess off and
xtrace on
That's fine, but what if your
application goes into an infinite loop or runs very slowly? It will
never finish, so you won't be able to access the logfile. If in
debug you specify
Putmess off
Everything written to
the message frame will be written to the screen (in character mode)
or written to the transcript window.
So what good is that?
Well if you combine that with xtrace, so in
debug, you specify the command
Xtrace
Ever line of executed
code will get copied to the message frame, but if you have set
putmess off, the code being executed will be displayed in the
transcript window.
So you can literally watch which code is being
executed, as it is run. This can be useful if you have an
application which is performing slowly, and you want to know where
the application is becoming slow.
Try it and see.
|