[futurebasic] Re : [FB] Multiple Resource Problem

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

From: "jonathan" <jonathan@...>
Date: Sat, 01 May 1999 17:11:21 +0200
> I have been using the following to swap between resource files
> 
>   oldres = FN CURRESFILE
>   RFnum% = FN HOPENRESFILE(SYSTEM(_aplVol), 0, res$, _fsRdPerm)
>   LONG IF RFnum% <> -1
>     CALL USERESFILE(RFnum%)
>     lh& = FN GETRESOURCE(_"PICT",chelp)
>     LONG IF lh&
>     .....
>       CALL RELEASERESOURCE(lh&)
>     END IF
>     CALL USERESFILE(oldres)
>   END IF
>
>
> In one part of the program after doing a print routine the program
> starts putting data resources as opposed to program resources on the
> screen. Is there a call I can make to return to the BUILT resource when
> the program looses the plot?

this is specifically one of the cases where STAZ warns against using
CURRESFILE, both in the FB books, and in a memorable article in macTech
magazine.  You should find the gist of the information in the FB books, or
go to MacTech's web site (www.macTech.com) and do a search on back numbers
for 'resource manager' AND 'Stasny'. you should find it.

HTH
jonathan