[comp.sys.amiga.programmer] Beginner question, revisited

peterk@cbmger.UUCP (Peter Kittel GERMANY) (01/30/91)

In article <38607@cup.portal.com> Chris_F_Chiesa@cup.portal.com writes:
>
>I'm trying to ease into Amiga programming and am beginning to realize that
>my current documentation and resources are woefully inadequate.  For one
>thing, I never made it to KS/WB 1.3, much less 2.0.  Can I still obtain
>1.3 and 2.0 disks AND MANUALS from somewhere?  I haven't been able to find
>'em via mail-order from anyplace with an ad in AmigaWorld...  

You can get the full 1.3 Native Developer Kit from CATS in the US.

>Anyway...  I'm trying to do the simplest of simple things: open a window
>and draw a line in it.
> [ stuff deleted ]
>My code opens a Window, grabs the pointer-to-RastPort value from the .RPort
>field of the Window struct, then does one of two thingsither of which 
>works):
>  a) Calls DrawBorder() 
>  b) Calls Move() and Draw()

Could it be you just forgot to SetAPen() before this? Perhaps all these
lines were actually drawn, but in background color?

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk

Chris_F_Chiesa@cup.portal.com (02/04/91)

Hello All.

  First, thanks to everyone (all three of you) who responded to my questions;
I will be contacting CATS for the 1.3 (and 2.0?  There were varying opinions
as to whether 2.0 is "available" yet) KS/WB with docs...

  Second, there were varying opinions as to how to solve my "window opens 
but no graphics appear" problems.  One person said I had to create a tmpras
structure, allocate bitmaps, etc. etc., whereas another said I just had to
grab the RPort supplied with my window after OpenWindow() did its thing.  I
investigated both of these alternatives, and ended up typing in the first
example program from Rob Peck's book, fixing several syntax/punctuation 
errors, and cross-checking HIS program (which worked) against MINE (which
seemed to do the EXACT SAME things but DIDN'T work.)  I found the problem, 
and boy do I feel stupid: I was opening the intution.library, but never
opening the graphics.library !  Oddly, this didn't seem to crash Move(),
Draw(), PolyDraw(), or DrawBorders(), but DID crash SetAPen() !  Figure
THAT one out.  Anyway, I added the appropriate OpenLibrary() call to 
provide graphics library functions, and the problems evaporated.  I have
had the delightful pleasure, this very morning, of seeing my very own 
graphics appear in my very own window on the Amiga!  What an experience! :-)

Chris Chiesa
  Chris_F_Chiesa@cup.portal.com