Re: how do I get tracking, selection etc working with custom views in NSMenuItems?

2010-08-30 Thread Raleigh Ledet
If you have access to the WWDC site: https://developer.apple.com/wwdc/mac/library/samplecode/CustomMenus/Introduction/Intro.html If not, then the short answer is that you need to send the action method yourself and then close the menu. Personally, I prefer to wire up the action on the menu item

Re: Core Data and REST

2010-08-30 Thread Andy Bell
On Mon, Aug 30, 2010 at 5:14 AM, Chris Hanson c...@me.com wrote: On Aug 28, 2010, at 10:00 AM, Andy Bell andy.b...@allbabel.com wrote: At a later date I want to use something like REST using JSON to be the backend to Core Data in the application. Is this going to be possible? Core Data

Re: Transparant button click

2010-08-30 Thread Uli Kusterer
On Aug 27, 2010, at 10:18 PM, Erik Colson wrote: What would be the best way to create a button with a partially transparent image on a nsview that would only respond to mouse clicks that are on the non-transparent part of the image ? Override NSView's -hitTest: method on a subclass of

Core Data search optimization

2010-08-30 Thread Jesse Armand
Hello, I can't seem to find any discussion about this, but I have this question after I watched session 137 of WWDC about core data optimization. So, Melissa Turner advise to use = and instead of BEGINSWITH, but how do I do that with predicate substitution variables or formatted predicate?

Binding an objects Enabled to a button in IB

2010-08-30 Thread cocoa
Can the following be done completely in the nib file (in IB)? I have a form field whos fields are bound to various attributes of an object (the object Person has attributes as firstName, lastName, etc.). In my view I would like lock these fields, prohibiting them from being changed, i.e. I'd like

Re: Binding an objects Enabled to a button in IB

2010-08-30 Thread Joanna Carter
Le 30 août 2010 à 13:26, co...@wamundson.eu a écrit : Can the following be done completely in the nib file (in IB)? I have a form field whos fields are bound to various attributes of an object (the object Person has attributes as firstName, lastName, etc.). In my view I would like lock

problem with web view scrolling

2010-08-30 Thread Nava Carmon
Hi, I have a very strange problem with a web view, that is integrated in HUD window. When I scrolling the content with a wheel I see that the content of underlying document scrolls either. Seems, like scrolling events propagate to the underlying document. What might be the problem there and

Finding source of EXC_BREAKPOINT crash

2010-08-30 Thread Ben
Hi list, I'm having trouble tracking down the source of a crash. My app is built with a base SDK and deployment target of 10.5, but will only run on 10.6 systems. On 10.5 systems it crashes on launch with an EXC_BREAKPOINT and the following message: Dyld Error Message: unknown required load

Style question

2010-08-30 Thread Vincent Habchi
Hi everybody, just an enquiry regarding coding style. What is considered best: baz = [[[Foo alloc] init] autorelease]; … return baz; or baz = [[Foo alloc] init]; … return [baz autorelease]; ? Thanks! Vincent___ Cocoa-dev mailing list

Re: Style question

2010-08-30 Thread F van der Meeren
Prefer the first [[[Foo alloc] init] autorelease]; If there is a @throw between the creation and return, there is a chance (if not properly handled) that the autorelease won't be called. On 30 Aug 2010, at 17:29, Vincent Habchi wrote: Hi everybody, just an enquiry regarding coding style.

Re: Style question

2010-08-30 Thread Dave DeLong
My personal preference is the latter example. My general rule of thumb is that once I -release or -autorelease an object, I shouldn't interact with it anymore, since I have relinquished ownership of said object. The only time I don't follow that guideline is when I'm working inside a method

Re: Style question

2010-08-30 Thread A.M.
On Aug 30, 2010, at 11:29 AM, Vincent Habchi wrote: Hi everybody, just an enquiry regarding coding style. What is considered best: baz = [[[Foo alloc] init] autorelease]; … return baz; or baz = [[Foo alloc] init]; … return [baz autorelease]; ? According to the Google

Re: Style question

2010-08-30 Thread Ken Thomases
On Aug 30, 2010, at 10:29 AM, Vincent Habchi wrote: just an enquiry regarding coding style. What is considered best: baz = [[[Foo alloc] init] autorelease]; … return baz; or baz = [[Foo alloc] init]; … return [baz autorelease]; ? As with most style questions, there's no

Re: Style question

2010-08-30 Thread Joar Wingfors
On 30 aug 2010, at 08.29, Vincent Habchi wrote: baz = [[[Foo alloc] init] autorelease]; I think that it's definitively preferable to autorelease on the same line. It keeps all memory management together, and it's much less likely that later rearrangements of the code in question will result

Re: Core Data search optimization

2010-08-30 Thread Jesse Armand
Never mind, I found the solution in DerivedProperty example. On Mon, Aug 30, 2010 at 6:43 PM, Jesse Armand mnemonic...@gmail.com wrote: Hello, I can't seem to find any discussion about this, but I have this question after I watched session 137 of WWDC about core data optimization. So,

Resizing and NSImage to a new NSImage but keeping all metadata

2010-08-30 Thread Alexander Cohen
Hi, I need to take an NSImage, scale it down a bit while drawing it into an new NSImage and all along keep all the metadata associated with the original image ( such as the color profile, etc, ... ). Are there any example out there that show how to do this. I've tried creating a new NSImage

