Re: Now I can't get this terminology right, dammit!
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.) |
_______________________________________________
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