• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scrolling [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Scrolling [SOLVED]
      • From: Graham Cox <email@hidden>
    • Re: Scrolling [SOLVED]
      • From: Quincey Morris <email@hidden>
References: 
 >Scrolling (From: David Blanton <email@hidden>)
 >Re: Scrolling (From: David Blanton <email@hidden>)
 >Re: Scrolling [SOLVED] (From: David Blanton <email@hidden>)
 >Re: Scrolling [SOLVED] (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Unable to get animation of NSProgressIndicator on my custom view (subclassed)
  • Next by Date: Clipping subview drawing to arbitrary path or image (iPhone)
  • Previous by thread: Re: Scrolling [SOLVED]
  • Next by thread: Re: Scrolling [SOLVED]
  • Index(es):
    • Date
    • Thread