Gestures cause crash in Sierra

2016-11-23 Thread Tom Doan
I'm having a problem with my applications that has come up just 
with Sierra. Any "swiping" gesture with two or three fingers on the 
trackpad causes an immediate crash. (Log below). A four finger 
swipe (if the four fingers are put down very deliberately) behaves 
properly. The fatal thread doesn't include any of my code, so I have 
no idea what's happening. I don't do anything in any of my views to 
handle any of the gestures directly. When I added (for instance) a 
SwipeWithEvent on the view, it never seems to get called. Any help 
with this would be greatly appreciated.

Best regards,

Tom Doan
Estima
---
1560 Sherman Ave #1029
Evanston, IL 60201
USA

Process:   RATSPro [986]
Path:  /Applications/RATS Pro
9.1/RATSPro.app/Contents/MacOS/RATSPro 
Identifier:  
com.estima.rats Version:   9.10.5 (1) Code 
Type:   
X86-64 (Native) Parent Process:    ??? [1] 
Responsible: 
RATSPro [986] User ID:   502

Date/Time: 2016-11-22 11:17:46.241 -0800
OS Version:    Mac OS X 10.12 (16A323)
Report Version:    12
Anonymous UUID:    
7EED464A-4A8E-2079-053C-33A3D31ED801

Sleep/Wake UUID:   
3A646693-9CAC-4B18-A517-C6FAF1D22E3F

Time Awake Since Boot: 6900 seconds

System Integrity Protection: enabled

Crashed Thread:    4  Dispatch queue: NSScreenUpdate

Exception Type:    EXC_CRASH (SIGABRT)
Exception Codes:   0x, 
0x
Exception Note:    EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 
'NSScrolling', reason:
'24332693 bear trap: NSScrollView bad canonicalOrigin 
(NaN) detected!
Please note any info you can in the bug.' terminating with 
uncaught
exception of type NSException abort() called

Application Specific Backtrace 1:
0   CoreFoundation  0x7fff8638a7bb
__exceptionPreprocess + 171 1   
libobjc.A.dylib   
0x7fff9aaf7a2a objc_exception_throw + 48 2   
AppKit  
  0x7fff84212683 
-[_NSScrollingConcurrentSharedData
threadSafePropertyAccess:] + 145 3   
AppKit
0x7fff84214601 
-[_NSScrollingConcurrentEventVBLPreprocessFilter
scrollingVBLMonitor:synchronizeForVBLSerialNumber:times
tamp:updateDuration
:] + 383 4   AppKit  
0x7fff84214414
-[_NSScrollingConcurrentVBLMonitor
_synchronizeForVBLSerialNumber:timestamp:updateDurati
on:] + 535 5   AppKit
 0x7fff8421418d
__42-[_NSScrollingConcurrentVBLMonitor 
resume]_block_invoke + 218 6 
AppKit  0x7fff842140aa
__45-[NSScreen(NSScreenUpdate) 
addUpdateHandler:]_block_invoke_2 + 212 7 
libdispatch.dylib   0x7fff9b39d128
_dispatch_client_callout + 8 8   
libdispatch.dylib 
0x7fff9b3b2c10 _dispatch_continuation_pop + 533 
9   libdispatch.dylib
 0x7fff9b3a8ad2 
_dispatch_source_latch_and_call + 192
10  libdispatch.dylib   0x7fff9b39f966
_dispatch_source_invoke + 1248 11  
libdispatch.dylib 
0x7fff9b3b2a50 _dispatch_continuation_pop + 85 12  
libdispatch.dylib 
    0x7fff9b3a9ea3 
_dispatch_async_redirect_invoke + 734
13  libdispatch.dylib   0x7fff9b39eee0
_dispatch_root_queue_drain + 476 14  
libdispatch.dylib 
0x7fff9b39ecb7 _dispatch_worker_thread3 + 99 15
libsystem_pthread.dylib 0x7fff9b5e9746 
_pthread_wqthread +
1299 16  libsystem_pthread.dylib 
0x7fff9b5e9221
start_wqthread + 13

etc.

(main thread is in the run loop)


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: CABasicAnimation in a view that's covered by another?

2016-11-23 Thread Eric E. Dolecki
29373893

On Wed, Nov 23, 2016 at 8:36 AM Eric E. Dolecki  wrote:

> Sure enough, I removed my delay and set my panel to an alpha of 0.99 - and
> the crossfade works as intended behind the view. This seems like a bug to
> me and I'll file it.
>
> On Tue, Nov 22, 2016 at 8:06 PM David Duncan 
> wrote:
>
> On Nov 22, 2016, at 1:22 PM, Eric E. Dolecki  wrote:
>
> If the panel is up covering the UIImageView and the cross-fade is called,
> and I bring the panel back down, exposing the UIImageView, the cross-fade
> did not take place, the image not updated. That's how I know.
>
> If I time the crossfade on closing the panel... a 10th of a second after
> the panel starts to move (thus exposing a tiny bit of the UIImageView
> before the crossfade), it works. How strange is this?
>
>
> Possible its a bug related to if the OS thinks that the image view needs
> to be drawn or not. If you give your panel alpha <1 does that resolve the
> issue as well? (If so, please file a bug).
>
>
> On Tue, Nov 22, 2016 at 1:57 PM David Duncan 
> wrote:
>
>
> > On Nov 22, 2016, at 7:26 AM, Eric E. Dolecki  wrote:
> >
> > I have a cross-fading album art thing happening. When I can see the
> > imageview it works fine, if it's totally covered by another view (a
> panel I
> > slide up), it seems to not change. Is this a known thing? Doesn't seem
> > right - I am trying to track down other related things to see.
>
> What do you mean by “seems to not change”? Can you see the view through
> the panel you slide up? If not, how can you tell what is going on?
>
> >
> >myfade = CABasicAnimation(keyPath: "contents")
> >myfade.duration = 0.4
> >myfade.fromValue = largeAlbumCover.image!.cgImage
> >myfade.toValue = artImage?.cgImage
> >myfade.delegate = self
> >largeAlbumCover.layer.add(myfade, forKey:
> "animateContents")
> >largeAlbumCover.image = artImage
> >
> > Thanks,
> > Eric
> > ___
> >
> > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> >
> > Please do not post admin requests or moderator comments to the list.
> > Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >
> > Help/Unsubscribe/Update your Subscription:
> >
> https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
> >
> > This email sent to david.dun...@apple.com
>
> --
> David Duncan
>
>
> --
> David Duncan
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: CABasicAnimation in a view that's covered by another?

2016-11-23 Thread Eric E. Dolecki
Sure enough, I removed my delay and set my panel to an alpha of 0.99 - and
the crossfade works as intended behind the view. This seems like a bug to
me and I'll file it.

On Tue, Nov 22, 2016 at 8:06 PM David Duncan  wrote:

> On Nov 22, 2016, at 1:22 PM, Eric E. Dolecki  wrote:
>
> If the panel is up covering the UIImageView and the cross-fade is called,
> and I bring the panel back down, exposing the UIImageView, the cross-fade
> did not take place, the image not updated. That's how I know.
>
> If I time the crossfade on closing the panel... a 10th of a second after
> the panel starts to move (thus exposing a tiny bit of the UIImageView
> before the crossfade), it works. How strange is this?
>
>
> Possible its a bug related to if the OS thinks that the image view needs
> to be drawn or not. If you give your panel alpha <1 does that resolve the
> issue as well? (If so, please file a bug).
>
>
> On Tue, Nov 22, 2016 at 1:57 PM David Duncan 
> wrote:
>
>
> > On Nov 22, 2016, at 7:26 AM, Eric E. Dolecki  wrote:
> >
> > I have a cross-fading album art thing happening. When I can see the
> > imageview it works fine, if it's totally covered by another view (a
> panel I
> > slide up), it seems to not change. Is this a known thing? Doesn't seem
> > right - I am trying to track down other related things to see.
>
> What do you mean by “seems to not change”? Can you see the view through
> the panel you slide up? If not, how can you tell what is going on?
>
> >
> >myfade = CABasicAnimation(keyPath: "contents")
> >myfade.duration = 0.4
> >myfade.fromValue = largeAlbumCover.image!.cgImage
> >myfade.toValue = artImage?.cgImage
> >myfade.delegate = self
> >largeAlbumCover.layer.add(myfade, forKey:
> "animateContents")
> >largeAlbumCover.image = artImage
> >
> > Thanks,
> > Eric
> > ___
> >
> > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> >
> > Please do not post admin requests or moderator comments to the list.
> > Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >
> > Help/Unsubscribe/Update your Subscription:
> >
> https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
> >
> > This email sent to david.dun...@apple.com
>
> --
> David Duncan
>
>
> --
> David Duncan
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Custom Timer on Apple Watch

