• 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
NSTextField won't fade
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextField won't fade


  • Subject: NSTextField won't fade
  • From: "Jake Smith" <email@hidden>
  • Date: Wed, 3 Sep 2008 07:24:19 -0400

I'm trying to have an NSTextField fade in and then out over several seconds.
I've tried sequential animations, linked animations, and finally the method
reproduced below. All produce the same result: the text in the NSTextField
appears immediately, remains visible for the duration of the animation, then
disappears without being animated or fading. In the code below, msgLabel is
an outlet to the NSTextField and myNumber is a string. Can someone point me
in the right direction? I've been reading Apple documentation and mailing
lists for at least 6 hours. Thanks. By the way, if someone thinks they can
help me, but loathes Python for some reason, let me know and I can translate
this into Objective-C.

self.msgLabel.setStringValue_(NSString.stringWithString_(myNumber))

animDict1 = {NSViewAnimationTargetKey: self.msgLabel,
NSViewAnimationEffectKey: NSViewAnimationFadeInEffect}

animDict2 = {NSViewAnimationTargetKey: self.msgLabel,
NSViewAnimationEffectKey: NSViewAnimationFadeOutEffect}

anim =
NSViewAnimation.alloc().initWithViewAnimations_(NSArray.arrayWithObjects_(animDict1,animDict2,nil))

anim.setDuration_(5.0)

anim.startAnimation()
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSTreeController for readapt estructure
  • Next by Date: Why do all these methods of measuring string metrics with font attribute fail?
  • Previous by thread: Re: How do I use Sort Descriptor binding in IB on my array controller?
  • Next by thread: Why do all these methods of measuring string metrics with font attribute fail?
  • Index(es):
    • Date
    • Thread