mouseDragged and bindings

2012-09-29 Thread GW Rodriguez
Problem: a declared property in a NSView subclass doesn't update members bound to it (with bindings) when in a mouseDragged method. So I have a subclass of NSView that has an ivar that I declare as a property.   In IB I have a NSTextField that I set the binding to the same variable (and I do eve

Re: Blocks with return type

2012-09-29 Thread Marco S Hyman
On Sep 29, 2012, at 9:11 PM, Quincey Morris wrote: > I believe it's official syntax. It's not (quite) documented in the developer > documentation, but I assume it's in the clang docs somewhere. http://clang.llvm.org/docs/BlockLanguageSpec.txt ___ C

Re: Blocks with return type

2012-09-29 Thread Quincey Morris
On Sep 29, 2012, at 20:55 , Kyle Sluder wrote: > I wasn't aware this was accepted syntax. I was under the impression that you > either had to explicitly case the return value or explicitly cast the block > literal. I believe it's official syntax. It's not (quite) documented in the developer d

Re: Blocks with return type

2012-09-29 Thread Kyle Sluder
On Sep 29, 2012, at 8:40 PM, Quincey Morris wrote: > On Sep 29, 2012, at 19:41 , "Gerriet M. Denkmann" > wrote: > >> LongBlock_t aBlock = <...some magic here...> { (void)a; unsigned long x >> = 5; return x;}; >> >> What should <...some magic here...> look like? > > LongBlock_t aBlock =

Re: Blocks with return type

2012-09-29 Thread Quincey Morris
On Sep 29, 2012, at 19:41 , "Gerriet M. Denkmann" wrote: > LongBlock_t aBlock = <...some magic here...> { (void)a; unsigned long x = > 5; return x;}; > > What should <...some magic here...> look like? LongBlock_t aBlock =^ unsigned long (id a) {...}; If the return type is 'void' it can

Blocks with return type

2012-09-29 Thread Gerriet M. Denkmann
I have a typedef (no complains from Xcode - so I assume it to be correct): typedef unsigned long (^LongBlock_t)(id a); Now I want to set a variable to some block: LongBlock_t aBlock = <...some magic here...> { (void)a; unsigned long x = 5; return x;}; What should <...some magic here...> lo

Re: Constraints Question

2012-09-29 Thread Jonathan Hull
You probably want to set the content hugging priority of the button to a lower value (probably UILayoutPriorityDefaultLow). By default, buttons have an intrinsic constraint that says they don't like to grow vertically (it likes to "hug" its content strongly in the vertical direction). [myButto

Constraints Question

2012-09-29 Thread Eric Gorr
I am trying to wrap my head around the auto-layout functionality. I have a sample project at: http://ericgorr.net/cocoadev/constraints.zip After opening the project, take a look at ELGFirstViewController.xib. This app will only be used in landscape. On this XIB, there are three object

Re: The joy of unexpected SIGABRTs

2012-09-29 Thread Jens Alfke
On Sep 28, 2012, at 9:00 PM, Alex Zavatone wrote: > I just spent 10 mins wiring up the GUI, did nothing else, and now when one > scene appears, Xcode instantly SIGABRTs, without any information in the > console or the debugger that comes close to telling why this happened. Well, what _did_ it

Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-29 Thread Mikkel Eide Eriksen
On 29/09/2012, at 18.49, cocoa-dev-requ...@lists.apple.com wrote: > Message: 5 > Date: Sat, 29 Sep 2012 13:48:40 +0200 > From: Willeke > To: Cocoa-Dev List > Subject: Re: NSPredicate / NSArray > addObserver:forKeyPath:options:context: exception > Message-ID: > Content-Type: text/plain; cha

Re: Crash when loading NSViewController view with NSArrayController

2012-09-29 Thread Kyle Sluder
On Sat, Sep 29, 2012, at 06:40 AM, Ken Thomases wrote: > A couple of things I would try: > > 1) Examine the registers for the stack frame of the > objc_msgSend_vtable5() call to see if you can figure out what message was > being sent and possibly its arguments. >

Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-29 Thread Mikkel Eide Eriksen
On 29/09/2012, at 15.59, Keary Suska wrote: > On Sep 28, 2012, at 7:17 PM, Mikkel Eide Eriksen wrote: > On 28/09/2012, at 03.51, Keary Suska wrote: >>> On Sep 27, 2012, at 11:54 AM, Mikkel Eide Eriksen wrote: When I run my app, I get an exception (quoted below) as soon as I expose

Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-29 Thread Keary Suska
On Sep 28, 2012, at 7:17 PM, Mikkel Eide Eriksen wrote: > On 28/09/2012, at 03.51, Keary Suska wrote: >> On Sep 27, 2012, at 11:54 AM, Mikkel Eide Eriksen wrote: >>> >>> When I run my app, I get an exception (quoted below) as soon as I expose my >>> objects to my array controller (via a property

Re: Crash when loading NSViewController view with NSArrayController

2012-09-29 Thread Ken Thomases
On Sep 29, 2012, at 7:58 AM, Markus Spoettl wrote: > I need help. > > I'm still stuck with a crash a posted here a couple of weeks back and there > is some more information now but I'm still at a loss understanding what is > going on. I sympathize. It can be very hard to debug these sorts of

Crash when loading NSViewController view with NSArrayController

2012-09-29 Thread Markus Spoettl
Hi, I need help. I'm still stuck with a crash a posted here a couple of weeks back and there is some more information now but I'm still at a loss understanding what is going on. The crash happens when calling [viewController loadView] during the nib decoding process of an NSArrayController

Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception

2012-09-29 Thread Willeke
Is "Auto Rearrange Content" of the array controller switched on? The array controller can't observe to-many relationships. Does NSPredicateEditor work with to-many relationships? I don't think so, but I'm not sure. ___ Cocoa-dev mailing list (Cocoa-de

Re: The joy of unexpected SIGABRTs

2012-09-29 Thread Alex Zavatone
Thank you all. It's 5:16 AM and I'm going home. Sorry for the spam. But it's built, it's posted and it installs. >From nothing to shipping in two very long days. Good night. On Sep 29, 2012, at 1:05 AM, Andres Kievsky wrote: > This worked for me the last time I got one of those: > > htt