Skip navigation.
 
mlRe: Equivelent to drawRect: for drawing after sub views are drawn
FROM : Glenn Andreas
DATE : Tue Oct 05 20:39:02 2004

At 9:59 AM -0700 10/5/04, George Lawrence Storm wrote:
>On Oct 5, 2004, at 4:30 AM, Ricky Sharp wrote:
>
>< Deleted >
>

>>>>I need to perform the equivalent to NSView's drawRect:, however I need
>>>>it to be called AFTER its sub views are drawn.
>>>>
>>>>Is there a method I can override for such a purpose?
>>>>
>>>>I need to draw a transparent overlay & some guidelines which will
>>>>overlap some of those sub views.

>>>
>>>After receiving only one response which seemed a bit more involved than
>>>I feel it should be I started to play around.

>>
>>And what you're doing below isn't even more involved?

>
>< Deleted >
>
>I feel it is much simpler, I now have a single custom view (direct
>descendent of NSView) which is part of my library. That view has
>only two methods, one of which is my drawPostRect:. I now simply
>inherit from it when I create my main view, or can use it as is and
>create sub views directly in it.



Since your using undocumented routines, have you tested it thoroughly
with every single release of the OS and update that you support?
(After all, they're not guarenteed to work the same from release to
release)  Are you adding forward compatbility workarounds to detect
when that routine is removed in the future (or one of the parameter
types change)? And if 10.3.6 (or whatever) comes out with that
routine removed, you'll need to redo everything to resolve that
anyway, so why not do it right from the start?

Relying on undocument routines signficantly increases your testing
demand and future support load - in the long run, due to
dependancies, it is often more involved.

--
Glenn Andreas                      <email_removed>
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know