Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Mike Abdullah
> On 25 Jan 2015, at 06:35, Richard Charles wrote: > > Core Data generated primitive accessors are used to get and set values from > and to the managed object's private internal store. Core Data generated > primitive accessors do not have change notification. If primitive accessors > are pres

Trying to create a collection view with evenly distributed cell

2015-01-25 Thread Aaron Lewis
Hi, I'm trying to create a 3 cell per row collection, and I want no margin (horizontally or vertically) between each cell. So in xcode I set Min Spacing For Cells / For Lines to 1, Indicator insets (all 4 values) to 0, then I write code like this: - (NSInteger)collectionView:(UICollectionView *)

Re: Trying to create a collection view with evenly distributed cell

2015-01-25 Thread Mike Abdullah
> On 25 Jan 2015, at 10:12, Aaron Lewis wrote: > > Hi, > > I'm trying to create a 3 cell per row collection, and I want no margin > (horizontally or vertically) between each cell. > > So in xcode I set Min Spacing For Cells / For Lines to 1, Indicator > insets (all 4 values) to 0, then I write

Binding to a view's model object

2015-01-25 Thread Roland King
I have a xib with a top-level view and a bunch of subviews which represents one view of a given model object. The top-level NSView subclass has a readwrite property which is the model object of which it's a view. I thought this was a pretty standard pattern, especially in OSX which only just rec

Re: Binding to a view's model object

2015-01-25 Thread Keary Suska
On Jan 25, 2015, at 3:34 AM, Roland King wrote: > I have a xib with a top-level view and a bunch of subviews which represents > one view of a given model object. The top-level NSView subclass has a > readwrite property which is the model object of which it's a view. I thought > this was a pret

[RESOLVED] Re: Trying to create a collection view with evenly distributed cell

2015-01-25 Thread Aaron Lewis
Thanks Mike, I followed the tutorial and did the exact same thing in objc, works. On Sun, Jan 25, 2015 at 6:21 PM, Mike Abdullah wrote: > >> On 25 Jan 2015, at 10:12, Aaron Lewis wrote: >> >> Hi, >> >> I'm trying to create a 3 cell per row collection, and I want no margin >> (horizontally or ve

Adding constrains for anonymous buttons

2015-01-25 Thread Aaron Lewis
Hi, I'm trying to create a "label group", so I decided to generate 3 buttons and put them in a single line, evenly sized and evenly spaced. But these buttons are un-named, is it impossible to use constraintsWithVisualFormat now? e.g UIButton *buttons[3]; for (int i = 0; i < 3; ++ i)

Re: Binding to a view's model object

2015-01-25 Thread Jonathan Mitchell
> On 25 Jan 2015, at 10:34, Roland King wrote: > > I have a xib with a top-level view and a bunch of subviews which represents > one view of a given model object. The top-level NSView subclass has a > readwrite property which is the model object of which it's a view. I thought > this was a p

Re: Binding to a view's model object

2015-01-25 Thread Sandor Szatmari
I think you can bring an object controller into your xib from the IB pallet. Bind the content object of the controller to your NSView subclass and expose the binding of modelObject.someStringProperty through the object controller's attributes inspector panel. The all your subviews will bind to

What's the right way to use UIActivityIndicatorView? After it's stopped

2015-01-25 Thread Aaron Lewis
Hi, I'm trying to show another UI Control when the stopAnimation method is called. But in xcode if I drag the UIActivityIndicatorView first, any other UI Control seems to be replacing it. Now it looked like I had to do create the other UI Control and add it manually when the animation is stopped

Crash in libsystem_kernel.dylib`__workq_kernreturn:

2015-01-25 Thread Trygve Inda
I am getting a very weird, random crash in: libsystem_kernel.dylib`__workq_kernreturn: 0x7fff8381de60: movl $0x2000170, %eax 0x7fff8381de65: movq %rcx, %r10 0x7fff8381de68: syscall 0x7fff8381de6a: jae0x7fff8381de74; __workq_kernreturn + 20 0x7fff8381de6c: movq %rax, %rdi

Re: Adding constrains for anonymous buttons

2015-01-25 Thread Ben Kennedy
On 25 Jan 2015, at 7:32 am, Aaron Lewis wrote: > I'm trying to create a "label group", so I decided to generate 3 > buttons and put them in a single line, evenly sized and evenly spaced. What do you mean by "label group"? Would UILabel be more suitable than UIButton? (I presume that your for-

Re: Crash in libsystem_kernel.dylib`__workq_kernreturn:

2015-01-25 Thread Quincey Morris
On Jan 25, 2015, at 12:33 , Trygve Inda wrote: > > It does seem like if I remove a call to > > NSData* imageData = [[self myImageRep] > representationUsingType:NSJPEGFileType properties:imageProperties]; > > It no longer crashes, but the crash happens 3-5 seconds after this call when > my progr

Re: Crash in libsystem_kernel.dylib`__workq_kernreturn:

