Re: Help Mixing Objective-C Objective-C++

2011-02-25 Thread Jack Nutting
On Thu, Feb 24, 2011 at 4:31 PM, James Bucanek subscri...@gloaming.com wrote: (3) Using an auxiliary structure to contain all of the implementation variables is a good alternative, but it has other drawbacks. First, it seriously pollutes all of the implementation code with pointer redirection

Re: what are the scenarios for an app to be terminated?

2010-10-07 Thread Jack Nutting
On Wed, Oct 6, 2010 at 9:13 PM, eveningnick eveningnick eveningn...@gmail.com wrote: And what is the right way to terminate application, so it would release all its allocated objects? Maybe it's a wrong way to use -dealloc also as a destructor (like i did in C++) - where i save config file?

Re: Need specialized keyboard for iPad app

2010-08-31 Thread Jack Nutting
On Tue, Aug 31, 2010 at 9:01 AM, Jay Reynolds Freeman jay_reynolds_free...@mac.com wrote: I need to construct a specialized keyboard (the software kind) for an iPad app I am working on (using the SDKs and other tools that are presently available to all developers).  Searching the net and the

Re: Core Data Lightweight Migration Woes

2010-08-22 Thread Jack Nutting
On Sat, Aug 21, 2010 at 5:22 PM, Brad Gibbs bradgi...@mac.com wrote: Well, that's the way I started doing things, but, on pages 130-131 of the book More iPhone 3 Development (written by Dave Mark Jeff LaMarche -- your co-authors for Learn Cocoa on the Mac) make a point of saying that the new

Re: Core Data Lightweight Migration Woes

2010-08-21 Thread Jack Nutting
On Fri, Aug 20, 2010 at 8:46 PM, Brad Gibbs bradgi...@mac.com wrote: I highlighted the .xcdatamodel and did a Design Data Model  Add New Version.  That created the Config.xcdatamodeld with an unnumbered version of the datamodel (Config.xcdatamodel) and a numbered copy named Config

Re: Core Data Lightweight Migration Woes

2010-08-20 Thread Jack Nutting
On Fri, Aug 20, 2010 at 8:21 AM, Steve Steinitz stein...@datatactics.com.au wrote: - Removed any stray mopping models, just in case I didn't see your question until you'd already solved it yourself, but I just wanted to highlight this one point; Assumming you're referring here to old .mom

Re: Data source

2010-08-17 Thread Jack Nutting
On Tue, Aug 17, 2010 at 3:15 AM, k...@highrolls.net wrote: Please point me to a resource for Cocoa questions in addition to this.  I am having real difficulty with a problem and hitting dead ends. Thanks! Have you tried picking up a book on Cocoa programming? There are a number of books in

Re: Array controllers in code?

