• 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
[SOLVED] Re: AppleRemote Cocoa Class ( delegate issue )
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: AppleRemote Cocoa Class ( delegate issue )


  • Subject: [SOLVED] Re: AppleRemote Cocoa Class ( delegate issue )
  • From: David Farmer <email@hidden>
  • Date: Tue, 26 Jun 2007 21:30:41 -0500

It worked perfectly.

My knowledge has been expanded!

Thank you!
dave

On Jun 26, 2007, at 8:50 PM, Dorian Johnson wrote:

A singleton is a design pattern where only one instance of the class ever exists. This means you simply use [AppleRemote sharedRemote] anywhere you want to use the object.

The appleRemote method you have in your delegate isn't necessary (it's not one of the AppleRemote delegate methods). The example project only has it for use with bindings (to tie the button to the AppleRemote singleton object). What you need to do is remove that method, then use (if you're encapsulating it differently that's fine but this is what it needs to end up as)

	c_Delegate = [[Delegate alloc] init];
	[[AppleRemote sharedRemote] setDelegate:c_Delegate];
	[[AppleRemote sharedRemote] startListening:nil];

Dorian

On Jun 26, 2007, at 8:41 PM, David Farmer wrote:

thanks for the reply!


not sure I understand singleton? if I do not allocate it to create an instance what should I do? if I try to create a static declaration it barks at me. ( sorry, might be a bit thick as well )


In Delegate.h I implemented both -(AppleRemote*)appleRemote; and - (void)appleRemoteButton:(AppleRemoteEventIdentifier) buttonIdentifier pressedDown:(BOOL)pressedDown; It is a newly created class based on NSObject. Those are the only methods. From your explanation I believe that this may all be related to incorrectly using the AppleRemote class ( the singleton use that still eludes me ).


_______________________________________________

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


References: 
 >AppleRemote Cocoa Class ( delegate issue ) (From: David Farmer <email@hidden>)
 >Re: AppleRemote Cocoa Class ( delegate issue ) (From: Dorian Johnson <email@hidden>)
 >Re: AppleRemote Cocoa Class ( delegate issue ) (From: David Farmer <email@hidden>)
 >Re: AppleRemote Cocoa Class ( delegate issue ) (From: Dorian Johnson <email@hidden>)

  • Prev by Date: Re: AppleRemote Cocoa Class ( delegate issue )
  • Next by Date: Re: Another Core Data Ivar Setter and Undo Issue
  • Previous by thread: Re: AppleRemote Cocoa Class ( delegate issue )
  • Next by thread: Baffling error migrating Core Data store
  • Index(es):
    • Date
    • Thread