gaines@calgary.UUCP (Brian Gaines) (05/23/88)
Having spent several hours finding why colored windows would not work in Turbo Pascal (1.1) and MPW Pascal (2.0.2), I felt it might save others the time if the results were passed on - apologies if this info has been sent before. IM V is very messy in Chs.11 & 12 (Window Mgr, Control Mgr) - MPW uses WindowPtr not CWindowPtr, SetWinColor takes a WCTabHandle, not a CTabHandle, GetAuxWin takes an AuxWinHndl not a CTabHandle (V-207); GetAuxCtl takes an AuxCtlHndl not an AuxWinHndl (V-223). The glue for GetAuxWin in Turbo is incorrect in that the AuxWinHndl is not declared as a variable - it is correc t in MPW. The glue for GetAuxCtl in both MPW & Turbo is incorrect in that the AuxCtlHndl is not declared as a variable. Both of these may be corrected by recompiling the glue or fixed by declaring your own inlines correctly. SetWinColor violates IM I-165, that only SetPort changes thePort - you need to save and restore thePort for it. --- As a remark in passing, IM V-6 wrongly documents SysEnvirons as having a SysEnvRecPtr as a parameter - it should be a SysEnvRec. This is important for Turbo as Borland forgot the glue for this and you have to add it yourself. It is straightforward to extend the trap through the glue, as does MPW, to fill in the fields correctly for older macs - particularly if you Nosy the MPW glue! --- It would be useful to have a full list of IM V errors and any other strange behaviors in the new rom functions and various glues. It would also be useful to know whether Apple accept the SetWinColor action on thePort as a bug and are going to fix it. Brian Gaines gaines@calgary.cdn ihnp4!alberta!calgary!gaines