Re: Swapping Views Example/Guidance
Re: Swapping Views Example/Guidance
- Subject: Re: Swapping Views Example/Guidance
- From: Shane Stanley <email@hidden>
- Date: Thu, 22 Sep 2016 10:06:01 +1000
On 22 Sep. 2016, at 9:54 am, Jim Mitchell <email@hidden> wrote:
>
> Basically, what’s not working is this snippet in the example:
>
> if sender's superview() = originalView then
> set theFrame to newView's frame()
> else
> set theFrame to originalView's frame()
> end if
>
> Though the superview() and originalView are identical (following are both logged separately) they’re not seen as such, and the if block fails, so nothing happens:
>
> 2016-09-21 16:46:22.659 Swapping Views[2403:1706368] <NSView: 0x6000001201e0>
> 2016-09-21 16:46:22.659 Swapping Views[2403:1706368] <NSView: 0x6000001201e0>
>
> I was able to hack an example together based on the your example, and everything else works great.
I'm not sure what version of the OS it happened, but you now need to test for equality using the Cocoa method:
if sender's superview()'s isEqualTo:originalView then
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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