You need to sign in to do that
Don't have an account?
Max Power
How do I enable inheritance?
I'm writing an Apex application and I would like to use inheritance. I read in the language reference that this is not enabled for all instances, and indeed when I tried to declare a virtual class in my instance, I got an error message from eclipse that said that virtual classes are not allowed in my instance. My question is: How do I enable this feature?
As a follow up, if I use inheritance and then publish my application to the AppExchange, will anyone that uses this application need to enable inheritance on their instance as well, or is this required only on the development instance?
Thanks in advance,
Max
Did you ever find out an answer to this question? I'd like to know the same as I need to use abstract functions (a pretty basic OO concept) on an app that I want to publish on AppExchange.
Thanks!
Max Power wrote:
That is very good to know, but I need the ability to override inherited methods and apparently the only way to do that is by making the overidden function virtual (since Apex doesn't assume virtual like Java.) It's unfortunate because when I put my app on AppExchange I don't want to have clients that install it have to jump through the same hoops. Looks like I'll have to resort to bad OO and make hooks in my Class that will be used instead of proper inheritance.
Please vote for my virtual petition to have these turned on by default (link in my signature). :-) Thanks!
http://ideas.salesforce.com/article/show/10089344/Have_Object_Oriented_programming_support_turned_on_by_default