[futurebasic] [FB3] Out of Focus

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

From: Jay Reeve <jktr@...>
Date: Mon, 25 Oct 99 00:07:28 -0500
Hello System & Hardware cognoscenti,

I'm porting this question to the general list from the beta list, where I 
got some very helpful responses but no solutions.

I've been working with the Appearance Manager. There is one call, fn 
DrawThemeFocusRegion, which always crashes on my machine (PPC 601, OS 
8.0). Andy Gariepi said:

>short vs long Result
>
>should cause a crash 68k and work PPC....
>
>Andy

Chris Young (Thanks Chris!) confirmed that the toolbox definition matched 
the universal interfaces in C, and said:

>It compiled and ran in both 68K 
>and PPC, FB 3.0.19, OS8.1, PM 7100/66. I also changed myRgn to a 
>RGNHANDLE, and that ran also.

I would like to figure out whether this is a hardware thing or a system 
problem. Could it be a FB bug? Is there a way to get it to work 
consistently?

I know I'm often reluctant to try code that someone says is crashing (I 
hate rebooting), but on my machine it is a soft crash--an "es" in macsbug 
will exit cleanly. I would like to know what machines and OS's will run 
this and which won't. Especilly if there are others running 8.0--does it 
work for you?

Please run this short demo and report your machine, OS, FB^3 version, and 
results to me at jktr@....

BTW, don't run it unless you have appearance mgr active. I think that 
means OS 8.0 minimum, doesn't it?

Below is the code Chris said worked for him. If you run it using the 
debugger, it will draw in the debugger window, but that doesn't seem to 
be a problem. Many thanks for your efforts and suggestions, and 
especially for any effective remedies!

 0"0
 =J= a  y
  "

'~'
include "TLBX Appearance.Incl"
'~'
'* * * Assumes appearance mgr is active * * *
fn RegisterAppearanceClient

dim myRect as rect
dim myRgn as RgnHandle
dim draw as boolean

myRgn = fn newrgn
draw  = _zTrue

long if myRgn
setrect(myRect,10,20,80,90)
paintrect(myRect)'show rect
FN DrawThemeFocusRect(myRect,draw)'This one works!
delay 1000
FN DrawThemeFocusRect(myRect,0)'Erase it
rectrgn(myRgn,myRect)
erasergn(myRgn)'Show we have good region

'CRASH (soft) on next line:
' "Unimplemented Instruction at 000544DC"
' The instruction is "RTE" in what looks to me
' like 68k code.
fn DrawThemeFocusRegion(myRgn,draw)

disposergn(myRgn)
end if