[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

492.0. "How do "use" a .RSC file?" by ICHIN::MISKINIS () Thu May 25 1989 16:06

    Hello,
    
    	Well, I'm finally able to say that I've mastered the use
    of the Atari interupt (using Timer A).
    
    	Now, I need help with Mark Williams C, regarding the use
    of a resource file.
    
    	How the H*ll do you use it?  I've created a form with a few
    buttons, some text, and an image.  I can't find ANY REAL
    disc ussion of how to use it though...
    
    	Anybody have a clue?  I saw some brief stuff in the AES
    documentation, and I even can load it in using rsrc_load.
    But how do I get it on the screen, and use it?
    
    MUCH thanks in advance,
    
    _John_  Who is trying to build a user interface to a home-brewed
    	    sequencer!
    
T.RTitleUserPersonal
Name
DateLines
492.1Here's an examplePRNSYS::LOMICKAJJeff LomickaThu May 25 1989 16:4210
A fairly simple MWC program that uses a resource file can be found in
PRNSYS::DUA1:[LOMICKAJ.HOBBY.ST]TOSHIBA.ARC.  Included are all source
files, the makefile, the .RSC, and the .RSD.

I'm not sure which version of "toshiba" this is, but you might be able
to get some hints from it.

(It's in STREM_LF form, for use with VMS ARC.  Be sure to CVTARC V it
before using STRANSF, or use SET FILE TYPE BLOCK in Kermit.)

492.2Where to look in the "Toshiba" examplePRNSYS::LOMICKAJJeff LomickaThu May 25 1989 16:5317
I hunted around in TOSHIBA.C.  To see how to process a form, look at the
two routines "testrsc()" and "process_form()".  "testrsc()" loads the
resource file, going to some trouble to find it.  "process_form()" does
the part where the user edits the form.

One funny thing about this program (Toshiba) is that it saves the
ENTIRE screen in an off-screen buffer before putting up the form,
points the video memory at this copy, and restores it afterwords.  This
is not the usual way in which to do this - usually you just put up the
form, and when you are done, do a "form_dial( 3, x,y,w,h,x,y,w,h)" in
order to force GEM to generate redraw events to the windows under the
form (or to get GEM to redraw the desktop background under the form.)

The Mark Williams "resource editor" manual includes some example
programs that use resource files.  Perhaps you were only looking in the
programming manual?

492.3Ah Ha! Another manual?ICHIN::MISKINISThu May 25 1989 17:2213
    I bought the Mark Williams "C" used.  I got the programming
    manual, and the source-level debugger manual.
    
    I take it I got "jipped", and there's a separate Resource Editor
    Manual?
    
    I'd love to find out how to get the .RSC stuff to work tonight,
    so I'll look at toshiba for now!
    
    THANKS!  I didn't expect any replies so soon!
    
    _John_
    
492.4PRNSYS::LOMICKAJJeff LomickaThu May 25 1989 22:1713
What version of MWC do you have, as in, waht are all the digits on the
sticky label on distribution disk 0?

I'm not sure if you are missing the resource editor manual or not.

Note that I never refer to the resource editor book - I read it once
when I was beta testing.  It might just be a chapter in the regular
book.  I'll sort it all out when I get home and let you know.

Also, some MWC upgrades happened without manuals, only release notes. 
It's possible that somewhere along the way the original owner just
didn't get the manual for the resource editor.

492.5the number of my diskICHIN::MISKINISFri May 26 1989 04:3410
Hi Jeff,
    
    The number of the disk is CAG-2688-3.0.5
    
    I'm just about to download the TOSHIBA example...
    
    Thank Jeff...
    
    _John_
    
492.6I knew there must be a better wayNAC::CHEUNGFri May 26 1989 15:2612
    re .2  
    
    That must be the mucked-up version with the color modes I added.
    
    I didn't know how to redraw desktop background under the form,
    the first thing that came to mind was to save the entire screen.
    Now that I know how to do it, I can get rid of the Malloc al-
    together ... thanks Jeff.
    
    Anyway it was a good exercise :-)
    
    Ray
492.7I wouldn't go changing TOSHIBA.ACCPRNSYS::LOMICKAJJeff LomickaFri May 26 1989 20:587
For "Toshiba", as a desk accessory, the save-the-screen approach is
better, becuase it means that you don't have to wait for the application
to redraw it's windows before you do a print-portion-of-screen
operation. 

For ordinary windowing applications, it's better to use the form_dial(3)
approach.
492.8LDP::WEAVERLaboratory Data Products/ScienceFri May 26 1989 21:296
    I think the MWC resource editor docs are included in later version of
    the programming manual.  I will have to double check my distribution at
    home.  I know that they did also release a separate version of the
    manual as well.
    
    						-Dave
492.9TOHSIBA.ARC corrupted?ICHIN::MISKINISSat May 27 1989 04:166
    I tried to download toshiba.arc twice.  It seems to be messed up.
    Has anyone else experienced this?  ARCX.TTP says it has a bad
    header...
    
    _John_
    
492.10manual for the MWC RSC editor...PEARS::BOEHMSat May 27 1989 14:276
    In my distribution of MWC V3.0.6, there is a separate manual for the
    included resource editor. Title: "Mark Williams Resource Editor for the
    Atari ST", 85 pages.
    
    Regards. / Hilmar.
    
492.11Success!ICHIN::MISKINISTue May 30 1989 14:059
    I was successful in getting the TOSHIBA files finally.  It was
    MY fault!  I didn't read the note close enough, used the SET FILE
    TYPE BINARY with kermit, and tried to ARCX.TTP the files...
    
    Anyway, I have now got my resource file interface working correctly,
    but have only tried using 1 form so far.  Thanks for everyone's
    help!
    
    _John_
492.12Is this correct?ICHIN::MISKINISWed May 31 1989 18:5010
    
    Well, I've got a form up on the screen.  I found that I have
    to set the EXIT flag, otherwise it won't junp to the proper CASE
    label, and execute...
    
    I also noticed that the entire form is redrawn when I select
    a radio button that has exit set.
    
    Is this normal?
    
492.13Well, if iyou ask it to exit, the FORM_DO will exitPRNSYS::LOMICKAJJeff LomickaThu Jun 01 1989 19:192
after the form_do exited, you must have looped back and repeated the objc_draw()
call again.  That's what draws the form.
492.14Yes, I'm calling objc_draw in the loopICHIN::MISKINISThu Jun 01 1989 20:177
    Ah, OK, now I'm starting to understand all this stuff...
    
    YES, I know for a fact that I call objc_draw in the loop...
    
    Thanks Again!
    
    _John_