Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Kevin Meaney
I am using this in in swift code that then calls into objective-c. I could not get it to work at first but that was because the drawing code was in a objective-c framework where the framework was being loaded with a run path search path that was relative to the application. I had to modify the f

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Roland King
> On 12 May 2015, at 14:43, Graham Cox wrote: > > I’m exploring the use of the new IB_DESIGNABLE macro to preview a custom view > live in IB. > > It keeps complaining that my view is taking too long to draw, over 200mS, > which seems to be a limit built into IB. However, when I measure the ti

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Michael David Crawford
I haven't tried it myself but this sounds like a bug in IB rather than in your own code. Perhaps you should take a stab at writing a minimal test case, then if that demonstrates that it really is a bug, file a radar. On 5/12/15, Roland King wrote: > >> On 12 May 2015, at 14:43, Graham Cox wrote

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Kevin Meaney
> On 12 May 2015, at 08:33, Roland King wrote: > > >> On 12 May 2015, at 14:43, Graham Cox wrote: >> >> I’m exploring the use of the new IB_DESIGNABLE macro to preview a custom >> view live in IB. >> >> It keeps complaining that my view is taking too long to draw, over 200mS, >> which seem

Re: Core Data sync between iOS and Mac apps

2015-05-12 Thread davelist
CloudKit does seem to be Apple’s answer going forward (which makes me suspect Core Data sync will not improve) but CloudKit requires internet access for the app to work at all which I don’t want to require. I’m not sure I understand your concerns about Dropbox. The app is single user so when t

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Sean McBride
On Tue, 12 May 2015 16:43:32 +1000, Graham Cox said: >I’m exploring the use of the new IB_DESIGNABLE macro to preview a custom >view live in IB. > >It keeps complaining that my view is taking too long to draw, over >200mS, which seems to be a limit built into IB. However, when I measure >the time

Re: Core Data sync between iOS and Mac apps

2015-05-12 Thread Jens Alfke
> On May 12, 2015, at 6:00 AM, davel...@mac.com wrote: > > I’m not sure I understand your concerns about Dropbox. The app is single user > so when the iOS enters the background, I can upload the data (if there’s a > network connection at the moment) for modified files to Dropbox. A single-user

Re: Core Data sync between iOS and Mac apps

