[Pythonmac-SIG] Ctl.CreateRootControl( window ) always returns None
Steven D. Majewski
Thu, 11 Mar 1999 12:26:21 -0500 (EST)
On Thu, 11 Mar 1999, Jack Jansen wrote:
> Recently, "Steven D. Majewski" <firstname.lastname@example.org> said:
> > Every attempt at calling Ctl.CreateRootControl( window ) returns None.
> > I've tried with various flavors of Dialog and plain windows, visible
> > and invisible (just in case that made a difference) but it always
> > returns None, and calling Ctl.GetRootControl( window ) also returns
> > None.
> > Am I missing a step in how to use this function or is it a bug?
> This is a bug. I'll look into it.
Looks like the same bug infects GetSuperControl, so the wrapper funcion
CtlObj_WhichControl is suspect. Is it supposed to be calling
GetControlReference() ? Shouldn't it be the control itself and not
the RefCon value ?
Anyway -- the good news for all you appearance manager fans out there
is that, except for these couple bugs, auto-embedding of controls
seems to work properly as far as I can tell. Some of the more complex
emdedding controls need additional resources, so it's a bit trickier
to generate, say a set of tabbed folders dynamically from Python
if you haven't set up the appropriate 'tab#' resources beforehand.
BTW: There is a password control with appearance mgr. but I tried
sticking one in a dialog and it doesn't seem to do anything visible
when ModalDialog is called on it. Something is missing -- maybe it
has to request the keyboard focus explicitly. If anyone has a clue
let me know.
Re: appearance mgr support for dialogs present?
Any more thoughts about how to protect function calls if support
is not there ? For progress-indicator and (I assume) password
control, which require a CDEF that's included with appearance
mgr extension or is included in 8.x, failing to find that resource
could be the test.
Is there an interface to the gestalt calls ?
---| Steven D. Majewski (804-982-0831) <sdm7g@Virginia.EDU> |---
---| Department of Molecular Physiology and Biological Physics |---
---| University of Virginia Health Sciences Center |---
---| P.O. Box 10011 Charlottesville, VA 22906-0011 |---
Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*)