At 7:19 am -0500 08/03/01, Morbus Iff wrote:
> >MacOS 'TextEdit' is intended for just this kind of thing. It will
> >handle line wrapping for instance, which is quite difficult to do
>
>I had looked into that, thought it was the master, and then couldn't find a
>way to make the output NON-modifiable by the user. I'll jump into the pod
>on that one again, but if you know the answer, save me the hair pulling ;)
Well a TE field is only 'modifiable by the users' if you provide them
with a function to handle key events with TEKey(KEY, HTE). If you
don't then they can't -- it's as simple as that. The package
'MacTextEdit' in TextEdit.pm (which is a TextEdit field embedded in a
window pane) shows you an example of how it goes.
>Yeah, the PTF book was what I was using as my source for GUI junk, but it
>only showed me how to add menu's, not wipe out the menu bar, and start
>afresh. Eventually, I found pudge's mp3 player app on his site, which had
>an example of what I wanted...
Look at the available functions in 'Menu.pm':
MENUBAR = GetMenuBar()
ClearMenuBar()
SetMenuBar MENUBAR
These will do all you want to save, delete and restore the MenuBar.
However remember you may have to take care that if 'your window' goes
into the background and some other window comes to the front, that
you do the right thing with the MenuBar.
>Alan - I didn't see MPEdit.pm on your site, either in the xplatform or
>mac-only sections. Ultimately, what I'd like to create is a simple spitup
>log window. It's resizable, automatically scrolls, and I can print to it as
>if it were a filehandle/pipe. It's not absolutely necessary to redirect
>STDOUT - I'd just have to remember to silence STDOUT before passing the app
>off.
I do beg your pardon -- I should have said:
http://www.macperl.org/depts/Code/Modules/
However to design a window containing a text field which is
resizeable and scrollable is not that simple an undertaking. It is
certainly doable but it will take some programming effort -- the code
will not, as it were, write itself.
HTH,
Alan Fry