Re: document based app, custom ibaction

2008-08-19 Thread Jonathan Hess
Hey Bart - Understanding the "File's Owner" is really an essential part of understanding how to use Interface Builder effectively. At the most basic level, all NIBs are loaded at runtime with a call to -[NSBundle loadNibNamed:owner:]. The method takes two arguments, a NIB name which is th

Re: document based app, custom ibaction

2008-08-19 Thread Bart Beulen
Sorry, didn't know I had to connect the outlets of the mydocument class through file owner This basically solved my problems. Op 19 aug 2008, om 14:03 heeft Graham Cox het volgende geschreven: On 19 Aug 2008, at 7:03 pm, Bart wrote: Another similar problem. I would like to add a sheet

Re: document based app, custom ibaction

2008-08-19 Thread Graham Cox
On 19 Aug 2008, at 7:03 pm, Bart wrote: Another similar problem. I would like to add a sheet to the button I've created. Normally I would create an IBOutlet and connect the window for the sheet to it, combined with a code to open: [NSApp beginSheet:totalsSheet modalForWindow

Re: document based app, custom ibaction

2008-08-19 Thread Bart
Another similar problem. I would like to add a sheet to the button I've created. Normally I would create an IBOutlet and connect the window for the sheet to it, combined with a code to open: [NSApp beginSheet:totalsSheet modalForWindow:[NSApp mainWindow] modalDe

Re: document based app, custom ibaction

2008-08-19 Thread Bart Beulen
Thanks, Again sloppy programming didn't know this could cause problems although the compiler was not worried. I guess I will not make such an error anymore in the future. :o) Op 19 aug 2008, om 09:31 heeft Graham Cox het volgende geschreven: On 19 Aug 2008, at 5:08 pm, Bart wrote:

Re: document based app, custom ibaction

2008-08-19 Thread Graham Cox
On 19 Aug 2008, at 5:08 pm, Bart wrote: I've created a new xcode project, document based cocoa app. Added this code to the mydocument class: m: -(IBAction)getTotals { NSLog(@"Hello"); } h: -(IBAction)getTotals; I've created a button in the MyDocument.xib, connected through the firs

Re: document based app, custom ibaction

2008-08-19 Thread Bart
I've created a new xcode project, document based cocoa app. Added this code to the mydocument class: m: -(IBAction)getTotals { NSLog(@"Hello"); } h: -(IBAction)getTotals; I've created a button in the MyDocument.xib, connected through the firstresponder to the getTotals method. Everyth

Re: document based app, custom ibaction

2008-08-18 Thread Bart Beulen
I've connected a simple button to the First Responder. I was able to select the action that I've created in my MyDocument class. When I run the program and press the button nothing happens. The function was only containing an NSLog statement to check if it worked. Am I missing anything?

Re: document based app, custom ibaction

2008-08-18 Thread Sherm Pendley
On Mon, Aug 18, 2008 at 9:52 AM, Bart Beulen <[EMAIL PROTECTED]> wrote: > > However I would like to add a button in my document which is connected to > some code, to process the data in the array (etc count up data in columns). > I was trying to do this by adding an IBAction function to the MyDocum

document based app, custom ibaction

2008-08-18 Thread Bart Beulen
Hi, I'm quite new to cocoa developing, but things start to work out finally. At the moment I'm working at a document based app (first time). It is based on an arraycontroller in combination with a tableview I am able to use buttons to add and delete entries. However I would like to ad