Re: Scrolling [SOLVED]
Re: Scrolling [SOLVED]
- Subject: Re: Scrolling [SOLVED]
- From: David Blanton <email@hidden>
- Date: Fri, 15 Jan 2010 15:19:32 -0700
Thanks for the heads up Kyle.
The solution was to override trackKnob and in it set a flag that
scrolling was in play. Then in my drawRect I check the flag to do
appropriate scrolling. Then in coming back from [super trackKnob] I
knw scrolling is done so I can clear the flag;
- (void)trackKnob:(NSEvent *)theEvent {
m_mainView->m_scrolling = YES;
m_mainView->m_main.m_data.SetData("fst", 1);
[super trackKnob:theEvent];
m_mainView->m_main.m_data.RemoveData("fst");
m_mainView->m_scrolling = NO;
[m_mainView setNeedsDisplay:YES];
if([self frame].size.height > 15)
{
NSLog(@"V Scroller %1.4f", _curValue);
}
else
{
NSLog(@"H Scroller %1.4f", _curValue);
}
}
- (void)drawRect:(NSRect)rect {
[super drawRect:rect];
...
if(m_scrolling)
{
NSLog(@"drawRect scrolling");
float v = 100*[m_vScroller floatValue];
float h = 100*(1-[m_hScroller floatValue]);
m_main.m_bitmap.SetOrigin(h, v);
}
...
}
On Jan 15, 2010, at 11:58 AM, Kyle Sluder wrote:
Mailing list archives are very useful resources to developers, since
they capture a lot of searches for related terminology that doesn't
appear in the official documentation. Mailing list archives also tend
to strip out email addresses, making it hard for people who encounter
your thread to contact you about the solution. Please share your
solution with the list, it's silently appreciated by many a web
searcher. :)
--Kyle Sluder
On Fri, Jan 15, 2010 at 10:22 AM, David Blanton
<email@hidden> wrote:
Never mind. Figured it all out. If anyone is interested ping me
off-list.
-db
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden