Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Juanjo Conti
According the docs ( https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/) NSURL(string: aString) will return nil if aString is malformed. But I've tried this in the a playground and no nil is returned: NSURL(string: )! NSURL(string: )! Why

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Mike Abdullah
On 2 Mar 2015, at 23:22, Juanjo Conti jjco...@carouselapps.com wrote: According the docs ( https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/) NSURL(string: aString) will return nil if aString is malformed. But I've tried this in the a

Re: Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Dave Fernandes
Oops, yes imageVersion is what you should use. It’s been a long time since I looked at this code (Leopard, I think). On Mar 2, 2015, at 4:13 PM, Mike Abdullah mabdul...@karelia.com wrote: Or you can bump up the -imageVersion On 2 Mar 2015, at 21:54, Steve Mills sjmi...@mac.com wrote:

Re: Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Mike Abdullah
Or you can bump up the -imageVersion On 2 Mar 2015, at 21:54, Steve Mills sjmi...@mac.com wrote: On Mar 2, 2015, at 14:23:03, Dave Fernandes dave.fernan...@utoronto.ca wrote: Your IKImageBrowserItem must change its returned imageUID when the imageRepresentation changes so that the

Re: NSTextField highlight

2015-03-02 Thread edward taffel
On Mar 2, 2015, at 5:34 PM, Ken Thomases k...@codeweavers.com wrote: On Mar 2, 2015, at 3:51 PM, edward taffel etaf...@me.com wrote: has anyone had success in changing NSTextField’s default highlight? e.g., given bright text on a dark background, the default highlight is not

Re: NSTextView Copy-and-Paste Problem

2015-03-02 Thread Martin Wierschin
I’m having problems with text attributes getting mangled by copy-and-paste operations within the selfsame text view. Obviously text pasted in from outside the app would have an unpredictable set of attributes, but you’d think copying and pasting in the same text view would leave you with a

NSTextField highlight

2015-03-02 Thread edward taffel
has anyone had success in changing NSTextField’s default highlight? e.g., given bright text on a dark background, the default highlight is not serviceable. i had hoped subclassing NSTextFieldCell overriding -(id)_highlightColorForCell:(NSCell*)cell would work, as it does in instances of

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Ben
On 2 Mar 2015, at 19:10, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 02 Mar 2015, at 19:26, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: - Granularity of selection. For example single or multiple disconnected cells. NSTableView only gives me row or column. - Scrollable floating

Re: Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Steve Mills
On Mar 2, 2015, at 15:13:01, Mike Abdullah mabdul...@karelia.com wrote: Or you can bump up the -imageVersion Ah, cool. Thanks! That allows me to stick with shorter imageUIDs. -- Steve Mills Drummer, Mac geek ___ Cocoa-dev mailing list

Re: NSTextView Copy-and-Paste Problem

2015-03-02 Thread Charles Jenkins
Thanks, Martin. The docs say you can put anything you want into the attributes dictionary—without mentioning that cutting and pasting will screw it all up. But it makes sense why, if cutting and pasting involves a translation into some non-native format. I’ll try to learn how to override

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread pscott
On 3/2/2015 2:22 PM, Juanjo Conti wrote: According the docs ( https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/) NSURL(string: aString) will return nil if aString is malformed. But I've tried this in the a playground and no nil is returned:

Inconvenient exception impossible to get rid of?

2015-03-02 Thread Graham Cox
I'm getting an exception thrown by the NSPopover code when a popover is going away. Due to the way popovers are handled, the exception is not one I'm able to catch, so the app is terminated. This is a very big punishment for what seems a trivial transgression that doesn't even matter at this

Re: NSTextField highlight

2015-03-02 Thread Ken Thomases
On Mar 2, 2015, at 3:51 PM, edward taffel etaf...@me.com wrote: has anyone had success in changing NSTextField’s default highlight? e.g., given bright text on a dark background, the default highlight is not serviceable. i had hoped subclassing NSTextFieldCell overriding

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Juanjo Conti
Ok, I wanted to validate that the url is an absolute one. Is there something in Swift standard lib to do this? Thanks in advance! On Mon, Mar 2, 2015 at 7:46 PM, Mike Abdullah mabdul...@karelia.com wrote: On 2 Mar 2015, at 23:22, Juanjo Conti jjco...@carouselapps.com wrote: According the

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Keary Suska
On Mar 2, 2015, at 4:55 PM, Juanjo Conti jjco...@carouselapps.com wrote: Ok, I wanted to validate that the url is an absolute one. Is there something in Swift standard lib to do this? That depends on what you mean by validate. If you simply mean checking whether it well-formed, you can do

