• 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: making the window shake
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making the window shake


  • Subject: Re: making the window shake
  • From: Wade Tregaskis <email@hidden>
  • Date: Fri, 19 Nov 2004 11:59:14 +1100

Does anyone know how that's done when you enter your password incorrectly? I'd like to do that too.

They just use a timer to move the window back and forth. See the docs for the NSTimer class and NSWindow's -setFrameOrigin: method.

And if the NSWindow methods don't give you good performance, or you want to try alternate behaviour (such as the window "pulsing" or "rattling" like a cartoon alarm clock), check out <http://homepage.cs.latrobe.edu.au/wjtregaskis/Rotated Windows.sitx>. Standard disclaimer, before the Apple guys have a chance: you will develop a embarrassing rash and have extremely bad luck for 7 years, and *probably* stub your toe *really really badly* within the next week, if you use this code. ;)


(i.e. it's a hack, unsupported, yadda yadda... fwiw, I can't foresee it breaking in the near future, but grain of salt sold separately)

Wade Tregaskis (AIM, Yahoo & Skype: wadetregaskis, ICQ: 40056898, MSN & email: email@hidden, Jabber: email@hidden)
-- Sed quis custodiet ipsos custodes?


_______________________________________________
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


References: 
 >making the window shake (From: John Spicer <email@hidden>)
 >Re: making the window shake (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Problem with some clicks not registering in 10.3.6?
  • Next by Date: Re: CFPreferences calls in Cocoa apps
  • Previous by thread: Re: making the window shake
  • Next by thread: Cocoa and Java 1.4
  • Index(es):
    • Date
    • Thread