Saturday, December 16, 2017

#1 2017-06-05 04:38:04 pm

stegor
Member
Registered: 2006-03-07
Posts: 45

aNotification's object no longer = the object it should.

Had a hard time thinking up a title for this.

I'm updating an app I built in Xcode 5 Yosemite to Xcode 8 Sierra. The app stopped registering table view selection changes.

I see it's still calling tableViewSelectionChanged_(aNotification) but where I have

Applescript:

if aNotification's object = theLayerTable then

it doesn't recognize it even though they are equal. If I log aNotification's object and theLayerTable they log as equal but they aren't equal in my if/then.

Why? Do I need to coerce something?

Offline

 

#2 2017-06-05 06:47:52 pm

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

Re: aNotification's object no longer = the object it should.

Try something like this:

Applescript:

if (aNotification's object()'s isEqualTo:theLayerTable) as boolean then


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

Offline

 

#3 2017-06-06 11:02:43 am

stegor
Member
Registered: 2006-03-07
Posts: 45

Re: aNotification's object no longer = the object it should.

Nice!

Thanks a ton!

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)