Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom controls and InvalWindowRect (?)



At 8:37 AM -0700 5/30/03, Eric Schlegel wrote:

Well, I plugged your sample code into a new app created from the Carbon (nib-based) template in Project Builder, and it worked; the SubPaneCarbonEventHandler function was called regularly in response to the invalidation of the window that occurred from the timer.

Well, we're not using PB, nor Mach-O, nor NIBs. I wonder if any of that might be related.

Really, the _only_ thing I can think of that would explain why the control isn't being drawn is if UpdateControls or DrawControls is not being called. Just to verify:

- you don't have a kEventWindowDrawContent handler, or if you do, you are calling UpdateControls or DrawControls in it?

Correct and correct (I've tried it both ways -- all three ways, if you count UpdateControls and DrawControls separately).

- you don't have a kEventWindowUpdate handler, or if you do, you are either sending a DrawContent event from it, or if you aren't, you're calling UpdateControls or DrawControls from it?

We do have a kEventWindowUpdate, but it's not getting invoked after the window invalidate; we only get kEventWindowDrawContent (when we have that handler instead).

If those questions don't get you on the right track, could you try attaching to your app with gdb, set breakpoints on UpdateControls and DrawControls, and make sure one of them being called somewhere?

Well, would you be satisfied with a CodeWarrior breakpoint and step-through, as well as a DebugStr that says "Calling DrawControls" right before the call to DrawControls?

I think we're going to give up on this for the time being, and go back to our own pane management. It makes it difficult to play nicely with things like tab panels, but at least it works most of the time.

Thanks,
- Joe

--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| email@hidden http://www.realsoftware.com |
`------------------------------------------------------------------'
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: custom controls and InvalWindowRect (?) (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.