• 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: saveDocument: Troubles.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saveDocument: Troubles.


  • Subject: Re: saveDocument: Troubles.
  • From: publiclook <email@hidden>
  • Date: Sat, 17 May 2003 14:48:59 -0400

It is essential to the correct operation of selectors that [theItem action] == @selector(saveDocument:) works. Same with if([theItem action] == [someOtherItem action]). Selectors are always comparable. That is how message dispatch works.


On Saturday, May 17, 2003, at 12:55 PM, Tom Sutcliffe wrote:

Are you allowed to compare selectors like that? I don't know how selectors are stored internally, but I'd put in an NSLog method to make sure. I'd feel safer with

if ([@"saveDocument" isEqualToString: NSStringFromSelector([theItem action])]) {
...
}

regards,

Tom

On Saturday, May 17, 2003, at 01:56 pm, Oliver Cameron wrote:

Hey guys,

I have a toolbar item, a save document one. Here is my code that
validates and enables the toolbar item:

if ( [theItem action] == @selector(saveDocument:) )
return [self isDocumentEdited];

Upon the app start up, the save item is disabled. Which is what I want,
but when I edit the text box. It still does not come out of being
disabled. But when I just return as YES;, the default save box comes up
like I would want.

Any help?

Thanks!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: saveDocument: Troubles. (From: Tom Sutcliffe <email@hidden>)

  • Prev by Date: Re: OT: WWDC
  • Next by Date: Re: full-screen window?
  • Previous by thread: Re: saveDocument: Troubles.
  • Next by thread: loadDataRepresentation and file extention
  • Index(es):
    • Date
    • Thread