Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-04 Thread Charles Srstka
> On Sep 4, 2015, at 7:59 PM, Quincey Morris > wrote: > > On Sep 4, 2015, at 16:31 , has > wrote: >> >> At risk of derail... > > Do you mean “derail” or “detail”? I feel like I’m drowning in details. > > My (first) “huh?” was to ask why you would prefer SomeC

Re: Anyway to make a generic out of instancetype?

2015-09-04 Thread Rick Mann
> On Sep 4, 2015, at 18:29 , Jens Alfke wrote: > > >> On Sep 4, 2015, at 4:47 PM, Rick Mann wrote: >> >> I have some class methods that return NSArray*. I wanted to have them return >> NSArray*, but the compiler doesn't seem to like that. Is it >> worth trying to do? > > Well, it should be

Re: Puzzling memory creep

2015-09-04 Thread Quincey Morris
On Sep 4, 2015, at 06:25 , Richard Kennaway wrote: > > If anyone wants to take a look at the whole project, I've put a zip file at FWIW, I don’t see any leaks when I run your test project. This is with Xcode 7 beta 6 and the iOS 9 iPhone simulator, since that’s what I’ve got available right no

Re: Anyway to make a generic out of instancetype?

2015-09-04 Thread Jens Alfke
> On Sep 4, 2015, at 4:47 PM, Rick Mann wrote: > > I have some class methods that return NSArray*. I wanted to have them return > NSArray*, but the compiler doesn't seem to like that. Is it > worth trying to do? Well, it should be instead (the ‘*’ is already included in the type), but in my

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-04 Thread Quincey Morris
On Sep 4, 2015, at 16:31 , has wrote: > > At risk of derail... Do you mean “derail” or “detail”? I feel like I’m drowning in details. My (first) “huh?” was to ask why you would prefer SomeClass ().makeASomeClassInstance () to SomeClass.makeASomeClassInstance (). I’m not sure, but I think you

Visual glitch

2015-09-04 Thread Shane Stanley
My app has developed a visual glitch, and I'm hoping for some advice on how to rectify it. It occurs when entering or leaving the version browser, and it's a bit hard to describe, but part of what is mostly background area goes black. And I think it started happening when I moved to auto-layout,

"Computed segue" in iOS?

2015-09-04 Thread Carl Hoefs
iOS 8.4.1 I need to segue from a UITableView to different view controllers depending which element in the table is touched (some elements are videos that need to be displayed/edited, some are data files that need to be graphed, etc.). Is it possible to have a "computed segue" in iOS such that I

Anyway to make a generic out of instancetype?

2015-09-04 Thread Rick Mann
I have some class methods that return NSArray*. I wanted to have them return NSArray*, but the compiler doesn't seem to like that. Is it worth trying to do? Thanks, -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-04 Thread has
On 03/09/2015 19:57, Quincey Morris wrote: On Sep 3, 2015, at 11:16 , has > wrote: * Using an instance as a factory for its own class is contrary to general usage, so is a smell at best. It’s a job for a class func. No, it's fine. It's for an Apple event query

Re: String.join()?

2015-09-04 Thread Rick Mann
Done. 22584635 > On Sep 4, 2015, at 14:34 , Greg Parker wrote: > > >> On Sep 4, 2015, at 2:29 PM, Quincey Morris >> wrote: >> >>> On Sep 4, 2015, at 14:04 , Rick Mann wrote: >>> >>> According to the docs in Xcode 7b6, join(_:) is a method on String. But if >>> I try to call it: >>> >>> O

Re: String.join()?

2015-09-04 Thread Greg Parker
> On Sep 4, 2015, at 2:29 PM, Quincey Morris > wrote: > >> On Sep 4, 2015, at 14:04 , Rick Mann wrote: >> >> According to the docs in Xcode 7b6, join(_:) is a method on String. But if I >> try to call it: >> >> Of course, I can't command-click on join() to get to its declaration, and >> op

Re: String.join()?

2015-09-04 Thread Rick Mann
> On Sep 4, 2015, at 14:29 , Quincey Morris > wrote: > > On Sep 4, 2015, at 14:04 , Rick Mann wrote: >> >> According to the docs in Xcode 7b6, join(_:) is a method on String. But if I >> try to call it: > >> Of course, I can't command-click on join() to get to its declaration, and >> optio

