• 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: Jim Mitchell <email@hidden>
  • Date: Wed, 21 Sep 2016 16:54:39 -0700

Thanks, Shane… Yes, Auto Layout is off.

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.

Regards,

Jim Mitchell
@jimmitchell



> On Sep 21, 2016, at 3:51 PM, Shane Stanley <email@hidden> wrote:
>
> On 22 Sep. 2016, at 3:51 am, Jim Mitchell <email@hidden> wrote:
>>
>> Rebuilding previous AsS app from scratch with ASObjC, and am hoping to find a decent example of how to handle view swapping, much like the Swapping Views example from Shane’s AppleScriptObjC Explored 5 book/example — which worked great once upon a time.
>
> What's not working about it now? Do you have autolayout off?
>
> --
> 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


 _______________________________________________
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: Shane Stanley <email@hidden>
References: 
 >Swapping Views Example/Guidance (From: Jim Mitchell <email@hidden>)
 >Re: Swapping Views Example/Guidance (From: Shane Stanley <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