T.R | Title | User | Personal Name | Date | Lines |
---|
492.1 | Here's an example | PRNSYS::LOMICKAJ | Jeff Lomicka | Thu May 25 1989 13:42 | 10 |
| 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.2 | Where to look in the "Toshiba" example | PRNSYS::LOMICKAJ | Jeff Lomicka | Thu May 25 1989 13:53 | 17 |
| 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.3 | Ah Ha! Another manual? | ICHIN::MISKINIS | | Thu May 25 1989 14:22 | 13 |
| 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.4 | | PRNSYS::LOMICKAJ | Jeff Lomicka | Thu May 25 1989 19:17 | 13 |
| 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.5 | the number of my disk | ICHIN::MISKINIS | | Fri May 26 1989 01:34 | 10 |
| 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.6 | I knew there must be a better way | NAC::CHEUNG | | Fri May 26 1989 12:26 | 12 |
| 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.7 | I wouldn't go changing TOSHIBA.ACC | PRNSYS::LOMICKAJ | Jeff Lomicka | Fri May 26 1989 17:58 | 7 |
| 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.8 | | LDP::WEAVER | Laboratory Data Products/Science | Fri May 26 1989 18:29 | 6 |
| 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.9 | TOHSIBA.ARC corrupted? | ICHIN::MISKINIS | | Sat May 27 1989 01:16 | 6 |
| 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.10 | manual for the MWC RSC editor... | PEARS::BOEHM | Irren ist m�nnlich | Sat May 27 1989 11:27 | 6 |
| 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.11 | Success! | ICHIN::MISKINIS | | Tue May 30 1989 11:05 | 9 |
| 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.12 | Is this correct? | ICHIN::MISKINIS | | Wed May 31 1989 15:50 | 10 |
|
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.13 | Well, if iyou ask it to exit, the FORM_DO will exit | PRNSYS::LOMICKAJ | Jeff Lomicka | Thu Jun 01 1989 16:19 | 2 |
| after the form_do exited, you must have looped back and repeated the objc_draw()
call again. That's what draws the form.
|
492.14 | Yes, I'm calling objc_draw in the loop | ICHIN::MISKINIS | | Thu Jun 01 1989 17:17 | 7 |
| 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_
|