• 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: problem with sheet contextInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with sheet contextInfo


  • Subject: Re: problem with sheet contextInfo
  • From: Jim Balhoff <email@hidden>
  • Date: Tue, 26 Feb 2002 15:46:18 -0500

On Tuesday, February 26, 2002, at 11:16 AM, Bill Cheeseman wrote:

on 02-02-26 8:55 AM, Jim Balhoff at email@hidden wrote:

The problem is, if I finished the editing of
cell 1 (which sends the action) by clicking into cell 2, it is cell 2
that is cleared. I would have expected cell 1, which I passed as the
contextInfo, to be cleared.

Looking quickly at your code, I suspect the problem occurs because you do no
checking when the user dismisses the sheet to make sure sender is the
control you think it is. Shouldn't your endMySheet: action method test
whether sender is the same object as the cell in the form that originally
invoked cellCompletedEdit:?

Well, the sender that calls the endMySheet: action method is a button on the sheet. I try to clear the formcell (by sending a message to contextInfo) in the - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSFormCell *)contextInfo method, where the contextInfo is provided by NSApp (I think) and should be the same as what I passed in when I started the sheet.

Thanks,
Jim
_______________________________________________
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: problem with sheet contextInfo (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: dd: IP address via Terminal
  • Next by Date: Re: Another filesystem mystery
  • Previous by thread: Re: problem with sheet contextInfo
  • Next by thread: Best practice for exceptions
  • Index(es):
    • Date
    • Thread