Tuesday, December 12, 2017

#1 2016-07-29 11:41:29 am

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

Acessing Image of subclassed ImageView - ridiculous?

Hey guys,

i have an Image view sublassed

Applescript:


script myImageView
property parent : class "NSImageView"

-- How to access the Image from the ImageView i subclassed ?

end script

I tried "my image" but it didn't work. Do i oversee something obvious?

Offline

 

#2 2016-07-29 02:34:26 pm

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

Re: Acessing Image of subclassed ImageView - ridiculous?

Ok... a little bit more precise:

I have an image  view filled with an image directly in IB. I subclassed the image view like above to get some drag and drop features. Works so far.
Now I'd like to change the image from the subclass on drag entered/exited but it seems I cannot address it. The drag entered/exited handles work though.
I have the feeling I just don't see it...

Last edited by Jonathan Engelhardt (2016-07-29 02:35:43 pm)

Offline

 

#3 2016-07-29 06:37:24 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5199

Re: Acessing Image of subclassed ImageView - ridiculous?

Use:

Applescript:

my image()

Don't go skipping the parens.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#4 2016-07-30 04:12:37 am

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

Re: Acessing Image of subclassed ImageView - ridiculous?

Sometimes you don't see the forest cause there are so many trees. Thank you

Offline

 

#5 2016-07-30 08:04:50 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5199

Re: Acessing Image of subclassed ImageView - ridiculous?

The problem is that often you can get away without the parens, so it's an easy habit to slip into.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)