• 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: Now I can't get this terminology right, dammit!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Now I can't get this terminology right, dammit!


  • Subject: Re: Now I can't get this terminology right, dammit!
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 03 Oct 2014 11:55:07 +1000

On 3 Oct 2014, at 11:32 am, Brian Christmas <email@hidden> wrote:

 I simply cannot relate this…

// get the current scroll position of the document view
NSPoint currentScrollPosition=[[theScrollView contentView] bounds].origin;
 
// restore the scroll location
[[theScrollView documentView] scrollPoint:currentScrollPosition];

to any code that works.

Surely the use of NSPoint and origin, and the fact that scrollPoint: takes an NSPoint as its parameter, give you the clue you need.

The bounds of the content view returns an NSRect. Look up my book to see what that looks like to AppleScript, and you'll see a record, and it should be pretty obvious how to get the origin from that record. Then you pass that origin as the parameter of scrollPoint:. (And contentView is a method, so it takes parentheses.)

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Now I can't get this terminology right, dammit! (From: Brian Christmas <email@hidden>)
 >Re: Now I can't get this terminology right, dammit! (From: Shane Stanley <email@hidden>)
 >Re: Now I can't get this terminology right, dammit! (From: Brian Christmas <email@hidden>)
 >Re: Now I can't get this terminology right, dammit! (From: Shane Stanley <email@hidden>)
 >Re: Now I can't get this terminology right, dammit! (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Now I can't get this terminology right, dammit!
  • Next by Date: Re: Now I can't get this terminology right, dammit!
  • Previous by thread: Re: Now I can't get this terminology right, dammit!
  • Next by thread: Re: Now I can't get this terminology right, dammit!
  • Index(es):
    • Date
    • Thread