Re: String.join()?

2015-09-04 Thread Quincey Morris
On Sep 4, 2015, at 14:04 , Rick Mann wrote: > > According to the docs in Xcode 7b6, join(_:) is a method on String. But if I > try to call it: > Of course, I can't command-click on join() to get to its declaration, and > option-clicking on it doesn't link to its documentation. Sorry, I forgot

Re: String.join()?

2015-09-04 Thread Marco S Hyman
> Searching the documentation for joinWithSeparator turns up nothing. I’ve found the doc to be lacking in most beta builds, at least with respect to swift. One of the first things I commonly do is open a playgound and “import Swift” then command click on Swift to see the header. If I remember

Re: String.join()?

2015-09-04 Thread Quincey Morris
On Sep 4, 2015, at 14:04 , Rick Mann wrote: > > Are my docs just broken, or are Xcode's docs not up-to-date with the language? I don’t see the old ‘join’ documented anywhere, either in Xcode or on the developer web site. However, if I search the Xcode documentation for ‘join’, it lists several

String.join()?

2015-09-04 Thread Rick Mann
According to the docs in Xcode 7b6, join(_:) is a method on String. But if I try to call it: var str = "Hello, playground" str.join(["foo","bar"]) error: 'join' is unavailable: call the 'joinWithSeparator()' method on the sequence of elements str.join(["foo","bar"]) ^~~~ Swift.Strin

Re: NSView's in Separate NIB

