[comp.sys.mac] NEON

howard@amdahl.UUCP (Howard C. Simonson) (01/10/87)

( Surprise, this is not another article about Lightspeed C :-)

I have had a chance recently to toy with Neon ( I have version 2.0 ).
Lots of fun so far, excepting the scroll bars.  Anything but the thumb
causes a bomb.  Well I'm proud to say I tracked it down to the :PROC word
used for setting up an action procedure for TrackControl.  I called Kriya
and got the following patch:  6 ' pstart 48 + w!
Do this at the dictionary level and recompile the two shipped modules that
use scroll bars (install and examine, I believe).  They didn't seem to be
real hot on patching the :PROC source file but said that if you FORGET
further back than :PROC, you should fix the source if you're going to use
it.  It would *appear* that fixing the source is simply a matter of
changing the last word of the pstart hex code to "6" instead of "C", but
I haven't actually tested it yet.

On other NEON topics...   I didn't like the way NEON uses a text file to
build its application menu definitions.  I understand why; there is no
area in a MENU resource to store the action words associated with a menu
choice.  But still, I'd like to use a resource for my menu and get rid of
that extra file.  So, I did.  I made some assumptions:  the action word
for a menu item is the text of the menu item with a prefix (I use "aw-").
I created a getnew: method for class menu which loads the resource and
looks for the action words.  If it doesn't find an action word, it loads
the nullcfa.  This allows fairly nice incremental development.  If anyone
is interested in the code, mail me for a copy.  Enough interest and I'll
post it.  The nice thing is, just a few lines of method allows me to get
rid of the whole mLoad module.  For those who feel the action word naming
is too restrictive, try implementing my first (harder) idea.  Have a STR#
resource that matches in number the MENU resource and load the action words
from it.  I started working on it but found the former method easier and
clearer.

So I have made a little application out of the example "music" sources that
came with the 2.0 update.  So far it has a menu.  The next step is a scroll
bar for adjusting the tempo.  When I'm done, I'll try to seal it up into
a distributable application for playing Musicworks files.  So if someone
has been looking for just such an application, hold on a little longer.

Well, that's all on NEON for now. If anyone out there is using NEON, drop
me an electronic line- there must be more than two of us!

P.S. Oh, one more thing.  If you plan to use the NEON editor
     (MockWrite variant) or MiniWriter within NEON, be sure to give
     more room to the stack than just the deafult 3000 bytes.  I threw
     another 1000 or so on and have ceased the endless ID = 28 bombs.
     (If there's anthing I hate, its a smart *ss stack sniffer :-)
-- 
"Plan for the future because that's where you                Howard C. Simonson
    are going to spend the rest of your life." {hplabs,ihnp4,nsc}!amdahl!howard
         - Mark Twain -

[ The disclaimer for this message may be found in my next article ]