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: Sherm Pendley <email@hidden>
- Date: Thu, 29 May 2003 09:54:17 -0400
On Thursday, May 29, 2003, at 08:25 AM, Poornima Ranganath wrote:
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.?
Windows don't disappear on their own. You have to tell them to disappear
by calling orderOut: or in the case of a modal window, endModalSession:.
If you don't want your login window to disappear - don't tell it to.
Just check the password that was entered, and only close the window if
it's correct.
2] If the password entered is wrong, then the window should SHAKE like
the Mac login window.
I have to say, that is one of the best examples of HI design I have
seen. It's a very human-like response - the first time I mistyped my
password, I could very nearly hear my Mac saying "no" to what I'd typed.
I haven't done anything similar, but I think you could do it with
NSWindow's setFrame:display:animate: method. I'm not certain if that
method returns immediately, or if it blocks until animation is complete.
If it blocks, it will be easier; you could just code a simple loop to
jiggle the window position a few times. If it returns immediately, it
will be a bit more complex; you'll need to use an NSTimer that's set to
call your "jiggler" method a few times.
sherm--
"Though a program be but three lines long, someday it will have to be
maintained."
-- The Tao of Programming
_______________________________________________
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.