Re: Inconvenient exception impossible to get rid of?

2015-03-02 Thread Graham Cox
On 3 Mar 2015, at 11:42 am, Uli Kusterer witness.of.teacht...@gmx.net wrote: Sounds like an actual bug, at least I don’t get this behaviour in my popvers. Are you sure your NSPopover is still valid at the point? What does calling malloc_size() on the pointer return? If it’s 0, it’s

Re: iOS App trust on first launch

2015-03-02 Thread Greg Parker
On Mar 2, 2015, at 12:34 AM, Rick Mann rm...@latencyzero.com wrote: Xcode should handle this for me, in some way. I should be able to bless my phone to accept apps from my Xcode. Did you file a bug report? -- Greg Parker gpar...@apple.com Runtime Wrangler

Re: Inconvenient exception impossible to get rid of?

2015-03-02 Thread Uli Kusterer
On 03 Mar 2015, at 00:14, Graham Cox graham@bigpond.com wrote: I'm getting an exception thrown by the NSPopover code when a popover is going away. Due to the way popovers are handled, the exception is not one I'm able to catch, so the app is terminated. This is a very big punishment for

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Jens Alfke
On Mar 2, 2015, at 4:52 PM, Keary Suska cocoa-...@esoteritech.com wrote: That depends on what you mean by validate. If you simply mean checking whether it well-formed, you can do that easily with a regular expression match, such as (written in email):

Re: Application windows are expected to have a root view controller at the end of application launch

2015-03-02 Thread Rick Mann
On Mar 2, 2015, at 08:51 , David Duncan david.dun...@apple.com wrote: On Mar 1, 2015, at 10:36 PM, Rick Mann rm...@latencyzero.com wrote: I'm adding background downloading on remote notification, so I removed all my UI code from appDidFinishLaunching. Now I get this error: Application

Re: iOS App trust on first launch

2015-03-02 Thread Rick Mann
On Mar 2, 2015, at 18:22 , Greg Parker gpar...@apple.com wrote: On Mar 2, 2015, at 12:34 AM, Rick Mann rm...@latencyzero.com wrote: Xcode should handle this for me, in some way. I should be able to bless my phone to accept apps from my Xcode. Did you file a bug report? 20016533

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Uli Kusterer
I think you want NSURLComponents. On 03 Mar 2015, at 00:55, Juanjo Conti jjco...@carouselapps.com wrote: Ok, I wanted to validate that the url is an absolute one. Is there something in Swift standard lib to do this? Thanks in advance! On Mon, Mar 2, 2015 at 7:46 PM, Mike Abdullah

Re: Create a NSURL as a way to validate urls - not working

2015-03-02 Thread Jens Alfke
On Mar 2, 2015, at 3:55 PM, Juanjo Conti jjco...@carouselapps.com wrote: Ok, I wanted to validate that the url is an absolute one. Is there something in Swift standard lib to do this? I typically check whether url.scheme is a non-nil, non-empty string. You may also want to check the scheme

Re: Inconvenient exception impossible to get rid of?

2015-03-02 Thread Keary Suska
On Mar 2, 2015, at 4:14 PM, Graham Cox graham@bigpond.com wrote: I'm getting an exception thrown by the NSPopover code when a popover is going away. Due to the way popovers are handled, the exception is not one I'm able to catch, so the app is terminated. This is a very big punishment

CoreData SQLite error code:14?

2015-03-02 Thread Rick Mann
The first couple attempts at reading my Core Data store (a SQLite file) results in this error: CoreData: error: (14) I/O error for database at

persistentDomainNames in sandbox

2015-03-02 Thread Rick C.
Hi, Calling [[NSUserDefaults standardUserDefaults] persistentDomainNames] in a sandbox gives me 29 objects against 821 non-sandboxed (sample count from the machine I’m on right now). Is there any way to get the full array in a sandbox? rc ___

Re: iOS App trust on first launch

