[futurebasic] Re: [FB] DragGrayRgn has stopped working

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 1999 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Sun, 3 Jan 1999 19:05:56 +1300
>
>LOCAL FN DeplaceCarte
>  CALL SETRECT(carteT,0,0,48,61)
>  CALL SETRECT(limitRectT,0,0,WINDOW(_width),WINDOW(_height))
>  slopRectT;8 = limitRectT
>  CALL GETMOUSE(MouseY)
>  CALL OFFSETRECT(carteT,MouseX-(carteR-carteL)/2,MouseY-(carteB-carteT)/2)
>  theRgn& = FN NEWRGN
>  CALL OPENRGN
>  CALL FRAMEROUNDRECT(carteT,10,10)
>  CALL CLOSERGN (theRgn&)
>  LONG IF theRgn&
>    offset&=FN DRAGGRAYRGN(theRgn&,MouseY,limitRectT,slopRectT,0,_nil)
>    CALL DISPOSERGN (theRgn&)
>  END IF
>  <snip>
>END FN = MouseY
>
>Please let me know, if you see something wrong in it.


The problem is not due to OS 8.5.1. It is that you have not set slopRect
correctly. The 8-byte assignment statement
>  slopRectT;8 = limitRectT

should be

slopRectT;8 = @limitRectT

Robert