• 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: delegate issue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delegate issue?


  • Subject: Re: delegate issue?
  • From: "Marc Wan" <email@hidden>
  • Date: Wed, 7 Feb 2007 16:47:17 -0800

 in your Info.plist, you need to indicate that your application can
open .txt files.  otherwise, when the user tries to drop a .txt file
on the dock icon, the operating system will think you don't support
that type of file and not even bother sending you the openFile Apple
Event.



On 2/8/07, CoreX2 <email@hidden> wrote:
Hello everyone:
I want to implement my application to open a text file when the text
file icon drops on its icon in dock. Many books say we should do like
this:
[1]. declare the -(BOOL) application :(NSApplication * ) theApp
openFile:(NSString * ) filename method in the controller interface
header file( controller.h)
[2]. implement the method above in the controller.m file.

however after I did that exactly described above , when the
application launched , I drop a .txt file to the application icon in
the dock, nothing happened,specially the dock icon doesn't responder
to the file .

And I have correctly set the application's delegation to the
controller in the interface builder, I have made sure I have
correctly connected the File's owner to the controller instance .

Can someone tell me what goes wrong? Thanks in advance.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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)

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: delegate issue?
      • From: Uli Kusterer <email@hidden>
References: 
 >delegate issue? (From: CoreX2 <email@hidden>)

  • Prev by Date: delegate issue?
  • Next by Date: what is the relationship between the info.plist and the infoplist.strings
  • Previous by thread: delegate issue?
  • Next by thread: Re: delegate issue?
  • Index(es):
    • Date
    • Thread