2015-09-04 Thread Lee Ann Rucker
NSViewController doesn’t really work that way. It’s like an NSWindowController - it manages one view and handles all the nib unloading top-level objects stuff for you. (Trust me, you do not want to manage top-level objects yourself) So instead of > myDetailView = [LTWDetailView loadViewFromNIB

Re: Auto Layout Problems

2015-09-04 Thread Gary L. Wade
As I mentioned, start with your stack view in your window, embed it in a scroll view using the menu command to do this, and add your constraints on the scroll view to position it within your window. It's easier and less error-prone if you do it this way. If you'd rather do it in code, do a searc

Re: Auto Layout Problems

2015-09-04 Thread Luther Baker
I may not be following the entire thread very well - but as you likely know, with autolayout, the scrollview's content size is literally determined by its contents. It is generally simple to bind the scrollview edges to the parent you mention but I think your next step is to properly size the Stack

Re: NSView's in Separate NIB

2015-09-04 Thread Dave
> On 4 Sep 2015, at 19:34, Marek Hrušovský wrote: > > How stuff work is the same. You want solution without using your brain. There’s a big difference between UIView and NSView. I’m not sure what you mean by a “solution without using your brain”, but I already have a solution that I worked ou

Re: NSView's in Separate NIB

2015-09-04 Thread Marek Hrušovský
How stuff work is the same. You want solution without using your brain. On Fri, Sep 4, 2015 at 8:18 PM, Dave wrote: > Thanks for this, I’m not sure how much of that article is iOS only, but > I’ve done the NSView NIB loading trick in the past just not with > Auto-Layout. > > All the Best > Dave

Re: Puzzling memory creep

2015-09-04 Thread Michael David Crawford
A memory pool will appear to be a leak however pools usually reach a maximum size then stop growing. Such a pool may be an internal implementation detail that is invisible to your client code. I don't know that your leak is really a pool however this is a common false positive for leak detectors.

Re: NSView's in Separate NIB

2015-09-04 Thread Dave
Thanks for this, I’m not sure how much of that article is iOS only, but I’ve done the NSView NIB loading trick in the past just not with Auto-Layout. All the Best Dave > On 4 Sep 2015, at 19:13, Marek Hrušovský wrote: > > Please consider reading this (I don't code in swift/iOS but thats not a

Re: NSView's in Separate NIB

2015-09-04 Thread Marek Hrušovský
Please consider reading this (I don't code in swift/iOS but thats not and excuse): https://github.com/codepath/ios_guides/wiki/Custom-Views#how-views-are-defined-and-instantiated On Fri, Sep 4, 2015 at 7:58 PM, Dave wrote: > > > On 4 Sep 2015, at 18:40, Conrad Shultz wrote: > > > > > >> On S

Re: NSView's in Separate NIB

2015-09-04 Thread Dave
> On 4 Sep 2015, at 18:40, Conrad Shultz wrote: > > >> On Sep 4, 2015, at 10:30 AM, Dave wrote: >> >> The reason I ask is that for a while now when you create an NSView subclass >> it no longer offers you the option to create a separate NIB file. I remember >> a while back reading something

Re: Auto Layout Problems

2015-09-04 Thread Dave
Hi, > It seems your thread keeps changing subjects so it's been difficult to follow > your troubles back to something at the start, or maybe something's gotten > lost. What I’d dearly love to know right now is how to setup the Constraints for a Scroll View and Clip View etc. in XCode/IB for M

Re: NSView's in Separate NIB

2015-09-04 Thread Conrad Shultz
> On Sep 4, 2015, at 10:30 AM, Dave wrote: > > The reason I ask is that for a while now when you create an NSView subclass > it no longer offers you the option to create a separate NIB file. I remember > a while back reading something saying that it was frowned upon. > You should be able to

Re: NSView's in Separate NIB

2015-09-04 Thread Dave
The reason I ask is that for a while now when you create an NSView subclass it no longer offers you the option to create a separate NIB file. I remember a while back reading something saying that it was frowned upon. Cheers Dave > On 4 Sep 2015, at 18:25, Conrad Shultz wrote: > > >> On Sep 4

Re: NSView's in Separate NIB

2015-09-04 Thread Conrad Shultz
> On Sep 4, 2015, at 9:23 AM, Dave wrote: > > Hi, > > Is it still allowable (taking into consideration Auto Layout) to have a > separate NSView subclass with a NIB? > Yes. Auto Layout should be unrelated to this, though if you are composing your separate views together in code then you wil

Re: Auto Layout Problems

2015-09-04 Thread Gary L. Wade
It seems your thread keeps changing subjects so it's been difficult to follow your troubles back to something at the start, or maybe something's gotten lost. If you have a view in a XIB, you can usually choose to embed it in a scroll view (there's a menu item for that) which should take care of

NSView's in Separate NIB

2015-09-04 Thread Dave
Hi, Is it still allowable (taking into consideration Auto Layout) to have a separate NSView subclass with a NIB? Thanks Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: Puzzling memory creep

2015-09-04 Thread dangerwillrobinsondanger
So don't create a new for matter every time. Create one once outside of the timer. Formatters are heavy. Beyond that you might try judicious use of @autorelease{} Sent from my iPhone > On Aug 15, 2015, at 5:29 AM, Richard Kennaway wrote: > > I've written an iOS app that, according to Instrum

Re: Puzzling memory creep

2015-09-04 Thread Scott Ribe
On Sep 4, 2015, at 7:53 AM, Richard Kennaway wrote: > > It appears that __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ > does not relate to my updateTime() being invoked by the NSTimer, because > elsewhere under __CFRunLoopRun I see > __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBAC

Re: Auto Layout Problems

2015-09-04 Thread Dave
Hi, I’ve watched the videos at: https://developer.apple.com/videos/wwdc/2015/?id=218 and https://developer.apple.com/videos/wwdc/2015/?id=219 Which I found generally very helpful except that the majority of it was for iOS not Mac OS X, and, there was nothing on how to make it work with an NSS

Re: How to intercept the space key in an NSTextField

2015-09-04 Thread Ken Thomases
On Jun 8, 2015, at 8:01 AM, Frank Bitterlich wrote: > I’m having trouble finding a solution for a seemingly simple problem. This email is kind of old and just emerged from moderation limbo, but in case you're still stuck… > I need an NSTextField that will „catch“ the space key, and instead of

Converted mov to mp4, output file not working in default android video player

2015-09-04 Thread Devarshi Kulshreshtha
I used below code to convert an mov file to mp4 in my mac os x app: - (IBAction)convertAction:(id)sender { NSString *sampleMov = [@"~/Desktop/sample_mov.mov" stringByExpandingTildeInPath]; AVURLAsset *avAsset = [AVURLAsset URLAssetWithURL:[NSURL fileURLWithPath:sampleMov] options:nil];