core data issues iOS 4.0.2

2010-08-30 Thread Damien Cooke
Hi all, I have been deleting objects with code similar to this. NSManagedObjectContext *context = [[self fetchedResultsController] managedObjectContext]; [context deleteObject:videoEntity]; [managedObjectContext processPendingChanges]; //commit

Re: Style question

2010-08-30 Thread aglee
On 30 Aug, 2010,at 11:33 AM, Dave DeLong davedel...@me.com wrote: My personal preference is the latter example. My general rule of thumb is that once I -release or -autorelease an object, I shouldn't interact with it anymore, since I have relinquished ownership of said object.   Definitely true

Re: Style question

2010-08-30 Thread Sean McBride
On Mon, 30 Aug 2010 08:37:08 -0700, Joar Wingfors said: I think that it's definitively preferable to autorelease on the same line. It keeps all memory management together, and it's much less likely that later rearrangements of the code in question will result in memory leaks. And for those that

Simple instance [[alloc] init] question.

2010-08-30 Thread Frederick C. Lee
Which is the preferred method of object allocation initialization? header file.h @property(nonatomic, release) IRMSerialDetailsDO *serialIDs; ... body.m @synthesize mySerialIDDO ... // 1) self.serialIDs = [[IRMSerialDetailsDO alloc] init]; or... // 2) IRMSerialDetailsDO *mySerialIDDO =

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread Brian Slick
#1 is a leak. (I'm assuming that release is supposed to be retain in the property declaration) Brian On Aug 30, 2010, at 8:23 PM, Frederick C. Lee wrote: Which is the preferred method of object allocation initialization? header file.h @property(nonatomic, release) IRMSerialDetailsDO

Re: Binding an objects Enabled to a button in IB

2010-08-30 Thread Jerry Krinock
On 2010 Aug 30, at 05:42, Joanna Carter wrote: The usual way to handle this would be to have a simple boolean property on the controller class… True, but let's answer the poster's question, Le 30 août 2010 à 13:26, co...@wamundson.eu a écrit : Can this binding be done … completely in

Re: core data issues iOS 4.0.2

2010-08-30 Thread Fritz Anderson
Googling CoreData could not fulfill a fault yields http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html as the very first result; it took me three seconds to do this. You don't give enough information to say for sure, but can you tell

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread Dave Geering
// 1) self.serialIDs = [[IRMSerialDetailsDO alloc] init]; The alloc method allocates an instance with a retain count of 1, and assigning it to the serialIDs property bumps it up to 2. In your dealloc method, you will [hopefully] send it a release message which puts it back at 1, but this means

Re: Finding source of EXC_BREAKPOINT crash

2010-08-30 Thread Greg Parker
On Aug 30, 2010, at 7:10 AM, Ben wrote: My app is built with a base SDK and deployment target of 10.5, but will only run on 10.6 systems. On 10.5 systems it crashes on launch with an EXC_BREAKPOINT and the following message: Dyld Error Message: unknown required load command 0x8022

zib works in Dubug, not in Release

2010-08-30 Thread Trygve Inda
I am uncompressing data with zlib: err = uncompress( buffer, bufferLength, (const Bytef*)data + sizeof( uLongf ), [self length] - sizeof( uLongf ) ); This works when I build a debug target, but not when I build a release target. I have verified the data sent into each target is the same. In

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread Charles Srstka
On Aug 30, 2010, at 7:23 PM, Frederick C. Lee wrote: // 1) self.serialIDs = [[IRMSerialDetailsDO alloc] init]; This is, as mentioned, a leak, although if performance is not an issue, you can still have the simplicity: self.serialIDs = [[[IRMSerialDetailsDO alloc] init] autorelease];

Finding Core Data objects in Instruments

2010-08-30 Thread Rick Mann
We're having a hard time tracking down our smaller leaks in our iPad app. When running on the simulator, one thing we noticed is that none of our Core Data objects shows up in Leaks or Allocations (all of them have custom NSManagedObject subclasses). Does Core Data never actually instantiate

Re: zib works in Dubug, not in Release

2010-08-30 Thread Trygve Inda
I am uncompressing data with zlib: err = uncompress( buffer, bufferLength, (const Bytef*)data + sizeof( uLongf ), [self length] - sizeof( uLongf ) ); This works when I build a debug target, but not when I build a release target. I have verified the data sent into each target is the

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread Scott Anguish
Assuming his @property was supposed to be (nonatomic,retain) We did the release explicitly when doing some sample code on iPhone. We didn’t want the autorelease pool to grow. IRMSerialDetailsDO *mySerialIDDO = [[IRMSerialDetailsDO alloc] init]; self.serialIDDO = mySerialIDDO; [mySerialIDDO

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread mmalc Crawford
On Aug 30, 2010, at 6:37 PM, Dave Geering wrote: // 1) self.serialIDs = [[IRMSerialDetailsDO alloc] init]; The alloc method allocates an instance with a retain count of 1, and assigning it to the serialIDs property bumps it up to 2. In your dealloc method, you will [hopefully] send it a

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread Dave Geering
// 1) self.serialIDs = [[IRMSerialDetailsDO alloc] init]; The alloc method allocates an instance with a retain count of 1, and assigning it to the serialIDs property bumps it up to 2. In your dealloc method, you will [hopefully] send it a release message which puts it back at 1, but this