I want to make 2 NSImageView within a NSScrollView.
1 ScrollView + 1 NSImageView–> OK
1 croollView + 1 NSImageView + 1 NSIMageView → NG
Can we make this ?
I want to add scroll view to this program.
https://www.youtube.com/watch?v=WcwToHIKukQ
--
-- AppDelegate.applescript
-- scrollViewWithinMultiImageView
--
-- Created by Takaaki Naganoya on 2020/02/07.
-- Copyright © 2020 Takaaki Naganoya. All rights reserved.
--
script AppDelegate
property parent : class "NSObject"
-- IBOutlets
property theWindow : missing value
on applicationWillFinishLaunching_(aNotification)
set wFrame to theWindow's frame()
set tmpScrol to current application's NSScrollView's alloc()'s initWithFrame:wFrame
set aIMGV to current application's NSImageView's alloc()'s initWithFrame:wFrame
set bIMGV to current application's NSImageView's alloc()'s initWithFrame:wFrame
set aImage to current application's NSImage's imageNamed:(current application's NSImageNameComputer)
set bImage to current application's NSImage's imageNamed:(current application's NSImageNameComputer)
aIMGV's setImage:aImage
tmpScrol's setDocumentView:aIMGV
aIMGV's addSubView:bIMGV
--tmpScrol's addSubView:bIMGV
theWindow's setContentView:tmpScrol
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
Model: MacBook Pro 2012
AppleScript: 2.7
Browser: Safari 13.0.1
Operating System: macOS 10.14