2015-01-25 Thread Trygve Inda
> On Jan 25, 2015, at 12:33 , Trygve Inda wrote: >> >> It does seem like if I remove a call to >> >> NSData* imageData = [[self myImageRep] >> representationUsingType:NSJPEGFileType properties:imageProperties]; >> >> It no longer crashes, but the crash happens 3-5 seconds after this call when >

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Jerry Krinock
On 2015 Jan 25, at 01:20, Mike Abdullah wrote: > You are mistaken. Core Data *does* fire KVO notifications during undo/redo. Although I wasn’t aware of this, I just did a little experiment and found that Mike is correct… http://youtu.be/PUHBAq-Me_4 On 25 Jan 2015, at 06:35, Richard Charles

Re: Crash in libsystem_kernel.dylib`__workq_kernreturn:

2015-01-25 Thread Kevin Meaney
What are you using for memory management then? Manual, GC? Sent from my iPad On 25 Jan 2015, at 22:57, Trygve Inda wrote: >>> On Jan 25, 2015, at 12:33 , Trygve Inda wrote: >>> >>> It does seem like if I remove a call to >>> >>> NSData* imageData = [[self myImageRep] >>> representationUsingT

Re: Crash in libsystem_kernel.dylib`__workq_kernreturn:

2015-01-25 Thread Trygve Inda
> What are you using for memory management then? Manual, GC? > > Sent from my iPad > > On 25 Jan 2015, at 22:57, Trygve Inda wrote: > On Jan 25, 2015, at 12:33 , Trygve Inda wrote: It does seem like if I remove a call to NSData* imageData = [[self myImageRep] re

Re: Crash in libsystem_kernel.dylib`__workq_kernreturn:

2015-01-25 Thread Stephen J. Butler
I agree that it sounds like a memory management bug. Especially since you aren't using ARC. Try turning on NSZombies and see if it crashes at a more helpful point. http://michalstawarz.pl/2014/02/22/debug-exc_bad_access-nszombie-xcode-5/ On Sun, Jan 25, 2015 at 4:57 PM, Trygve Inda wrote: >> On

Re: Binding to a view's model object

2015-01-25 Thread Roland King
> On 25 Jan 2015, at 23:15, Keary Suska wrote: > > On Jan 25, 2015, at 3:34 AM, Roland King wrote: > >> I have a xib with a top-level view and a bunch of subviews which represents >> one view of a given model object. The top-level NSView subclass has a >> readwrite property which is the mode

Re: setApplicationIconImage:

2015-01-25 Thread Rick C.
Got it Jens and thanks everyone for the help it’s much appreciated… :-) > On Jan 24, 2015, at 1:05 AM, Jens Alfke wrote: > > >> On Jan 23, 2015, at 1:53 AM, Rick C. > > wrote: >> >> Unfortunately setApplicationIconImage: works great it’s just I can’t find a >> m

Re: Binding to a view's model object

2015-01-25 Thread Keary Suska
On Jan 25, 2015, at 6:07 PM, Roland King wrote: > >> On 25 Jan 2015, at 23:15, Keary Suska wrote: >> >> On Jan 25, 2015, at 3:34 AM, Roland King wrote: >> >>> I have a xib with a top-level view and a bunch of subviews which represents >>> one view of a given model object. The top-level NSV

Any way to force a window under the menu bar?

2015-01-25 Thread Trygve Inda
I have created a borderless NSWindow. Is there a way to force it to appear under the menu bar so that the content of the window shows through the translucent menu bar? The OS seems to be resizing or repositioning my window to prevent it from sliding under the menu bar even when positioned programm

Re: Any way to force a window under the menu bar?

2015-01-25 Thread Eric Schlegel
> On Jan 25, 2015, at 8:39 PM, Trygve Inda wrote: > > I have created a borderless NSWindow. Is there a way to force it to appear > under the menu bar so that the content of the window shows through the > translucent menu bar? Even if you force it under the menubar, you won’t see its content sho

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Kyle Sluder
On Sun, Jan 25, 2015, at 05:16 PM, Jerry Krinock wrote: • Amount of code required is the same or less > • Ability to coalesce and filter notifications per object or name > • When an observer is being torn down you can remove all observers with > one line of code, > [NSNotificationCenter remove

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Jerry Krinock
> On 2015 Jan 25, at 22:03, Kyle Sluder wrote: > > On Sun, Jan 25, 2015, at 05:16 PM, Jerry Krinock wrote: >> • When an observer is being torn down you can remove all observers with >> one line of code, >> [NSNotificationCenter removeObserver:self]. > This is a dangerous API. If your super