Opening a window in Core Data application
Opening a window in Core Data application
- Subject: Opening a window in Core Data application
- From: Wayne Pascoe <email@hidden>
- Date: Thu, 30 Mar 2006 20:46:17 +0100
Hi all,
I am trying to write a core data application that will use two
windows. I am trying to provide alternative methods to open the
windows (other than just a button).
The first window is a list of archives showing the name, the
description and the creation date of an archive - http://
www.penguinpowered.org/content/MainWindow.png
The second window is where the user will enter data about the archive
- http://www.penguinpowered.org/content/EditWindow.png
At the moment, the only way I can open the edit window is to add a
record in the main window (+ button in bottom right), select it in
the main window, and click the edit button. The edit button's target
is the edit window's makeKeyAndOrderFront method.
What I'd like to be able to do is the following:
1. Open the window automatically when the user adds a new record. I
am using an ArrayController named ArchiveMO to manage the data, and I
have overridden the awakeFromInsert method to automatically set the
date to the current date. I have also added an outlet to the main
class (Alexandria_AppDelegate) named archiveEditWindow.
The awakeFromInsert method seems like the ideal place to add this
code, but I can't work out how to access the outlet defined in
Archive_AppDelegate.h from ArchiveMO.m. Can anyone give me some
pointers on this ?
2. I'd also like to be able to open the edit window when the user
double-click's on an archive. I don't even know where to start with
this.
If anyone can advise me how to go about this, or just point me at
some documentation that covers this and tell me to RTFM, I'd be
greatful :)
In case they are of use in diagnosing this problem, I have posted
Alexandria_AppDelegate.h at http://www.penguinpowered.org/content/
Alexandria_AppDelegate.h and ArchiveMO.m at http://
www.penguinpowered.org/content/ArchiveMO.m
Thanks in advance,
--
Wayne Pascoe (gpg --keyserver www.co.uk.pgp.net --recv-keys 79A7C870)
I refuse to tiptoe quietly through life only to arrive safely at death!
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden