Re: Losing my memory - a caching problem?

2010-08-17 Thread Ken Ferry
On Tue, Aug 17, 2010 at 1:05 PM, Stuart Rogers wrote: > On 17 Aug 2010, at 18:05, Ken Ferry wrote: > > > (1) I would focus your attention on CoreImage in this case. > (2) It is wonderful that you realized that if you want the bits in a > specific pixel format then you need to draw them in a bitma

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-17 Thread Dave Carrigan
On Aug 17, 2010, at 2:03 PM, James Miller wrote: > Hello. > > I'm a little new to Objective-C / Cocoa so please don't shoot me, but I've > been looking around for a few hours and can't seem to figure out what I'm > doing wrong on my own and could use a second/third/fourth set of eyes. > >

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-17 Thread vincent habchi
Le 17 août 2010 à 23:03, James Miller a écrit : > // NSString *level = [[NSString alloc] > // initWithContentsOfFile:path > // encoding:NSUTF8StringEncoding > // erro

stringByReplacingCharactersInRange leading to bus error

2010-08-17 Thread James Miller
Hello. I'm a little new to Objective-C / Cocoa so please don't shoot me, but I've been looking around for a few hours and can't seem to figure out what I'm doing wrong on my own and could use a second/third/fourth set of eyes. I have NSTimer that runs several times a second against an NSString

Re: Design pattern for core data, document based, graphical application

2010-08-17 Thread Kenneth Baxter
Thanks Erik Having the model doing the drawing directly like that is something I hadn't thought of. Definitely worth considering. I'll still have to observe changes in related attributes to trigger UI updates, and I have many ancillary objects that need to be involved in the process, so I may

Re: Design pattern for core data, document based, graphical application

2010-08-17 Thread Kenneth Baxter
Thanks Fritz - I had a look at the Sketch example, and see how it implements the AppleScript. I see also that it uses the concept of a single canvas that has objects that can draw on it. I think I'll have to do some testing with the other scenarios to see how performance would go using views or

Re: Losing my memory - a caching problem?

