Reaction getscreenmode.gadget issue
Posted: Sat Jun 04, 2016 8:39 pm
While I was helping LyleHaze look for a getscreenmode example at http://www.os4coding.net, I posted an example that used this:
Both Lyle and I discovered that the program only worked when certain other programs were running.
The example program always works when I cnanged the above code to this:
The getscreenmode_gc.doc states this:
GETSCREENMODE_GetClass
This function is deprecated as of V52.
Use the "getscreenmode.gadget" public class ID instead.
Can anyone explain why "getscreenmode.gadget" doesn't work reliably but the deprecated function does??
Code: Select all
LAYOUT_AddChild, objects[OID_SCREENMODE] = IIntuition->NewObject(NULL, "getscreenmode.gadget",
GA_ID, OID_SCREENMODE,
GA_RelVerify, TRUE,
GA_Disabled,FALSE,
GETSCREENMODE_DisplayID,0,
GETSCREENMODE_MinDepth, 0,
GETSCREENMODE_MaxDepth, 32,
TAG_END),
The example program always works when I cnanged the above code to this:
Code: Select all
#define GetScreenModeClass IGetScreenMode->GETSCREENMODE_GetClass()
LAYOUT_AddChild, objects[OID_SCREENMODE] = IIntuition->NewObject(GetScreenModeClass, NULL,
GA_ID, OID_SCREENMODE,
GA_RelVerify, TRUE,
GA_Disabled,FALSE,
GETSCREENMODE_DisplayID,0,
GETSCREENMODE_MinDepth, 0,
GETSCREENMODE_MaxDepth, 32,
TAG_END),
GETSCREENMODE_GetClass
This function is deprecated as of V52.
Use the "getscreenmode.gadget" public class ID instead.
Can anyone explain why "getscreenmode.gadget" doesn't work reliably but the deprecated function does??