Re: Revolving scoreboard
Re: Revolving scoreboard
- Subject: Re: Revolving scoreboard
- From: Nick Paulson <email@hidden>
- Date: Mon, 4 Jan 2010 06:26:01 -0500
Take a look at the first post in the following link:
http://www.cocoadev.com/index.pl?CoreAnimation
Basically, you just have the view's animator as a receiver rather than the view itself. This will automatically do the default animations for you.
--Nick Paulson
On Jan 4, 2010, at 1:55 AM, email@hidden wrote:
> Thanks Guys, that will work really well and its a nice neat solution. Can you elaborate on the animation proxy a little bit or rather point me in the right direction.
> Cheers
> Rob
>
>
> On 4/01/2010, at 2:29 PM, PCWiz wrote:
>
>> Good point, the view subclass would be easy and clean.
>>
>> Independent Cocoa Developer, Macatomy Software
>> http://macatomy.com
>>
>>
>> On 2010-01-03, at 6:10 PM, Scott Anguish wrote:
>>
>>> I don’t think using NSScrollView is at all necessary in this case. That’s much more of a situation for user interaction.
>>>
>>> This sounds more like the case for creating a view subclass that contains a view that displays the current score. When the score increases, insert another view visually above the other ( so it’d be like
>>>
>>> Main View
>>> ————
>>> New View
>>>
>>> then using an animation proxy to move the main view up and the new view up as well.
>>>
>>>
>>>
>>> On Jan 3, 2010, at 6:27 PM, PCWiz wrote:
>>>
>>>> This isn't something thats extremely difficult to do. You will need to create NSView subclasses for the scores at the top. You can use NSAttributedString/NSMutableAttributedString to create styled text, and use their drawInRect method to draw the text into the view. It would be a good idea to read this:
>>>>
>>>> https://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Introduction/Introduction.html
>>>>
>>>> And more specifically, this: https://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Text/Text.html#//apple_ref/doc/uid/TP40003290-CH209-BCIEEIGC
>>>>
>>>> For the scrolling scores below, you will have to put the scores into an NSTableView, or an NSCollectionView (the latter is better if you want to customize the display) inside an NSScrollView. As for the automatic scrolling, NSScrollView has nothing built in to facilitate this. Most likely you are going to have to use an NSTimer that fires every few milliseconds, and uses NSScrollView's scrollToPoint: method to scroll gradually until you hit the bottom.
>>>>
>>>> Independent Cocoa Developer, Macatomy Software
>>>> http://macatomy.com
>>>>
>>>>
>>>> On 2010-01-03, at 4:07 PM, email@hidden wrote:
>>>>
>>>>> I have been asked to design a revolving scoreboard for a large Sporting Clays event. The plan is to have a MacBook connected to a large flat screen TV in the main tent. I will pull the scores from a CSV file (which is updated regularly) and sort them into arrays for display. Creating the on screen graphics is something I have not done much of with Cocoa. The organizers have asked for a full screen display and would like have the top 5 scores at the top of the screen and then scroll the rest of the field below these scores.
>>>>> I could punch this out with HTML and a bit of Javascript, but I thought it might be good to do have a play with Quartz.
>>>>> Can you please tell me how you good people might approach this?
>>>>> _______________________________________________
>>>>>
>>>>> 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
>>>
>>
>> _______________________________________________
>>
>> 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
_______________________________________________
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