Re: @class

2013-03-22 Thread Diederik Meijer | Ten Horses
> The forward declaration is used to tell the compiler: "The word MyClass > represents a class. I don't give you the implementation yet, but it > represents a class, and the implementation will be provided later". …and this allows you to create a property for an instance of that class in the .h

Re: unwind custom segue and uinavigationcontroller

2013-03-22 Thread Torsten Curdt
> I know quite a lot about segue unwinding. See my book for lots of info: > > http://www.apeth.com/iOSBook/ch19.html#_unwind_segues Wow - that's the first proper write up I've read. Thanks! >>Now the is the question how do I tell the navigation controller to use >>my custom segue when popping bac

Re: @class

2013-03-22 Thread Alex Zavatone
You can think of it as a table of contents for the compiler. Essentially, the table of contents that would have entries that represent each chapter in a book would be your forward declaration where the table of contents is the list of methods that are coming up in the .m file. This allows the c

Re: exc bad access when change the contentSize of popover

2013-03-22 Thread Jens Alfke
On Mar 21, 2013, at 8:47 AM, Peng Gu wrote: > 4. I click the button again, then the app hangs for about 10 seconds and > the xcode throws EXC_BAD_ACCESS(code=2, address=0x7fff5f38), the caller > is 0_CFArrayReplaceValues > *The app doesn't die, it just doesn't respond.* The app has cr

Re: Watching a file for changes.

2013-03-22 Thread Jens Alfke
On Mar 20, 2013, at 10:15 AM, Christ Levesque wrote: > If you mean in a text edit is it so easy you can use observing mechanism on > object that has changed. For instance you have a text edit app and you assume > input to this app an NSString. Well you make a new class inherited from > NSStri

Re: exc bad access when change the contentSize of popover

2013-03-22 Thread John McCall
On Mar 22, 2013, at 10:32 AM, Jens Alfke wrote: > On Mar 21, 2013, at 8:47 AM, Peng Gu wrote: > >> 4. I click the button again, then the app hangs for about 10 seconds and >> the xcode throws EXC_BAD_ACCESS(code=2, address=0x7fff5f38), the caller >> is 0_CFArrayReplaceValues >> *The app d

ARC Help

2013-03-22 Thread Chris Tracewell
In a project I am moving from GC to ARC I'm trying to understand the nuances of the new declarations. I have many pre-ARC properties that look like... @interface TKObject : NSObject { NSString *theString;

Re: ARC Help

2013-03-22 Thread Quincey Morris
On Mar 22, 2013, at 11:34 , Chris Tracewell wrote: > After ARC conversion it looks like > > > @interface TKObject : NSObject > { > NSString *__strong theString; > } > > @property(readwrite,strong) NSStrin

Re: ARC Help

2013-03-22 Thread Chris Tracewell
On Mar 22, 2013, at 1:51 PM, Quincey Morris wrote: > Note that you can likely just remove the ivar declaration completely, or at > worst move it to the @implemenation statement instead. There's really no need > to put a private ivar in a public interface file any more. In this case this is a

Re: ARC Help

2013-03-22 Thread Quincey Morris
(sorry, this turned into a tome) The way properties are compiled has changed over time. Assuming you're using the current (Xcode 4.6+) version of clang to compile your files, there is an explicit 'atomic' attribute for properties. This has been around for some time. (Keep in mind that out-of-da

Re: exc bad access when change the contentSize of popover

2013-03-22 Thread Jens Alfke
On Mar 22, 2013, at 1:50 PM, Peng Gu wrote: > I worked around the issue by creating new popover when necessary, before > change the contentSize. But I'd still like to know what the issue is. Did you already try the debugger, as I suggested earlier? Instruments is not the right tool for this j

Re: ARC Help

2013-03-22 Thread Chris Tracewell
On Mar 22, 2013, at 3:27 PM, Quincey Morris wrote: > (sorry, this turned into a tome) No need to apologize. Very, very helpful - thank you so much for the input, it clears everything up. I'll be reading up on the modern Objective-c changes. Thanks CT _

Re: ARC Help

2013-03-22 Thread Greg Parker
On Mar 22, 2013, at 2:48 PM, Chris Tracewell wrote: > On Mar 22, 2013, at 1:51 PM, Quincey Morris > wrote: >> or to add an explicit 'atomic' in only those cases where atomicity is >> required and (for custom accessors) actually implemented. > > Do you mean to add 'atomic' by not declaring 'non

Re: exc bad access when change the contentSize of popover

2013-03-22 Thread Peng Gu
What did you mean by the debugger UI? This is my first time to use xcode for development. On Fri, Mar 22, 2013 at 6:43 PM, Jens Alfke wrote: > > On Mar 22, 2013, at 1:50 PM, Peng Gu wrote: > > > I worked around the issue by creating new popover when necessary, before > change the contentSize. B

Re: exc bad access when change the contentSize of popover

2013-03-22 Thread Jens Alfke
On Mar 22, 2013, at 5:37 PM, Peng Gu wrote: > What did you mean by the debugger UI? This is my first time to use xcode for > development. Xcode comes with a lot of built-in documentation. Please read about using the debugger. There are also a number of 3rd party books about Xcode, all of whi

UIViewController question

2013-03-22 Thread Koen van der Drift
I'd like to make a view layout similar to the Apple Stocks app, where the top view remains the same and the bottom view can be swiped to display different info views related to the top view. How should I design the view-controllers for this? One for the top view and then some additional ones fo

Re: Snapping windows while moving

2013-03-22 Thread Steve Mills
On Mar 13, 2013, at 10:34:35, Ken Thomases wrote: > The Window Server moves most windows entirely without involving the app > (until the move is completed). If you want to change how windows get moved, > I think you have to take over the whole process. You do [window > setMovable:NO] to make

Re: ARC Help

2013-03-22 Thread Marcel Weiher
On Mar 22, 2013, at 23:27 , Quincey Morris wrote: > The reason for this is not much about performance. ('atomic' is slower, but > not by much.) On my machine, the difference is around 4x for the read accessor, 3 ns nonatomic vs. 13ns atomic. Cheers, Marcel ___