Re: Ticker Style Scrolling Text
Re: Ticker Style Scrolling Text
- Subject: Re: Ticker Style Scrolling Text
- From: Erik Benoist <email@hidden>
- Date: Sat, 8 May 2010 22:43:40 -0600
Joachim-
I managed to make do with just a custom NSView, but I've got another quick question. I noticed that in your app you don't bring up the NSStatusItem menu but rather a custom menu and I may have to do the same if I can't find a solution for the following:
Currently I've taken my NSStatusItem and setView to my custom scrolling text NSView, which works just find until you try to click on the thing, which doesn't pop up the normal menu and unfortunately does nothing at all. How can I get the normal window to pop up when I am using setView on the NSStatusItem? Any ideas?
Thanks,
Erik
On May 5, 2010, at 5:17 AM, Joachim Deelen wrote:
> no, I'm using CATextLayer directly. It has a "string" attribute for NSString or NSAttributedString. And CA is available since 10.5.
>
> -
> Joachim
>
>
>
> Am 04.05.2010 um 02:11 schrieb Erik Benoist:
>
>> joachim-
>> quick question- do you convert your text to images when you use CoreAnimation? And is CA only available for 10.6+?
>>
>> -Erik
>>
>> On May 3, 2010, at 1:59 PM, Joachim Deelen wrote:
>>
>>> Hi Erik,
>>>
>>> I think one way to go would be CoreAnimation ... At least I'm using it in my iTunes Menubar Controller Playwatch.
>>>
>>> CATextLayer, CAScrollLayer and CABasicAnimation are the Classes that might be helpful. But CoreAnimation is rather complex.
>>>
>>> There might be ways to implement it with a "normal" NSView contained in a NSScrollView. And yes, you would have to implement at least one custom NSView.
>>>
>>> regards,
>>> Joachim
>>>
>>> http://www.aquarius-software.de/AQUARIUS-software_en/PlaywatchFeatures.html
>>>
>>>
>>> Am 03.05.2010 um 00:58 schrieb Erik Benoist:
>>>
>>>> I am writing a small NSStatusItem which displays a NSString in the menu bar and supplies a series of NSMenuItems. As the text to be displayed is occasionally longer than would be permitted on the Menu Bar I would like to animate the text in a Stock Ticker style scrolling animation. Much like you'd see in iTunes when a song is too long to be displayed or how the modem connect NSStatusItem will scroll the words "dialing... authentication...". I tried to simply write text to the menu bar using a Timer writing one character at a time, but the result isn't smooth and due to spacing in between letters can be variable in how much it moves each iteration.
>>>>
>>>> I suspect that a custom NSView is set to the NSStatusItem, but I am at a complete loss as to how to pull this off. Any examples of how to:
>>>> 1. Properly animate the text.
>>>> 2. Attach the resulting animation to the menu bar
>>>>
>>>> would be greatly appreciated. I have googled around extensively and have yet to find a solid example or clue.
>>>>
>>>> Thank you,
>>>> Erik Benoist_______________________________________________
>>>>
>>>> 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
>>>>
>>>
>>
>>
>
_______________________________________________
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