Skip navigation.
 
mlPassword dialog
FROM : Tobias Bayer
DATE : Sun Nov 21 15:12:41 2004

Hello,

I am quite new to Cocoa and I would like to do the following:

I have a document-based application. I want the user to enter a
password when he tries to unarchive a document from an archive file.
(Right at the beginning of - (BOOL)loadDataRepresentation:(NSData
*)data ofType:(NSString *)aType in MyDocument.m)
I would like a window to show up and ask for a password. When the user
presses "OK" in that dialog, I want to evaluate the password in my code
and continue loading the document if the password is right (the
password may be hardcoded and does not have to be stored in any file).
What is the best practice to do this? I've tried around a bit with
panels and sheets but I did not get what I wanted. Can someone give me
a tiny step-by-step guide for fulfilling this task?

Greets

--
Tobias Bayer

Related mailsAuthorDate
No related mails found.