Predicate warning from text view

2014-10-24 Thread Shane Stanley
I have a subclass of a text view in my app. When I double-click on other than a word (ie, a space or return), I get entries like these in the Console: _NSExtensionIsSafeExpressionForObjectWithSubquerySubstitutions: Expression considered unsafe: SUBQUERY(extensionItems, $extensionItem, $extensio

Re: Predicate warning from text view

2014-10-24 Thread Shane Stanley
On 24 Oct 2014, at 6:37 pm, Shane Stanley wrote: > I have Graphics turned off in IB because I don't support attachments. I do > override -selectionRangeForProposedRange:granularity:, but not in any way > that I can see would produce this sort of thing. The only place I use > predicates is my c

Re: Predicate warning from text view

2014-10-24 Thread Kyle Sluder
On Oct 24, 2014, at 3:35 AM, Shane Stanley wrote: > > I need to get out more. It's actually happening in lots of apps, not just > mine. Anyone else seeing it? I haven’t noticed it on my machine. It’s pretty obvious that it’s coming from a new Yosemite extension that has a malformed “this is wh

Re: Crash with ARC enabled on Xcode 6.1

2014-10-24 Thread Beinan Li
You nailed it, Kevin. Thanks so much! It is due to the static C++ wrapper object. After I moved it to the heap, the crash was fixed. Thanks, Beinan On Thu, Oct 23, 2014 at 12:50 PM, Kevin Meaney wrote: > Personally I'd try and not call any objective-c code from a C++ static > object. If it di

Re: Crash with ARC enabled on Xcode 6.1

2014-10-24 Thread Beinan Li
I'd like to thank everyone for your input. I learned a lot from this thread. BTW, simply changing the offending dictionary syntax to using the old API instead of the literals didn't help. I really had to abandon the singleton idea for the C++ wrapper object. Correct me if I'm wrong, please. I thi

Re: Crash with ARC enabled on Xcode 6.1

2014-10-24 Thread Glenn L. Austin
> On Oct 24, 2014, at 11:44 AM, Beinan Li wrote: > > BTW, simply changing the offending dictionary syntax to using the old API > instead of the literals didn't help. > I really had to abandon the singleton idea for the C++ wrapper object. Static objects -- of any kind -- can lead to hard-to-diag

Re: Predicate warning from text view

2014-10-24 Thread Shane Stanley
On 25 Oct 2014, at 4:16 am, Kyle Sluder wrote: > > I haven’t noticed it on my machine. It’s pretty obvious that it’s coming from > a new Yosemite extension that has a malformed “this is when I’m relevant” > query. What apps do you have installed that provide extensions? System Preferences show

Re: Predicate warning from text view

2014-10-24 Thread Martin Wierschin
> I have a subclass of a text view in my app. When I double-click on other than > a word (ie, a space or return), I get entries like these in the Console: > > _NSExtensionIsSafeExpressionForObjectWithSubquerySubstitutions: Expression > considered unsafe: SUBQUERY(extensionItems, $extensionItem,

Re: Predicate warning from text view

2014-10-24 Thread Shane Stanley
On 25 Oct 2014, at 10:23 am, Martin Wierschin wrote: > > I observed this log statement during the Yosemite beta period, on a stock > system with no additional extensions/apps installed, aside from my own app > being tested on OS X 10.10. My app (which also uses an NSTextView subclass) > produc

Swift: Any way to extract the bound "self" from a closure?

2014-10-24 Thread Rick Mann
I discovered a neat property of Swift: Anywhere I can pass a closure, I can also pass a object method (of matching type), and if I reference it from an instance, it captures that instance for the call: class Foo { func actOnFoo(inValue: Int) { } } func neato() { var foo: Foo = F

Re: Swift: Any way to extract the bound "self" from a closure?

2014-10-24 Thread Kyle Sluder
On Oct 24, 2014, at 5:24 PM, Rick Mann wrote: > > I discovered a neat property of Swift: Anywhere I can pass a closure, I can > also pass a object method (of matching type), and if I reference it from an > instance, it captures that instance for the call: > > class > Foo > { >func actOnFoo

Re: Swift: Any way to extract the bound "self" from a closure?

2014-10-24 Thread Rick Mann
> On Oct 24, 2014, at 17:57 , Kyle Sluder wrote: > > On Oct 24, 2014, at 5:24 PM, Rick Mann wrote: >> >> I discovered a neat property of Swift: Anywhere I can pass a closure, I can >> also pass a object method (of matching type), and if I reference it from an >> instance, it captures that in

Any way to avoid external parameter names?

2014-10-24 Thread Rick Mann
One of the things I dislike the most about Swift is its insistence on "being expressive". The docs talk about "allowing" expressivity, but should you choose to allow it, you then require it, and Swift implicitly requires it in a lot of places. Here's an example in a playground, where the call t

Any way to avoid external parameter names?

2014-10-24 Thread Rick Mann
Oh! I think I figured out what I'm doing wrong. The typealias doesn't understand local names, and that makes some sense. I can just get rid of those altogether and be find. Sorry for the noise. One of the things I dislike the most about Swift is its insistence on "being expressi

Re: Any way to avoid external parameter names?

2014-10-24 Thread Quincey Morris
On Oct 24, 2014, at 18:38 , Rick Mann wrote: > > Oh! I think I figured out what I'm doing wrong. The typealias doesn't > understand local names, and that makes some sense. I can just get rid of > those altogether and be find. I don’t understand what you’re saying here. What are “local names”,

Re: Any way to avoid external parameter names?

2014-10-24 Thread Rick Mann
> On Oct 24, 2014, at 19:55 , Quincey Morris > wrote: > > On Oct 24, 2014, at 18:38 , Rick Mann wrote: >> >> Oh! I think I figured out what I'm doing wrong. The typealias doesn't >> understand local names, and that makes some sense. I can just get rid of >> those altogether and be find. >