• 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: Future Objective-C changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future Objective-C changes


  • Subject: Re: Future Objective-C changes
  • From: Chris Meyer <email@hidden>
  • Date: Wed, 21 May 2003 09:32:33 -0700

Furthermore, if this sort of thing were to be needed with any frequency, I might very well wrap it up in a higher order message, so it looks like this:

[[self inProtectedGstate] drawMyObject];

This has the same advantage of encapsulating the save/restore mechanism, but without obscuring the code. In fact, it clearly indicates in the code what will happen.

Clever idea. I'll need to study this more. Too bad there can't be anonymous blocks in Objective-C...

[[self inProtectedGstate]
- (void)() // anonymous block selector
{
// do my drawing
}
]

A little ugly I guess... but something along those lines anyway.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Future Objective-C changes
      • From: Jim Rankin <email@hidden>
    • Re: Future Objective-C changes
      • From: Glenn Andreas <email@hidden>
References: 
 >Re: Future Objective-C changes (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: Future Objective-C changes
  • Next by Date: Re: File Package without NSDocument
  • Previous by thread: Re: Future Objective-C changes
  • Next by thread: Re: Future Objective-C changes
  • Index(es):
    • Date
    • Thread