2015-03-02 Thread Rick Mann
On Mar 2, 2015, at 00:29 , Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Mar 2, 2015, at 00:13 , Rick Mann rm...@latencyzero.com wrote: The current workaround is to launch the app by tapping on it on the device, then tap Trust in the resulting dialog. Then you can launch

Re: Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Dave Fernandes
Your IKImageBrowserItem must change its returned imageUID when the imageRepresentation changes so that the IKImageBrowserView knows to recache the image. Dave On Mar 2, 2015, at 12:37 PM, Steve Mills sjmi...@mac.com wrote: Is there any way to force IKImageBrowserView to throw out a cached

Re: Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Steve Mills
On Mar 2, 2015, at 14:23:03, Dave Fernandes dave.fernan...@utoronto.ca wrote: Your IKImageBrowserItem must change its returned imageUID when the imageRepresentation changes so that the IKImageBrowserView knows to recache the image. Ah. I was using a shorter string because using the full

Re: How to copy one project product to another project Resources on build (relative path)

2015-03-02 Thread Steve Mills
On Mar 2, 2015, at 07:02:47, Juanjo Conti jjco...@carouselapps.com wrote: I did what you said and then went to A target and add an item (B product) to Copy Bundle Resources. In the xml file I still see the absolute path. What am I missing? Ah. It can't be relative to the project, because the

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Steve Mills
On Mar 2, 2015, at 08:25:05, Steve Mills sjmi...@mac.com wrote: Have you profiles it to see what's taking all the time? Yerg. profiled -- Steve Mills Drummer, Mac geek ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Ben
On 2 Mar 2015, at 14:10, Mike Abdullah mabdul...@karelia.com wrote: On 2 Mar 2015, at 11:44, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: Hi list, Since NSCell is apparently on the way out, I've been trying to build a new control I need using views. It's a cut-down spreadsheet-alike

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Mike Abdullah
On 2 Mar 2015, at 11:44, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: Hi list, Since NSCell is apparently on the way out, I've been trying to build a new control I need using views. It's a cut-down spreadsheet-alike grid, similar to MBTableGrid here:

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Steve Mills
On Mar 2, 2015, at 04:44:12, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: Since NSCell is apparently on the way out, I've been trying to build a new control I need using views. It's a cut-down spreadsheet-alike grid, similar to MBTableGrid here: https://github.com/brendand/mbtablegrid

Re: iOS App trust on first launch

2015-03-02 Thread Rick Mann
Well, here's one workaround. Xcode should handle this for me, in some way. I should be able to bless my phone to accept apps from my Xcode. BUT: You can make another app signed with the same developer cert, install that, run it once just in case, and trust it. Then the app you're working on

iOS App trust on first launch

2015-03-02 Thread Rick Mann
This new behavior where I can't launch an app from Xcode really sucks. Is there any way around it? The current workaround is to launch the app by tapping on it on the device, then tap Trust in the resulting dialog. Then you can launch it. But I need to debug my app's first run, and I see no

Re: How to copy one project product to another project Resources on build (relative path)

2015-03-02 Thread Juanjo Conti
Discard my last email. I've re read yours and understood it. I did what you said and then went to A target and add an item (B product) to Copy Bundle Resources. In the xml file I still see the absolute path. What am I missing? On Mon, Mar 2, 2015 at 1:02 AM, Joar Wingfors j...@joar.com wrote:

Re: iOS App trust on first launch

2015-03-02 Thread Quincey Morris
On Mar 2, 2015, at 00:13 , Rick Mann rm...@latencyzero.com wrote: The current workaround is to launch the app by tapping on it on the device, then tap Trust in the resulting dialog. Then you can launch it. But I need to debug my app's first run, and I see no way to do that. I may be

Responsive scrolling control with lots of subviews

2015-03-02 Thread Ben
Hi list, Since NSCell is apparently on the way out, I've been trying to build a new control I need using views. It's a cut-down spreadsheet-alike grid, similar to MBTableGrid here: https://github.com/brendand/mbtablegrid Unfortunately, I am running into the to-be-expected performance trouble

Re: NSTextView Copy-and-Paste Problem

