singer@endor.harvard.edu (Richard Siegel) (10/22/87)
> To: harvard!ames!scubed!usceast!pgn
The mailer at SCUBED.Arpa choked on this path.
Here's my response to your question; it may also be of general interest to
the net; the original question was about how to use screenBits.bounds from
an FKEY.
You can't use ScreenBits.bounds from a DA or FKEY, because code resources
(non-applications) can't use global variables. The solution is simply to
open a new GrafPort, and get its portRect -- for a newly opened grafPort
the portRect is the same as screenBits.bounds.
After you get the bounds, you can close it again.
A future version of Lightspeed Pascal will probably support the use of global
variables from DA's and possibly other code resources.
--Rich
**The opinions stated herein are my own opinions and do not necessarily
represent the policies or opinions of my employer (THINK Technologies, Inc).
* Richard M. Siegel | {decvax, ucbvax, sun}!harvard!endor!singer *
* Customer Support | singer@endor.harvard.edu *
* THINK Technologies, Inc. (No snappy quote) *