Re: Swapping Views Example/Guidance
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