Re: Dismiss Window Issue- despo for a solution
Re: Dismiss Window Issue- despo for a solution
- Subject: Re: Dismiss Window Issue- despo for a solution
- From: j o a r <email@hidden>
- Date: Thu, 29 May 2003 14:45:43 +0200
On Thursday, May 29, 2003, at 14:25 Europe/Stockholm, Poornima
Ranganath wrote:
1] I have a login window with user name and password fields &
Ok,Cancel buttons.
if a user enters wrong password, and clicks OK,window should NOT get
dismissed.
if the user has entered the correct password then only the window
should be dismissed.
so as to say, the window should not dismiss until the user enters a
correct password.
how do i keep the window displayed until the user enters the correct
password.?
NOTE:-Ok button has return key as the equivalent.
That should be simply - just don't close the window if the password
doesn't match...
Your OK-button is probably connected to an action method, something
like this:
- (IBAction) okButtonAction.(id) sender
{
if ([[myPasswordInputSecureTextField stringValue] isEqualToString:
mySecretPassword])
{
[myWindow close];
[self launchApplication];
}
else
{
[self shakeWindowViolently];
}
}
2] If the password entered is wrong, then the window should SHAKE like
the Mac login window.
There must be some way to do it.Is it possible to do so in ObjectiveC
- COCOA?
I am desperate for a solution. kindly point me to any
links,articles,sample code etc.
There is no such functionality in the public Cocoa API - at least that
I know of. You would probably have to emulate it yourself, using the
methods in NSWindow and a NSTimer. Just set a timer to call a method
that moves the window left and right.
j o a r
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.