Cocoaheads Lake Forest meets Wed, 1/12 at Ozate in Laguna Hills. Note different location!

2011-01-11 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. In January and February, we will be meeting at Ozate, 22921 Triton Way, Suite 124, Laguna Hills, CA 92653, before returning to our usual location. Come on by and check out Joe's new digs. Please join us from 7pm to 9pm

Core Data and Undo. Was: NSUndoManager retain/release

2011-01-11 Thread Jerry Krinock
On 2011 Jan 11, at 17:54, Dave Fernandes wrote: > And I'd love to know a trick to bring the correct tab to the front when > undoing/redoing changes in a tabbed interface. Well, the way I've seen it done in Apple Sample Code is to avoid a tabbed interface, do editing of objects in sheets, and t

Re: Right way to change default app launch behavior?

2011-01-11 Thread Rick Mann
On Jan 11, 2011, at 19:39:45, Sherm Pendley wrote: > On Tue, Jan 11, 2011 at 10:21 PM, Rick Mann wrote: >> I have a document-based app. I want to modify the behavior when it launches: >> instead of opening a new, untitled document, I want it to first check some >> stuff, then generally re-open

Re: Right way to change default app launch behavior?

2011-01-11 Thread Sherm Pendley
On Tue, Jan 11, 2011 at 10:21 PM, Rick Mann wrote: > I have a document-based app. I want to modify the behavior when it launches: > instead of opening a new, untitled document, I want it to first check some > stuff, then generally re-open the last-opened document. > > After reading through the v

[SOLVED] Responding to changes in outline view

