• 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
NSOperation subclass with abstract class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOperation subclass with abstract class?


  • Subject: NSOperation subclass with abstract class?
  • From: Trygve Inda <email@hidden>
  • Date: Mon, 07 Apr 2014 07:17:13 -0700
  • Thread-topic: NSOperation subclass with abstract class?

Hi have three different NSOperation subclasses:

MyOperationA : NSOperation
MyOperationB : NSOperation
MyOperationC : NSOperation

Each of my subclasses have a set of 4 required properties:

NSString* data1
NSString* data2
NSString* data3
NSString* data4

Beyond that, my three subclasses are different. I was thinking about making
a base class:

MyBaseClass : NSOperation

That only had synthesized properties and no methods. The methods (and
additional class-specific properties) would be provided by the subclass:

MyOperationA : MyBaseClass  etc.

This way, when accessing the 4 data properties, I can just use a type
specification of MyBaseClass rather than having to know which specific type
of operation I am working with.

Thoughts?

Thanks,

Trygve



_______________________________________________

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


  • Prev by Date: Re: Bindings for dynamically populated menu
  • Next by Date: Re: Accessing self in a C static function within an implementation definition
  • Previous by thread: Re: Bindings for dynamically populated menu
  • Next by thread: Custom UITableViewCell parent is NIL
  • Index(es):
    • Date
    • Thread