• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dismiss Window Issue- despo for a solution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Dismiss Window Issue- despo for a solution (From: Poornima Ranganath <email@hidden>)

  • Prev by Date: Switch efficiency for large case-sets
  • Next by Date: Re: Switch efficiency for large case-sets
  • Previous by thread: Re: Dismiss Window Issue- despo for a solution
  • Next by thread: Dismiss Window Issue- despo for a solution
  • Index(es):
    • Date
    • Thread