[net.micro.mac] Resourceless alert/item lists

dubois@uwmacc.UUCP (Paul DuBois) (09/25/86)

I just posted to mod.sources.mac some source for doing an alert
without resources.  It displays any message and can be configured
to 1, 2 or 3 buttons, thus is suitable for OK, Yes/No, Yes/No/Cancel,
etc. types of alerts.  The default button (the one with the bold
outline around it) may be specified.

It works by creating the window with NewDialog and by constructing
the item list itself.

What's it good for?  One thing is that libraries using alerts
can be distributed by source or object code only, so they can be
made real plug-ins.  Nothing need be hacked into the resource fork
of anything using them.
-- 
Paul DuBois     UUCP: {allegra,ihnp4,seismo}!uwvax!uwmacc!dubois    |
                ARPA: dubois@easter                               --+--
                      dubois@rhesus (no kidding)                    |
                                                                    |
"If it works, I didn't write it."
"That's for sure!"

thomas@utah-gr.UUCP (Spencer W. Thomas) (09/27/86)

Thank you Paul (one of the net's MVPs), for posting the "resourceless
alert" code.  Another use for this code is to put up an alert if you
can't open your resources (happens to me occasionally in LightSpeed,
because I give the resource file the wrong name, or something).  You
can't say Alert(NoResourceId) if you don't have any resources!

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)