2016-11-23 Thread Charles Jenkins
I asked this question recently, but maybe not in a clear enough way.

If I use Apple’s Timer program on the watch, I can tell it to alert me in
15 minutes, and it works without fail.

I want to make a smarter timer program for the watch, but I want my timer
to “go off” in a way that’s prominent and noticeable—but short, so I don’t
have to tap anything to silence the alert.

(In case my terminology is not precise, what I mean by “alert” is: the
watch makes a prominent vibration and sound and my app comes to the
foreground for optional interaction.)

Is there any possible way to make an alert that will definitely sound on
the watch?

Alternatively, is there any way to schedule an app to wake up and come to
the foreground?

-- 

Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Swift 3: How to Create CFArray of CGColors?

2016-11-23 Thread Charles Jenkins
Thank you, Eric and Quincey! Both Eric’s resource and Quincey’s explanation
gave good ideas on how to tackle problems like this in the future, which
will probably help with the next stumbling block. Cheers!

On Tue, Nov 22, 2016 at 7:36 PM, Quincey Morris <
quinceymor...@rivergatesoftware.com> wrote:

> On Nov 22, 2016, at 16:17 , Charles Jenkins  wrote:
>
>
> I have this line of code:
>
> let gradient = CGGradient( colorsSpace: CGColorSpaceCreateDeviceRGB(),
> colors: [ clearWhite.cgColor, clearWhite.cgColor,
> clearWhite.blendedColorWithFraction(0.5, ofColor: white).cgColor,
> white.cgColor ], locations: [0, 0.57, 0.93, 1])
>
> The array of colors is no longer legal in Swift 3. I get an error
> message—“Contextual type CFArray cannot be used with an array
> literal”—which I think is saying I must pass a CFArray.
>
>
> The immediate problem is that the error message is spurious. Method
> “blendedColorWithFraction(:ofColor:)” has been renamed in Swift 3 to
> “blendedColor(withFraction:of:)”, so your array cannot be constructed as
> the desired type "[GCColor]".
>
> The secondary problem is that “blendedColor(withFraction:of:)” returns an
> optional, so you need a “!” operator after it.
>
> The third problem is that you need “as CGArray”. There would have been a
> fix-it for this, if the first two problems had been fixed. The following
> code compiles in a (macOS) playground:
>
> import AppKit
>
> let clearWhite = NSColor.white // or whatever
> let white = NSColor.white // or whatever
>
> let colors = [ clearWhite.cgColor, clearWhite.cgColor,
>clearWhite.blended(withFraction: 0.5, of: white)!.cgColor,
>white.cgColor ]
>
> let gradient = CGGradient( colorsSpace: CGColorSpaceCreateDeviceRGB(),
>colors: colors as CFArray, locations:
> [0, 0.57, 0.93, 1])
>
>
> I would expect the iOS version is the same, if that’s what you need.
>
> For puzzling problems like this, I suggest “unrolling” the parameters like
> the above, specifying explicit type annotations if you’re not sure what
> types are being inferred.
>
>


-- 

Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com