• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Swapping Views Example/Guidance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Swapping Views Example/Guidance
      • From: Jim Mitchell <email@hidden>
References: 
 >Swapping Views Example/Guidance (From: Jim Mitchell <email@hidden>)
 >Re: Swapping Views Example/Guidance (From: Shane Stanley <email@hidden>)
 >Re: Swapping Views Example/Guidance (From: Jim Mitchell <email@hidden>)

  • Prev by Date: Re: Swapping Views Example/Guidance
  • Next by Date: Re: Swapping Views Example/Guidance
  • Previous by thread: Re: Swapping Views Example/Guidance
  • Next by thread: Re: Swapping Views Example/Guidance
  • Index(es):
    • Date
    • Thread