[futurebasic] Re: [FB] Container Contents to EUTC

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2009 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Thu, 16 Jul 2009 22:42:26 +1200
Ken Shmidheiser wrote:

> I have a valid container (I can print the contents-- 707 lines-- to  
> a window). But when I try to put the contents into a EUTC, the code  
> consistently crashes in FB 5.3b4.
> Can anyone see what I'm overlooking?

> // EUTC created with this
> SetRect( r, 10, 10, 190, 455 )
> appearance button _fontsEF,,,,,, @r, _kControlEditUnicodeTextProc
> // gC is a valid container with 707 lines of Str255s
> // Here is how I am trying to load the container into the control
> dim as Pointer p
> dim as Long   size
> p = [[@gC]]
> size = fn GetPtrSize( p )
> long if ( p )
> err = fn SetControlData( button&( _fontsEF ), _kControlEditTextPart,  
> _kControlEditTextTextTag, size, #p )
> end if

dim as Handle cntrH
cntrH = [@gC]
size = fn GetHandleSize( cntrH )
p = [cntrH]

Robert P.