2011-01-11 Thread Rick Mann
I needed to observe selectionIndexPaths, not selectionIndexes. I only discovered this by adding the NSKeyValueObservingOptionInitial (would've been nice if the act of observing would check to see if the key exists). -- Rick On Jan 11, 2011, at 17:33:29, Rick Mann wrote: > Sorry, forgot to add

Right way to change default app launch behavior?

2011-01-11 Thread Rick Mann
I have a document-based app. I want to modify the behavior when it launches: instead of opening a new, untitled document, I want it to first check some stuff, then generally re-open the last-opened document. After reading through the various cocoa app architecture docs, I'm not actually sure wh

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread Dave Fernandes
And I'd love to know a trick to bring the correct tab to the front when undoing/redoing changes in a tabbed interface. On 2011-01-11, at 2:00 PM, Jerry Krinock wrote: > > On 2011 Jan 11, at 08:35, Sean McBride wrote: > >> For one, there doesn't seem to be a nice way to get the Undo menu item t

Resent: Responding to changes in outline view

2011-01-11 Thread Rick Mann
Sorry, forgot to add something (that my tree controller binds to Core Data). - I found two examples so far (one using notifications, one KVO) for responding to changes in a table view's selection. I tried the KVO approach in the sample code NSTabelViewBinding. It sets up KVO on the array c

Responding to changes in outline view

2011-01-11 Thread Rick Mann
i found two examples so far (one using notifications, one KVO) for responding to changes in a table view's selection. I tried the KVO approach in the sample code NSTabelViewBinding. It sets up KVO on the array controller: [myContentArray addObserver: self

Re: Odd Crash when adding table columns manually

2011-01-11 Thread Eric Gorr
I do release them after adding them to the table. It will still crash... Sent from my iPad On Jan 11, 2011, at 7:29 PM, Peter Lübke wrote: > Table columns are retained by the table view they are added to. > > So you can safely release or autorelease the table column right after > invoking -ad

Re: Odd Crash when adding table columns manually

2011-01-11 Thread Peter Lübke
Table columns are retained by the table view they are added to. So you can safely release or autorelease the table column right after invoking -addTableColumn: . The table view owns its columns and will release them when it itself is released. This is the normal behaviour when adding subvie

Re: Base SDK 10.6 deployment target 10.5 - symbol not found

2011-01-11 Thread Kenneth Baxter
Thanks for that link Kyle, from that reference it appears that it is not possible to weak link classes in MacOS X, so the only way to use my subclasses of CAShapeLayer would be to move them all to a separate bundle and only load that bundle when running on 10.6.  Something I wondered about was

Re: keyDown event processing -- harder than it looks?

2011-01-11 Thread Corbin Dunn
On Jan 11, 2011, at 1:31 PM, Michael Crawford wrote: > Documentation says NSWindowController inherits from NSResponder. > > Besides, I was getting the events. I just don't understand what this message > is and why it is being tossed out every 7 keyDown messages. > > http://developer.apple.com

Re: keyDown event processing -- harder than it looks?

2011-01-11 Thread Seth Willits
On Jan 11, 2011, at 1:31 PM, Michael Crawford wrote: > Documentation says NSWindowController inherits from NSResponder. Yes, but I was currently under the impression it didn't apply to events, just actions. I stand corrected. Hmm. At any rate, I don't get any errors when I tested it and I'm not

Re: keyDown event processing -- harder than it looks?

2011-01-11 Thread Michael Crawford
Documentation says NSWindowController inherits from NSResponder. Besides, I was getting the events. I just don't understand what this message is and why it is being tossed out every 7 keyDown messages. http://developer.apple.com/library/mac/#documentation/cocoa/Reference/ApplicationKit/Classes/

Re: keyDown event processing -- harder than it looks?

2011-01-11 Thread Seth Willits
On Jan 11, 2011, at 11:17 AM, Michael Crawford wrote: > I'm trying to process a simple keyDown event by overriding -keyDown on the > NSWindowController derived class for my main window. The NSWindowController doesn't receive events, only views do. -- Seth Willits ___

keyDown event processing -- harder than it looks?

2011-01-11 Thread Michael Crawford
I'm trying to process a simple keyDown event by overriding -keyDown on the NSWindowController derived class for my main window. I've overridden the appropriate methods but I'm getting strange console message: Type selection took over 1.000 seconds. Stopping early These are my overrides. -

Re: Base SDK 10.6 deployment target 10.5 - symbol not found

2011-01-11 Thread Kyle Sluder
On Tue, Jan 11, 2011 at 10:40 AM, Wim Lewis wrote: > You might be able to weakly link the class, in which case dyld will not > complain but messages to CAShapeLayer will return nil. I don't remember on > which OS revs it became possible to weak link a class, though. (Weak linking > C symbols ha

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread Jerry Krinock
On 2011 Jan 11, at 08:35, Sean McBride wrote: > For one, there doesn't seem to be a nice way to get the Undo menu item to > say descriptive things like "Undo Typing", "Redo Size Change", etc. > When doing things 'the hard way' that part's actually easier. Oh, yes. In my original draft of that p

Re: Base SDK 10.6 deployment target 10.5 - symbol not found

2011-01-11 Thread Wim Lewis
On 10 Jan 2011, at 11:42 PM, Kenneth Baxter wrote: > Hi, I have a project I'm working on which needs to run on 10.5 and 10.6. I > have various things enabled or disabled using: > > if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) ... > > but I also have some places in my code where

Re: dylib clarification

2011-01-11 Thread Douglas Davidson
On Jan 11, 2011, at 9:26 AM, Brad Garton wrote: > Searching through the archives (always kind of fultie, I think...) I can't > see an obvious answer. I'm updating some older code, and XCode doesn't like > my happy NSLinkModule loading scheme any more. Which is now preference, > dlopen or CFB

dylib clarification

2011-01-11 Thread Brad Garton
Hey everyone -- Searching through the archives (always kind of fultie, I think...) I can't see an obvious answer. I'm updating some older code, and XCode doesn't like my happy NSLinkModule loading scheme any more. Which is now preference, dlopen or CFBundleLoadExecutable for handling DLLs? T

Odd Crash when adding table columns manually

2011-01-11 Thread Eric Gorr
I've got a sample test project at: http://ericgorr.net/cocoadev/TableColumnTest.zip which reproduces the strange crash. I have a NSTableView to which I need to add NSTableColumns manually using the addTableColumn: method. The problem is that for some reason when I release the window and everyt

Mapping model

2011-01-11 Thread Amy Heavey
I've got a data model that I want to add an attribute to (as in adding an attribute to an entity). The attribute is optional and can begin with a nil value. I've created a mapping model and it opens the old file, but I've got odd behaviour. The entity is called manufacturer and it has att

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread Sean McBride
On Mon, 10 Jan 2011 22:35:28 -0800, Jerry Krinock said: >Aside: Reading this thread really makes one appreciate Core Data. > >I've written a Core Data app which can Undo Sort. The sortable objects >are the 'many' members of to-many relationships. Each one has an >'index' parameter, which is re-s

Composing an NSImage to print

2011-01-11 Thread Olivier Palliere
 Hi Guys, I'm working on an app for my personal use that needs to print images I drag on an NSImageView to display a thumbnail. Source images are about 500x500 at 300dpi for most. When I want to print them, I use this snippet of code from Apple's doc:   frontRect = NSMakeRect(0

[MEET] Toronto Cocoaheads / tacow - January 18

2011-01-11 Thread Karl Moskowski
The next tacow meeting will be on Tuesday, January 18 at 6:30 PM, at Metro Hall in room 310. Additional details can be found at . All are welcome, and we look forward to seeing you there. Karl Moskowski Voodoo Ergonomics Inc. smime.p

Socket error and socket end

2011-01-11 Thread Remco Poelstra
Hi, When a socket can't be created in the iOS simulator because of a refused connection, I get an end-of-socket event. On the real iPhone I get a general socket error event. Is there a reason for this difference? Can I make sure that I also receive the end-of-socket event on a real device? Kin

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread Jerry Krinock
On 2011 Jan 11, at 03:27, steven Hooley wrote: > either : > > a) sort order is a property of the window, not your model and > shouldn't be undoable at all… > > OR b) > > the sort order is inherently part of your model True, and I agree with Graham that it depends on the app. The app I descri

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread Graham Cox
On 11/01/2011, at 10:27 PM, steven Hooley wrote: > I don't mean to hijack this thread, but my first thought, for what > it's worth is that either :- > > a) sort order is a property of the window, not your model and > shouldn't be undoable at all. I agree. In fact I don't typically make sorting

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread steven Hooley
I don't mean to hijack this thread, but my first thought, for what it's worth is that either :- a) sort order is a property of the window, not your model and shouldn't be undoable at all. What happens if you want another view - say a grid view, with nice big icons - of the same data?. Should that

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-11 Thread Graham Cox
On 11/01/2011, at 5:35 PM, Jerry Krinock wrote: > But that assumes that the data was sorted with some old descriptors to begin > with. It seems like this would not work if the objects had been manually > arranged into some arbitrary order by the user. True, but then you'd make the reordering

[ANNOUNCE] Behavior-Driven Development libraries

2011-01-11 Thread Eloy Durán
Hi, Last week I have released two BDD [1] libraries based on Bacon [2] (a RSpec clone) optimized for NSRunloop environments. They should both still be considered ‘beta’, but I want to get the word out so adventurous people can start scrutinizing, err improving ;-) * NuBacon [3]: A port of Baco