2010-08-17 Thread Ken Thomases
On Aug 17, 2010, at 7:26 PM, Shawn Erickson wrote: > When you say "free" I assume you mean the "free:" number listed in > activity viewer for the system as a whole? > If so then what you are seeing is an expected result of the "unified > buffer cache" maintained by the system (since you say priva

Re: Losing my memory - a caching problem?

2010-08-17 Thread Shawn Erickson
On Tue, Aug 17, 2010 at 3:10 AM, Stuart Rogers wrote: > I'm having enormous difficulty keeping tabs on memory usage in my current > project.  I'm happy that I'm not leaking anything - Build & Analyse reports no > issues, and neither does Instruments (Object Allocations and Leaks).  And yet, > when

Re: Losing my memory - a caching problem?

2010-08-17 Thread Stuart Rogers
On 17 Aug 2010, at 22:48, Sean McBride wrote: > On Tue, 17 Aug 2010 22:20:55 +0100, Stuart Rogers said: > NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ... [pool release]; >>> >>> Have you tried using drain instead of release? That seems to be the >> preferred way

Re: Losing my memory - a caching problem?

2010-08-17 Thread Sean McBride
On Tue, 17 Aug 2010 22:20:55 +0100, Stuart Rogers said: >>> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >>> ... >>> [pool release]; >> >> Have you tried using drain instead of release? That seems to be the >preferred way at this point, triggering GC collection if needed (I d

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
On Aug 17, 2010, at 5:37 PM, Greg Parker wrote: > On Aug 17, 2010, at 2:32 PM, Cem Karan wrote: >> Mmm, my question is, what about Apple's code? I'll be the first to admit, I >> don't know enough about what goes on under the hood, so what I'm about to >> say may be very, very wrong (anyone out

Re: Losing my memory - a caching problem?

2010-08-17 Thread Greg Parker
On Aug 17, 2010, at 2:32 PM, Cem Karan wrote: > Mmm, my question is, what about Apple's code? I'll be the first to admit, I > don't know enough about what goes on under the hood, so what I'm about to say > may be very, very wrong (anyone out there that knows better than me, here is > your cue t

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
On Aug 17, 2010, at 5:20 PM, Stuart Rogers wrote: > On 17 Aug 2010, at 21:36, Cem Karan wrote: >> On Aug 17, 2010, at 4:05 PM, Stuart Rogers wrote: >>> >>> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >>> ... >>> [pool release]; >> >> Have you tried using drain instead of releas

Re: Losing my memory - a caching problem?

2010-08-17 Thread Stuart Rogers
On 17 Aug 2010, at 21:36, Cem Karan wrote: > On Aug 17, 2010, at 4:05 PM, Stuart Rogers wrote: >> >> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >> ... >> [pool release]; > > Have you tried using drain instead of release? That seems to be the > preferred way at this point,

Re: [PARTIAL SOLUTION] Erratic Cocoa Behavior

2010-08-17 Thread koko
The outline view's enclosing scroll view had 'copy on scroll' set in IB. I unset this and the horizontal lines that were being drawn when scrolling went away. I am still left with the border as indicated earlier. I have set border type to none for the scroll view but it still appears. I

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
On Aug 17, 2010, at 4:05 PM, Stuart Rogers wrote: > On 17 Aug 2010, at 18:07, Ken Ferry wrote: >> On Tue, Aug 17, 2010 at 9:53 AM, Cem Karan wrote: >> >>> One dumb question; I see where you're putting images into an autorelease >>> pool, but I don't see you setting up or tearing down pools. Whe

Re: First responder status and field editor

2010-08-17 Thread Kyle Sluder
On Tue, Aug 17, 2010 at 12:55 PM, vincent habchi wrote: > just a tiny question: I have a NSTextField whose field editor is customized. > When I click inside to begin typing text, to my surprise, its (that is, the > NSTextField) -(BOOL)resignFirstResponder gets called, which is rather > unexpect

Re: Losing my memory - a caching problem?

2010-08-17 Thread Stuart Rogers
On 17 Aug 2010, at 18:07, Ken Ferry wrote: > On Tue, Aug 17, 2010 at 9:53 AM, Cem Karan wrote: > >> One dumb question; I see where you're putting images into an autorelease >> pool, but I don't see you setting up or tearing down pools. Where are you >> doing that? > > Or, it could be much eas

Re: Losing my memory - a caching problem?

2010-08-17 Thread Stuart Rogers
On 17 Aug 2010, at 18:05, Ken Ferry wrote: > > (1) I would focus your attention on CoreImage in this case. > (2) It is wonderful that you realized that if you want the bits in a specific > pixel format then you need to draw them in a bitmap, but you now have a > redundant bitmap: Yes, I wanted

First responder status and field editor

2010-08-17 Thread vincent habchi
Hi everybody, just a tiny question: I have a NSTextField whose field editor is customized. When I click inside to begin typing text, to my surprise, its (that is, the NSTextField) -(BOOL)resignFirstResponder gets called, which is rather unexpected since the field is, on the contrary, acquiring

Re: Erratic Cocoa Behavior

2010-08-17 Thread koko
Thanks. The only shot in the dark I like involved Ozzy! -koko On Aug 17, 2010, at 12:42 PM, Mark Ritchie wrote: Hey Koko! On 17/Aug/2010, at 11:04 AM, k...@highrolls.net wrote: Thanks. I -reloadData on -draggingExited and -draggingEnded to no avail. Given the number of suggests which

Re: concludeDragOperation

2010-08-17 Thread koko
More code I forgot in the previous reply /* draggingEntered */ - (NSDragOperation)draggingEntered:(id )sender { NSLog(@"draggingEntered"); if ((NSDragOperationCopy & [sender draggingSourceOperationMask]) == NSDragOperationCopy) return NSDragOperationCopy;

Re: Erratic Cocoa Behavior

2010-08-17 Thread Mark Ritchie
Hey Koko! On 17/Aug/2010, at 11:04 AM, k...@highrolls.net wrote: > Thanks. I -reloadData on -draggingExited and -draggingEnded to no avail. Given the number of suggests which have been put forth to no avail, my suggestion is to distill your problem into a sample application which show's the d

Re: Erratic Cocoa Behavior

2010-08-17 Thread Mark Ritchie
On 17/Aug/2010, at 6:52 AM, Uli Kusterer wrote: > There are both NSShowAllViews and NSShowAllDrawing. They don't go in the > Info.plist. They either go in your app's preferences file, or you can pass > them as command-line arguments (e.g. double-click your app in the > "Executables" group in Xco

Re: Erratic Cocoa Behavior

2010-08-17 Thread koko
Thanks. I -reloadData on -draggingExited and -draggingEnded to no avail. On Aug 17, 2010, at 10:54 AM, kirankumar wrote: try to reloadDate whenever it possible On Aug 17, 2010, at 8:44 AM, k...@highrolls.net wrote: Thanks. I am not doing any Quartz debug, so I rule that out. I have

Re: Code sign verification in Leopard

2010-08-17 Thread Rainer Brockerhoff
At 08:35 -0700 17/08/10, cocoa-dev-requ...@lists.apple.com wrote: >From: Arun >Date: Tue, 17 Aug 2010 21:01:06 +0530 >Message-ID: >Content-Type: text/plain > >I am using Mac OS X 10.5.8 and xcode v3.1. >I have created a Self Code signing identity using Keychain Access >application. The name of th

Re: Erratic Cocoa Behavior

2010-08-17 Thread koko
Thanks. I am not using threads, operations or queues. -koko On Aug 17, 2010, at 10:54 AM, Chris Hanson wrote: Are you using threads, operations or queues (dispatch)? — Chris On Aug 16, 2010, at 8:14 PM, k...@highrolls.net wrote: Thanks. I am not doing any Quartz debug, so I rule that o

Re: Erratic Cocoa Behavior

2010-08-17 Thread koko
Thanks. There are no arguments set in the area you describe fro me to look at. -koko On Aug 17, 2010, at 10:54 AM, Uli Kusterer wrote: On Aug 17, 2010, at 5:14 AM, k...@highrolls.net wrote: I have nothing set in info.plist for NSShowAllDrawing. There are both NSShowAllViews and NSShowAll

Replacing undo manager in NSPersistentDocument sublclass

2010-08-17 Thread Gideon King
Just a quick question. I want to change my document to using the GCUndoManager so I can actually see what's going on with undo in my application. From the documentation, I would have thought that the following was sufficient in my NSPersistentDocument subclass's -init method: GC

Re: Losing my memory - a caching problem?

2010-08-17 Thread Ken Ferry
On Tue, Aug 17, 2010 at 9:53 AM, Cem Karan wrote: > > <> > > One dumb question; I see where you're putting images into an autorelease > pool, but I don't see you setting up or tearing down pools. Where are you > doing that? > > Or, it could be much easier than I was saying and you might just nee

Re: Losing my memory - a caching problem?

2010-08-17 Thread Ken Ferry
Hi Stuart, Just a couple of quick notes: (1) I would focus your attention on CoreImage in this case. (2) It is wonderful that you realized that if you want the bits in a specific pixel format then you need to draw them in a bitmap, but you now have a redundant bitmap: NSBitmapImageRep *inBmpI

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
> From: Stuart Rogers > Date: August 17, 2010 6:10:45 AM EDT > To: cocoa-dev@lists.apple.com > Subject: Losing my memory - a caching problem? > > I'm having enormous difficulty keeping tabs on memory usage in my current > project. I'm happy that I'm not leaking anything - Build & Analyse reports

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-17 Thread Matt Neuburg
On Fri, 13 Aug 2010 13:38:59 -0400, Michael Ash said: >On Thu, Aug 12, 2010 at 10:51 PM, yanghb wrote: >> if the instance is released in delegate, what to perform the following >> code?OK, maybe code segment will always be there, but if the code >> access some instance vairable, it just will caus

Re: Design pattern for core data, document based, graphical application

2010-08-17 Thread Erik Buck
You have too many design options on the table.  Try some of them in mini-prototypes to see how well they work and then drop some of the ideas.   I have used Core Data to store Model data for 2D and 3D drawing/visualization applications.  My approach was to use the Core Data designer to specify cu

Code sign verification in Leopard

2010-08-17 Thread Arun
Hi All, I am using Mac OS X 10.5.8 and xcode v3.1. I have created a Self Code signing identity using Keychain Access application. The name of the Code signing identity is "arun". Using this identity i have signed a binary using the below command. codesign -s arun -r="designated => anchor trusted

Re: Design pattern for core data, document based, graphical application

2010-08-17 Thread Fritz Anderson
On 16 Aug 2010, at 8:18 PM, Kenneth Baxter wrote: > If I was exposing all this to AppleScript, would I be able to leverage my > view controllers etc, or would I have to use a different architecture? I believe Apple's sample code for "Sketch-112" will put you a long way into your quest. Search f

Re: Problem compiling a 10.5 project for 10.6

2010-08-17 Thread Fritz Anderson
All I can do is help you poke at this. I've never run into it myself. On 16 Aug 2010, at 1:35 PM, kentoz...@comcast.net wrote: > File not found: > /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/versions/A/AE > > > After much digging, I found a AE.f

Re: Erratic Cocoa Behavior

2010-08-17 Thread Sean McBride
On Tue, 17 Aug 2010 15:52:04 +0200, Uli Kusterer said: > There are both NSShowAllViews and NSShowAllDrawing. They don't go in >the Info.plist. They either go in your app's preferences file, or you >can pass them as command-line arguments (e.g. double-click your app in >the "Executables" group in X

Re: Erratic Cocoa Behavior

2010-08-17 Thread Uli Kusterer
On Aug 17, 2010, at 5:14 AM, k...@highrolls.net wrote: > I have nothing set in info.plist for NSShowAllDrawing. There are both NSShowAllViews and NSShowAllDrawing. They don't go in the Info.plist. They either go in your app's preferences file, or you can pass them as command-line arguments (e.

Re: isTemporaryID unrecognized selector? [SOLVED]

2010-08-17 Thread Uli Kusterer
On Aug 16, 2010, at 8:40 PM, Ferhat Ayaz wrote: > On Aug 16, 2010, at 8:02 PM, Uli Kusterer wrote: >> On Aug 14, 2010, at 1:06 PM, Ferhat Ayaz wrote: >>> I received an exception from my application which I can not figure out. I >>> have a subclass of NSManagedObject, named ASManagedCategory. >>>

Losing my memory - a caching problem?

2010-08-17 Thread Stuart Rogers
I'm having enormous difficulty keeping tabs on memory usage in my current project. I'm happy that I'm not leaking anything - Build & Analyse reports no issues, and neither does Instruments (Object Allocations and Leaks). And yet, when watching bulk memory usage I see my free RAM dropping like a s

Re: Using Apple icons

2010-08-17 Thread Alastair Houghton
On 16 Aug 2010, at 23:00, Gideon King wrote: > I was at a WWDC session several years ago (maybe about 5 years?) where > exactly this question was asked of John Geleynse at one of the sessions. He > said definitively that you could use the icons of applications that come with > the system so lon

Re: Data source

2010-08-17 Thread Jack Nutting
On Tue, Aug 17, 2010 at 3:15 AM, 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 print that help

Design pattern for core data, document based, graphical application

2010-08-17 Thread Kenneth Baxter
Hi, I am working on an application that uses core data at the back end, and the NSPersistentDocument architecture at the front end. It is a graphics application which essentially displays a tree of objects, destined for 105+ deployment. I also want the functionality available by AppleScript. I

Problem compiling a 10.5 project for 10.6

2010-08-17 Thread kentozier
Hi I have a project I need to convert to Snow Leopard, but keep getting the following error when I try to compile. File not found: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/versions/A/AE After much digging, I found a AE.framework in the

SSH-keygen in iPhone

2010-08-17 Thread Paresh Thakor
>> Hi, >> Forgive me if i've posted my message in wrong mailing list. But help me if anyone can. >> Does anyone know how can we generate ssh public/private key pair in >> iPhone..? Like, TouchTerm? >> I'm trying to implement RSA key generation for iPhone..! Lots of searches >> result into SSH-

UITableView Custom Section Headers

2010-08-17 Thread Luis Israel Pasos Peña
I was creating an RSS reader that I thought was really cool, but then I saw Jason Beaver's and Luke Hiesterman's presentation at WWDC 2010 and I went... OK that's cooler. So basically, I'm stuck with a couple of things in the new version of the RSS reader: 1. I'm implementing UIViewControllers