2015-05-12 Thread Kyle Sluder
On Tue, May 12, 2015, at 10:35 AM, Jens Alfke wrote: > You can still handle conflicts using Dropbox, it’s just trickier. You’ll > need to detect the renamed version of the file that Dropbox creates — > something like “MyAppData (Jens Alfke's conflicted copy 2015-05-09).db” — > then open both files

App is not running with the release build

2015-05-12 Thread Sasikumar JP
Hi, I am developing an iPhone app. My application is working fine with development build. I have started distributing the app through beta channel for testing. If I distribute the release build through crashlytics or test flight, app is not running. It shows the launcher screen and closes im

How to draw a NSView on top of a WebView and don't get overriden trying

2015-05-12 Thread Juanjo Conti
I have a WebView and I want to show some messages over it. For this I'm using a NSView. If I add it as a subView of WebView or if I add it as a subView of the WebView's superView, it's shown for a while but if the WebView gets scrolled or if I load sites gmail.com or twitter (without logging in),

Re: How to draw a NSView on top of a WebView and don't get overriden trying

2015-05-12 Thread Mike Abdullah
The failsafe way is to place a child window over the WebView. I’m not 100% sure but I think popovers work that way behind the scenes, so maybe one of them would be usable for this. > On 12 May 2015, at 22:44, Juanjo Conti wrote: > > I have a WebView and I want to show some messages over it. Fo

Aggravation trying to implement NSValueTransformer subclasses in Swift

2015-05-12 Thread William Squires
I'm trying to make what should be a fairly simple value transformer. I need to bind the Enabled state of a control (NSButton in this case, but it could be any control) to the .isEmpty state of a string. I would think this a common enough task that an existing value transformer would be supplied,

Re: How to draw a NSView on top of a WebView and don't get overriden trying

2015-05-12 Thread Jens Alfke
> On May 12, 2015, at 1:44 PM, Juanjo Conti wrote: > > If I add it as a subView of WebView or if I add it as a subView of the > WebView's superView, it's shown for a while but if the WebView gets > scrolled or if I load sites gmail.com or twitter (without > logging in), the

Re: Aggravation trying to implement NSValueTransformer subclasses in Swift

2015-05-12 Thread Jens Alfke
> On May 12, 2015, at 2:29 PM, William Squires wrote: > > but the example in the documentation is in ObjC, not Swift, and refers to id, > not to "Bool"s or "String"s. Hints, anyone? ‘id’ in Obj-C is ‘AnyObject’ in Swift. You’ll need to use the “as” or “as?” operator to type-cast it to NSNumbe

Re: Aggravation trying to implement NSValueTransformer subclasses in Swift

2015-05-12 Thread Quincey Morris
On May 12, 2015, at 14:29 , William Squires wrote: > > class IsNotEmptyTransformer : NSValueTransformer > { > } > > but the example in the documentation is in ObjC, not Swift, and refers to id, > not to "Bool"s or "String"s. Hints, anyone? Using a value transformer at all seems like a poor cho

Re: Aggravation trying to implement NSValueTransformer subclasses in Swift

2015-05-12 Thread Quincey Morris
On May 12, 2015, at 15:38 , Quincey Morris wrote: > > dynamic var message: String > dynamic var messageIsEmpty: Bool {return String == “”} > static var keyPathsForValuesAffectingMessageIsEmpty: NSSet {return NSSet > (object: "messageIsEmpty”)} FWIW, a Swift-ier way to do this might be somethin

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Graham Cox
> On 13 May 2015, at 1:22 am, Sean McBride wrote: > > After some difficulty, yes. But it seems to only support direct subclasses > of NSView, not NSControl for example. What's your superclass? Well, it is a NSControl subclass (in fact the volume knob discussed in another thread - just a ha

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Akis Kesoglou
> On 13 Μαΐ 2015, at 02:04, Graham Cox wrote: > > One possible issue in this case is that the first time -drawRect: for any > instance is called, it calls a class method to load the image from a > resource, which is then retained indefinitely. There's a method if I remember correctly that yo

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Roland King
> On 13 May 2015, at 07:04, Graham Cox wrote: > > >> On 13 May 2015, at 1:22 am, Sean McBride wrote: >> >> After some difficulty, yes. But it seems to only support direct subclasses >> of NSView, not NSControl for example. What's your superclass? > > > One possible issue in this case is

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Graham Cox
> On 13 May 2015, at 9:15 am, Akis Kesoglou wrote: > > >> On 13 Μαΐ 2015, at 02:04, Graham Cox wrote: >> >> One possible issue in this case is that the first time -drawRect: for any >> instance is called, it calls a class method to load the image from a >> resource, which is then retained i

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Graham Cox
> On 13 May 2015, at 9:37 am, Roland King wrote: > > How are you loading the resource? [ NSBundle mainBundle ] .. ] probably won’t > work, you need to use bundleForClass. Since that’s now true for resources in > frameworks too I’m trying to use that pattern myself. Yes, I’m using -bundleForC

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Kyle Sluder
On Tue, May 12, 2015, at 06:38 PM, Graham Cox wrote: > > So it looks as if a property that is IBInspectable may be getting > incorrectly set to 0 by IB AFTER -initWithFrame: is called, maybe because > the user interacts with the inspectable properties but doesn’t set a > value - rather than leavin

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Graham Cox
> On 13 May 2015, at 10:06 am, Kyle Sluder wrote: > > On Tue, May 12, 2015, at 06:38 PM, Graham Cox wrote: >> >> So it looks as if a property that is IBInspectable may be getting >> incorrectly set to 0 by IB AFTER -initWithFrame: is called, maybe because >> the user interacts with the inspecta

Re: IB_DESIGNABLE - anyone got it to work?

2015-05-12 Thread Kyle Sluder
> On May 12, 2015, at 5:49 PM, Graham Cox wrote: > > >> On 13 May 2015, at 10:06 am, Kyle Sluder wrote: >> >> On Tue, May 12, 2015, at 06:38 PM, Graham Cox wrote: >>> >>> So it looks as if a property that is IBInspectable may be getting >>> incorrectly set to 0 by IB AFTER -initWithFrame: is

Re: Aggravation trying to implement NSValueTransformer subclasses in Swift

2015-05-12 Thread Uli Kusterer
On 13 May 2015, at 00:38, Quincey Morris wrote: > static var keyPathsForValuesAffectingMessageIsEmpty: NSSet {return NSSet > (object: "messageIsEmpty”)} I think at least one of those should be “message” instead of “messageIsEmpty” … ? Cheers, -- Uli Kusterer “The Witnesses of TeachText are ev