[futurebasic] Correcting Documentation on TESETSTYLE

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

From: Jay Reeve <jktr@...>
Date: Mon, 21 Jun 99 00:00:24 -0500
>You got me curious, so I wrote the FN you requested. Turns out to be much 
>simpler than either of us expected, although it took me 3 hours to get it 
>working.
>
Hi all,

I thought it might be useful to point out that the main reason it took me 
3 hours to get this working is that the FB documentation fails to 
indicate that the second parameter of CALL TESETSTYLE is a _pointer_ to 
the 12-byte text style record. It should be:

  CALL TESETSTYLE(mode,txtStylePtr&,redraw,teH&)

I did it by using #@:

  CALL TESETSTYLE(_addSize,#@txtStyleRec,_false,teH&)

Do yourselves a favor and make a note on Reference Manual p. 279 about 
the error. 

Do the same on the 'Text Edit' page in the online Toolbox Help file. Save 
it by choosing 'Save Subject' from the Help menu in the menu bar (not 
Apple menu).

Then someday when you want to use CALL TESETSTYLE, you won't have to 
spend the 3 hours that I did.

Strangely enough, the corollary, CALL TEGETSTYLE, accepts the record 
variable directly!

  CALL TEGETSTYLE(byte,txtStyleRec,lineH,ascent,teH&)

 0"0
 =J= a  y
  "