2010-07-22 Thread Jack Nutting
The simplest way is to create action methods in your controller class, along with ivars for the array controllers you need to access, something like this in the header: @interface MyController : NSObject { IBOutlet NSArrayController *masterController; IBOutlet NSArrayController

Re: Core Data : Managed Object Models : Configurations, Versions

2010-06-16 Thread Jack Nutting
I can't answer all your questions off the top of my head, but: On Wed, Jun 16, 2010 at 12:40 AM, Jerry Krinock je...@ieee.org wrote: Apparently it is common to merge managed object models.  When is this done? My app's bundle contains three managed object models, but they are for versioning;

Re: Regarding MVC design pattern

2010-05-19 Thread Jack Nutting
On Wed, May 19, 2010 at 10:48 AM, Sai jche...@gmail.com wrote: I have two questions: 1. Look at the awakeFromNib method of Controller, my output of the retain count to the console are myModel retain count: 5 controller retain count: 17 both number are very surprised me, why is that? I

Re: Regarding MVC design pattern

2010-05-19 Thread Jack Nutting
On Wed, May 19, 2010 at 11:17 AM, Sai jche...@gmail.com wrote: Hi Jack, Thank you for your quick response. Your answer is very useful. Since I have pasted some of my codes in the previous mail. I just wonder if you have any comments on my codes, anything I can improve for this little app? Any

Re: rendering PDF on iPad's

2010-05-19 Thread Jack Nutting
On Wed, May 19, 2010 at 1:06 PM, Gustavo Pizano gustavxcodepic...@gmail.com wrote: Hello Jack and Laurent. So I will see the CGPDF API, also what Jack wrote. The idea its very simple, load pdf and be able to add notes, as I understand I can inject the notes object in the pdf strucutre,  

Re: Regarding MVC design pattern

2010-05-18 Thread Jack Nutting
On Tue, May 18, 2010 at 12:40 PM, Sai jche...@gmail.com wrote: However, I declare a NSDictionary instance variable in my model object. This NSDictionary instance store some data I need. And I will create this NSDictionary instance by invoking: [NSDictionary dictionaryWithObjects:names

Re: menu madness with retain count

2010-04-27 Thread Jack Nutting
On Tue, Apr 27, 2010 at 11:12 PM, Bill Bumgarner b...@mac.com wrote: The combination of leaks, zombies, heap, and malloc stack logging are much *much* more powerful and effective than trying to debug a leak, over-retain or under-retain with -retainCount. b.bum Hear, hear. I haven't

Re: Creating temporary NSManagedObjects

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 10:43 AM, vincent habchi vi...@macports.org wrote: I need to create a short-lived NSManagedObject; ideally, I'd want it not to be inserted in the Core Data underlying framework, because I need it only during the display of an auxiliary window, and I don't want it saved

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 11:36 AM, vincent habchi vi...@macports.org wrote: By the way, how do you delete these objects with a null MOC, since you are supposed to call [MOC deleteObject:]? Vincent Good question. I believe a simple release/autorelease will do. -- // jack //

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
Hi Joanna, On Mon, Apr 26, 2010 at 3:11 PM, Joanna Carter cocoa...@carterconsulting.org.uk wrote: Good question.  I believe a simple release/autorelease will do. If the object has been created by inserting into the context, then it would have to be removed from the contrext. Joanna

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:46 PM, Joanna Carter cocoa...@carterconsulting.org.uk wrote: Hi Jack Right, but we were talking about passing in nil as the context when creating the object, so there's no context to remove it from. That's interesting. I have never tried using a nil context.

Re: NSApplicationMain question

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:51 PM, Bill Appleton billapple...@dreamfactory.com wrote: did anyone have some more color on question (2)  the need to create a raw NSScroller and control it like a NSSlider  (min, max, value, proportion) is that possible? in other words all the shared code for

Re: NSApplicationMain question

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:56 PM, Bill Appleton billapple...@dreamfactory.com wrote: it needs to look like a scroll bar... is that possible? Ah, no. Of course not, silly me. I worked on a project years ago that had a similar requirement. It used a subclass of NSScrollView, I think, that

Re: Introspecting the current method

2010-04-19 Thread Jack Nutting
On Mon, Apr 19, 2010 at 9:27 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote: It is fine for most cases, but __func__ is defined at compile time, and so, does not log the real type of the instance (if this is a subclass). Hmmm, that's too bad. Seems to be the case for __FUNCTION__ and

Re: How to subclass UIButton?

2010-04-08 Thread Jack Nutting
I've successfully subclassed UIButton with no problems. I my case I wasn't interested in the style since I was implementing my own, so I created my own class method which just calls initWithFrame: + (id)buttonWithFrame:(CGRect)frame { return [[[self alloc] initWithFrame:frame] autorelease]; }

Re: How to subclass UIButton?

2010-04-08 Thread Jack Nutting
On Thu, Apr 8, 2010 at 8:42 AM, WT jrca...@gmail.com wrote: Is the fact that -initWithFrame: is the designated initializer documented anywhere? The docs for UIButton don't mention it. If this is documented and/or won't change, then it's the solution I've been looking for. It is documented,

Re: How could I make the first row not to be edited or moved in UITableView

2010-04-07 Thread Jack Nutting
On Tue, Apr 6, 2010 at 11:04 AM, Kalyanraju M kalyan_effig...@yahoo.com wrote: How could I make the first row not to be edited or moved in UITableView I know that with - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath the first row could be set not to

Re: iPhone Programming For OS X Coders?

2010-04-06 Thread Jack Nutting
On Wed, Apr 7, 2010 at 12:29 AM, Jens Alfke j...@mooseyard.com wrote: I have to confess that I haven't yet learned UIKit. The bits of iPhone development I've done so far have used networking and crypto APIs, and CoreAnimation, but hardly any of the UIKit classes. What would be the best book

Re: Best book for learning Objective c and cocoa

2010-04-01 Thread Jack Nutting
Shameless self-promotion alert! ;) Learn Cocoa on the Mac http://learncocoa.org On Wednesday, March 31, 2010, Nikhil Khandelwal nikhil_khandel...@persistent.co.in wrote: Hi all, I am looking for books to learn Objective C and Cocoa. I have good knowledge of  oo programming. Also I did