[futurebasic] Re: FN printStyleFld

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 1998 : Group Archive : Group : All Groups

From: BMichael <BMichael@...>
Date: Mon, 16 Mar 1998 19:39:01 EST
>I've got the _mainPrint problem worked out, now I've discovered that
>whenever I call printStyleFld, it bombs. I call printStyleFld like this:
>
>FN printStyleFld(FN GETRESOURCE(_"ZTXT",0)
>
>and whenever i do that the computer freezes.

Well, other than a missing ")" at the end up there, it _looks_ like 
you're asking for ZTXT resource with the ID of 0. That's suspicious, as 
it's real rare to see _any_ user created resource below 128 (in fact, for 
the "standard" types, it's a no-no) and especially 0. FN printStyleFld 
_does_ have the intelligence to exit if the handle passed is _nil, so 
that's not it...

Try setting up a separate variable, hdl& or something, and do this;

  hdl& = FN GETRESOURCE(_"ZTXT",0)
  IF hdl& = _nil THEN BEEP:BEEP:BEEP
  FN printStyleFld(hdl&)

and see where (or if) it crashes. Oh... be sure you've got DEFSTR LONG 
somewhere! Otherwise the _"ZTXT" won't work.

Bill