• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scrolling


  • Subject: Re: Scrolling
  • From: Eric Peyton <email@hidden>
  • Date: Thu, 12 Jul 2001 13:25:09 -0500

Why don't you just set the viewable portion of the text view? Scroll it yourself ...

From Fire.app source code ... notice the last line before the return.

- (void)addMessageToConsole:(NSString *)aMessage
{
if ([[consoleText textStorage] length]) {
[consoleText replaceCharactersInRange:NSMakeRange([[consoleText textStorage] length], 0) withString:@" \n"];
}
[consoleText replaceCharactersInRange:NSMakeRange([[consoleText textStorage] length], 0) withString:[[NSDate date] descriptionWithCalendarFormat:@"%I:%M %p" timeZone:nil locale:nil]];
[consoleText replaceCharactersInRange:NSMakeRange([[consoleText textStorage] length], 0) withString:@" - "];
[consoleText replaceCharactersInRange:NSMakeRange([[consoleText textStorage] length], 0) withString:aMessage];

[consoleText scrollRangeToVisible:NSMakeRange([[consoleText textStorage] length], 0)];

return;
}

Eric

On Thursday, July 12, 2001, at 12:37 PM, Ben Woodward wrote:

Hi there,

I am writing an app which is displaying a load of text (potentially). It
would be really cool, if I could tell my window to jump to the bottom of the
page at certain point (like Terminal can) : when new stuff arrives, on
opening the window, when I feel like it would be the least opportune moment,
oh hang on I'm not writing a M$ app! :) It looks like in NSClipView, there
is a method called:
public void scrollToPoint(NSPoint newOrigin). This seems really cool, but
unfortunately, I am new enough to all this to not have a clue how to use it.
Any suggestions would be much appreciated.

Sincerely, Ben
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Scrolling (From: Ben Woodward <email@hidden>)

  • Prev by Date: Re: Status of @"" strings
  • Next by Date: Re: Status of @"" strings
  • Previous by thread: Scrolling
  • Next by thread: Re: Look And Feel (Guidelines
  • Index(es):
    • Date
    • Thread