I tried your suggestion without luck. The "call method" line has no visible
effect on the results. Here's my code...
on awake from nib theObject
if the name of theObject is "helpImageView" then
set imagePath to "/Users/rustr/Desktop/loginfaq.tif"
set helpImage to load image imagePath
set imageSize to call method "size" of helpImage
set the size of theObject to imageSize
set image of theObject to helpImage
call method "scrollToPoint:" of object (call method "contentView" of
theObject) with parameter {0, 0}
end if
end awake from nib
I found the following link, but don't know if it's relevant given the origin
is "flipped" for this view.
http://www.cocoabuilder.com/archive/message/cocoa/2005/2/3/127411
Robert
>
> Did you try [[yourScrollView contentView] scrollToPoint:{0,0}] already?
>
> Let's see, from AppleScript that would be:
> call method "scrollToPoint:" of object (call method "contentView" of object
> theASSNameOfYourScrollView) with parameter {0,0}
>
> (or you could break it into two lines for more clarity, of course)
>
> Topher
> -----Original Message-----
> From: applescript-studio-bounces+tophu=email@hidden
> [mailto:applescript-studio-bounces+tophu=email@hidden] On Behalf
> Of Robert J. Rust
> Sent: Tuesday, March 29, 2005 1:48 PM
> To: email@hidden
> Subject: scrolling a scrollView with an imageView
>
> Thanks to all who provided assistance with creating a scrollable imageView.
> Now I am having problems figuring out how to scroll up to the top of the
> image I've loaded, since the image shows up scrolled to the bottom. I did
> some digging in the ADC documentation but was unable to determine how to do
> it (and the method that's called to scroll a textView doesn't work).
>
> Robert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden
This email sent to email@hidden