Ok, I just checked my code and I found exactly that. I had a conditional
statement that wasn't balanced with a [NSGraphicsContext restoreGraphicsState].
I should of immediately thought of that as too many things were not operating
correctly. The biggest problem was that I didn't see these errors on my
machine. I only saw them on other machines. The scroll bar errors only appeared
on certain OSes like 10.6 and 10.8, but not on 10.7.
Thanks for everyone's input.
On Feb 02, 2013, at 09:58 PM, Kyle Sluder <[email protected]> wrote:
Unbalanced +[NSGraphicsContext saveGraphicsState] in your custom view's
-drawRect? (Or in one of its subviews'?)
--Kyle Sluder
On Feb 2, 2013, at 9:19 PM, Patrick Cusack <[email protected]> wrote:
You can see an example of the problem here:
http://i45.tinypic.com/fu8bpz.png
On Feb 2, 2013, at 8:06 PM, Graham Cox wrote:
On 03/02/2013, at 1:59 PM, Patrick Cusack <[email protected]> wrote:
Sorry, I have asked this before, but I am genuinely perplexed and need help. I
have an NSScrollView enclosing a custom view. When, I launch my application, I
see the scroll bars of my NSScrollView being echoed or duplicated in the middle
of my custom view. It is so annoying. I have tried everything I can to figure
out why it is doing it. Has anyone ever seen this? I have been slowly pulling
things out of my model, but the only thing that keeps it from happening, is if
I completely hide the scrollbars, but then I need to add logic to scroll the
view inside the scrollview.
Well, I've never seen this happen despite using NSScrollView extensively.
So that suggests that there is something a bit strange with the way you're
creating it, or setting it up.
In IB, you can either add a scroll view than add a custom view to it, or add a
custom view and then use 'Embed in Scrollview' to wrap it in the scrollview.
Both work fine for me.
The next thing to check is the sizing settings. Are you using classic springs
and struts or the newer constraints? I'm afraid I don't yet have any experience
with the new thing, only springs and struts. The scroller should usually be set
to expand and stick to all four sides of its enclosing view, but the custom
view within is usually of a fixed size, and this might change programmatically
according to your content. There's no reason to change any other setting, such
as the scrollbars or the clip view of the scrollview.
Whether your custom view is flipped or not will affect the way the scrollview
behaves - something to check.
Does anything in your code "fiddle" with the scrollview? There is rarely a need
to. Have you subclassed it, and overridden something like -tile?
You could try starting a fresh project and quickly trying to put together a
simple scrollview without any special code and verify it works, then look for
what difference there is in your project that changes that.
--Graham
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/kyle%40ksluder.com
This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]