[comp.sys.amiga] Requesting requester advice

hobie@sq.UUCP (01/09/87)

	I have this problem with my Requester.  I am using KS & WB 1.2,
rev 33.39, and the Lattice 3.02 compiler.  I define the Requester, point to
a CANCEL and a OK gadget (which have REQGADGET and ENDGADGET flags).  When I
call Request(&Requester), it appears correctly with the gadgets and borders,
but the gadgets don't click (no highlighting appears). So the requester never 
goes away.  Is there some trick not mentioned in the Intuition manual that I 
should do?  I did follow the recommended procedure: declare a Requester 
structure, call InitRequester(), fill in the size, gadget pointer fields, etc.,
then call Request().
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Hobie Orris
	SoftQuad Inc., Toronto, Ont.
	{ihnp4 | decvax | ? }!utzoo!sq!hobie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lines: 16

cmcmanis@sun.uucp (Chuck McManis) (01/12/87)

In article <1987Jan9.155019.8267@sq.uucp>, hobie@sq.UUCP writes:
> 	I have this problem with my Requester.  I am using KS & WB 1.2,
> rev 33.39, and the Lattice 3.02 compiler.  I define the Requester, point to
			     ^^^^
> 	Hobie Orris

Hobie, do yourself and your customers a favor and upgrade to at least the
3.03 version of the compiler, preferably the 3.10 version. The 3.02 version
has some serious bugs in it that cause pointer arithmetic to screw up
royally and when building requesters you undoubtedly use *lots* of pointers.


-- 
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.

joemu@nscpdc.NSC.COM (Joe Mueller) (01/13/87)

In article <11276@sun.uucp>, cmcmanis@sun.uucp (Chuck McManis) writes:
> Hobie, do yourself and your customers a favor and upgrade to at least the
> 3.03 version of the compiler, preferably the 3.10 version. The 3.02 version
> has some serious bugs in it that cause pointer arithmetic to screw up
> royally and when building requesters you undoubtedly use *lots* of pointers.

I just blew a week of debugging time trying to track down what appears to be
a compiler bug in V3.03 of the Lattice compiler. I have a structure that
contains a pointer to a Window structure. My code then does some computations
based on the LeftEdge, TopEdge, Width, and Height of the window. I kept getting
the wrong answers. The code looked something like this:

if ( wind_desc->w_curx > (wind_desc->w_wind_ptr->Width - 4) ) {
	/* scroll line & set curx to LeftEdge */
}

I finally gave up and took the computation out of the conditional:
i.e.
	foo = wind_desc->w_wind_ptr->Width - 4;
	if (wind_sesc->w_curx > foo) {
		/* scroll line & set curx to LeftEdge */
	}

It then worked fine! Can someone at Commodore tell me if they are going to
update the developers with new 3.10 (or later) compilers (even for a fee)?
Do we need to contact Lattice individually? If we may get updated, when can
I do it and what will it cost?

					Joe Mueller
					...!nsc!nscpdc!joemu

andy@cbmvax.cbm.UUCP (Andy Finkel) (01/14/87)

In article <1987Jan9.155019.8267@sq.uucp> hobie@sq.UUCP (Hobie Orris) writes:
>
>
>	I have this problem with my Requester.  I am using KS & WB 1.2,
>rev 33.39, and the Lattice 3.02 compiler.  
You are using an out of date Workbench (the release version is 33.47),
and a seriously out of date compiler.  You should upgrade to
3.03 as soon as possible. (I don't know if your kickstart is up to
date; you didn't give its number)

I define the Requester, point to
>a CANCEL and a OK gadget (which have REQGADGET and ENDGADGET flags).  When I
>call Request(&Requester), it appears correctly with the gadgets and borders,
The call to Request should be Request(&Requester,window).
If you are already doing that, the problem might be in your very early
compiler.  If neither of these is the problem, you should either mail or
post a code fragment, because the rest of your description sounds ok.
>	Hobie Orris
			andy finkel

-- 

			andy finkel
			Commodore/Amiga
			{ihnp4|seismo|allegra}!cbmvax!andy
		or	 pyramid!amiga!andy

Any expressed opinions are mine; but feel free to share.

I disclaim all responsibilities, all shapes, all sizes, all colors.

"Never make anything simple and efficient when it can be complex and wonderful."

hobie@sq.UUCP (01/15/87)

In article <11276@sun.uucp> cmcmanis@sun.uucp (Chuck McManis) writes:
>In article <1987Jan9.155019.8267@sq.uucp>, hobie@sq.UUCP writes:
>> 	I have this problem with my Requester.  I am using KS & WB 1.2,
>> rev 33.39, and the Lattice 3.02 compiler.  I define the Requester, point to
>			     ^^^^
>> 	Hobie Orris
>
>Hobie, do yourself and your customers a favor and upgrade to at least the
>3.03 version of the compiler, preferably the 3.10 version. The 3.02 version
>has some serious bugs in it that cause pointer arithmetic to screw up
>royally and when building requesters you undoubtedly use *lots* of pointers.

	The 3.02 compiler may be a pig, but I can do menus, gadgets, bobs,
sprites, etc.  It seems unlikely that the compiler would be responsible for
this one problem, yet allow me to do all of these other things.  I suspect
that there is a crucial step undocumented in the Intuition book, like the
one in the RMK I found: it tells you how to initialize your GelsInfo, and
how to initialize your bob, move it around, etc.  It never mentions that you
should link the GelsInfo to your RastPort.  I just figured that one out on
my own...

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Hobie Orris
	SoftQuad Inc., Toronto, Ont.
	{ihnp4 | decvax | ? }!utzoo!sq!hobie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lines: 27

carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (01/15/87)

In article <1987Jan9.155019.8267@sq.uucp> hobie@sq.UUCP (Hobie Orris) writes:
>
>	I have this problem with my Requester.  I am using KS & WB 1.2,
>rev 33.39, and the Lattice 3.02 compiler.  I define the Requester, point to
>a CANCEL and a OK gadget (which have REQGADGET and ENDGADGET flags).  When I
>call Request(&Requester), it appears correctly with the gadgets and borders,
>but the gadgets don't click (no highlighting appears). So the requester never 
>goes away...

   I've never used a requester, but my suggestions include:

      RELVERIFY|ENDGADGET  for Activation
      BOOLGADGET|REQGADGET for GadgetType

      and specify GADGETUP in your window's IDCMP flags

   The RELVERIFY causes a GADGETUP message to be sent when a gadget
is released.  The BOOLGADGET says the gadget changes state when clicked
on.  The IDCMP flag GADGETUP allows GADGETUP messages to be sent to
your window.
   
   And if you want Highlighting when the gadgets are selected, you must
specify the type of highlighting in the Gadget structure.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=