• 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: Problems with ScriptingBridge and iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with ScriptingBridge and iTunes


  • Subject: Re: Problems with ScriptingBridge and iTunes
  • From: "Steven Degutis" <email@hidden>
  • Date: Mon, 3 Mar 2008 09:27:43 -0600

Thank you for the update on that sample code. I was hoping it would
continue to be ignored because I was publicly berated in the #macdev
channel for posting it, but oh well. Thanks to Wolf's post up there,
I'm not going to continue to learn SB any longer, and I just hope
Apple fixes it up.

On Mon, Mar 3, 2008 at 12:32 AM, Jens Alfke <email@hidden> wrote:
>
>  On 2 Mar '08, at 4:54 AM, Steven Degutis wrote:
>
>  > I think it's clear why [currentTrack
>  > isKindOfClass:[iTunesFileTrack class]] evaluates to true: in the
>  > previous line, you defined it as such, like this:
>  > iTunesTrack *currentTrack = [iTunes currentTrack];
>  > So obviously it is an iTunesTrack!
>
>  No. It could be an instance of a subclass of iTunesTrack, such as (in
>  this case) iTunesFileTrack. (That's true of any object-oriented
>  language.)
>
>
>  > Try this:
>  > iTunesFileTrack *currentTrack = [iTunesFileTrack currentTrack];
>
>  That won't even compile. You can't assign an iTunesTrack* to an
>  iTunesFileTrack*.
>
>  Moreover, since Obj-C is a dynamic language, it's more important what
>  the class of the object is at runtime, than what type the pointers are
>  defined as at compile time. You can change the type declarations, but
>  it won't affect what actual objects you get back at runtime.
>
>  —Jens
_______________________________________________

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

  • Follow-Ups:
    • Re: Problems with ScriptingBridge and iTunes
      • From: has <email@hidden>
References: 
 >Re: Problems with ScriptingBridge and iTunes (From: has <email@hidden>)
 >Re: Problems with ScriptingBridge and iTunes (From: "Steven Degutis" <email@hidden>)
 >Re: Problems with ScriptingBridge and iTunes (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Problems with ScriptingBridge and iTunes
  • Next by Date: Using NSPredicate to parse strings
  • Previous by thread: Re: Problems with ScriptingBridge and iTunes
  • Next by thread: Re: Problems with ScriptingBridge and iTunes
  • Index(es):
    • Date
    • Thread