2015-03-02 Thread Charles Jenkins
Can I convince anyone to look at my demo app and tell me what if anything I'm doing wrong? I can hardly believe copying and pasting in a text view would lose or replace attributes like this . . . seems like a very serious bug someone would have noticed long before me. --  Charles On

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Uli Kusterer
On 02 Mar 2015, at 15:54, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: On 2 Mar 2015, at 14:10, Mike Abdullah mabdul...@karelia.com wrote: On 2 Mar 2015, at 11:44, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: Hi list, Since NSCell is apparently on the way out, I've been trying to build a new

Re: How to copy one project product to another project Resources on build (relative path)

2015-03-02 Thread Juanjo Conti
Thanks, seems I managed to achieve it with option 1. On Mon, Mar 2, 2015 at 11:16 AM, Steve Mills sjmi...@mac.com wrote: On Mar 2, 2015, at 07:02:47, Juanjo Conti jjco...@carouselapps.com wrote: I did what you said and then went to A target and add an item (B product) to Copy Bundle

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Ken Thomases
On Mar 2, 2015, at 9:45 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote: Are you re-setting *all* the views or only hiding views that scroll out and moving unused views to newly exposed areas? We've been doing stuff like that in various spots and performance is fine. One thing that might

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Ben
On 2 Mar 2015, at 15:45, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 02 Mar 2015, at 15:54, Ben ben_cocoa_dev_l...@yahoo.co.uk mailto:ben_cocoa_dev_l...@yahoo.co.uk wrote: On 2 Mar 2015, at 14:10, Mike Abdullah mabdul...@karelia.com mailto:mabdul...@karelia.com wrote: On 2 Mar

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Ken Thomases
On Mar 2, 2015, at 8:54 AM, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: From a time profile, the majority of my code being called is funnelled through a single method which handles the adding/positioning/removing of views within the visible area. The slow areas are: 8% - Instantiating new

Re: Application windows are expected to have a root view controller at the end of application launch

2015-03-02 Thread David Duncan
On Mar 1, 2015, at 10:36 PM, Rick Mann rm...@latencyzero.com wrote: I'm adding background downloading on remote notification, so I removed all my UI code from appDidFinishLaunching. Now I get this error: Application windows are expected to have a root view controller at the end of

Force a find in an NSTextView

2015-03-02 Thread Fritz Anderson
Target OS X 10.10. How does a view controller force an NSTextView to perform a search if it doesn’t own the text view? My application is a debugging tool to break an attributed string into style runs and display the runs in a table. I’d like to double-click a row in the table, and select

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Quincey Morris
On Mar 2, 2015, at 02:44 , Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: Since NSCell is apparently on the way out, I've been trying to build a new control I need using views. It's a cut-down spreadsheet-alike grid I don’t see that anyone has yet asked the question of why the grid needs to have

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Ben
On 2 Mar 2015, at 17:42, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Mar 2, 2015, at 02:44 , Ben ben_cocoa_dev_l...@yahoo.co.uk mailto:ben_cocoa_dev_l...@yahoo.co.uk wrote: Since NSCell is apparently on the way out, I've been trying to build a new control I need

Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Steve Mills
Is there any way to force IKImageBrowserView to throw out a cached thumbnail and regenerate it on a changed imageRepresentation? I can definitely see that imageRepresentation is returning a different url, but the browser still draws the old one, even after calling reloadData. -- Steve Mills

Re: iOS App trust on first launch

2015-03-02 Thread Rick Mann
It's not an enterprise account. But if you delete the last app from that cert, it happens. Sent from my iPhone On Mar 2, 2015, at 09:49, Doug Hill doug.h...@chartcube.com wrote: I believe if you use an Enterprise Provisioning Profile you will be asked the Trust question everytime you

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Uli Kusterer
On 02 Mar 2015, at 17:43, Ken Thomases k...@codeweavers.com wrote: On Mar 2, 2015, at 9:45 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote: Are you re-setting *all* the views or only hiding views that scroll out and moving unused views to newly exposed areas? We've been doing stuff like

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Uli Kusterer
On 02 Mar 2015, at 19:26, Ben ben_cocoa_dev_l...@yahoo.co.uk wrote: - Granularity of selection. For example single or multiple disconnected cells. NSTableView only gives me row or column. - Scrollable floating headers on both axis. This I did sort-of manage with NSTableView by styling the