View>>parentView:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

View>>parentView:

Steve Alan Waring
The behavior of View>>parentView: has changed in D6. It now assumes all
views should be child views regardless of what the parent/owner view
is. (ShellView overrides this with the D5 implementation of
View>>parentView:).

This breaks a couple of my view subclasses. For example, I have a view
subclass that uses WS_EX_LAYERED style which can only be used with top
level windows.

D5's implementation of View>>parentView: seemed a fairly natural
default to me. Is there a reason for the change? Could the method be
refactored or be made public, so that I can officially override it in
my subclasses?

My preference would be to extract to a new method, the test of whether
the view should have the WS_CHILD style. This would make it easier to
control whether the creationParent is actually the parent or owner of
the view.

Thanks,
Steve
--
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: View>>parentView:

Blair McGlashan-4
"Steve Alan Waring" <[hidden email]> wrote in message
news:[hidden email]...

> The behavior of View>>parentView: has changed in D6. It now assumes all
> views should be child views regardless of what the parent/owner view
> is. (ShellView overrides this with the D5 implementation of
> View>>parentView:).
>
> This breaks a couple of my view subclasses. For example, I have a view
> subclass that uses WS_EX_LAYERED style which can only be used with top
> level windows.
>
> D5's implementation of View>>parentView: seemed a fairly natural
> default to me. Is there a reason for the change? Could the method be
> refactored or be made public, so that I can officially override it in
> my subclasses?
>
> My preference would be to extract to a new method, the test of whether
> the view should have the WS_CHILD style. This would make it easier to
> control whether the creationParent is actually the parent or owner of
> the view.

I'll look into it Steve. I'm not sure why it was changed, but my preference
would be as yours, i.e. for it not to do that at all.

Regards

Blair