Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for inheritance? #3

Closed
pcompassion opened this issue Jan 16, 2013 · 5 comments
Closed

support for inheritance? #3

pcompassion opened this issue Jan 16, 2013 · 5 comments

Comments

@pcompassion
Copy link

Any plan to support for inheritance?

ProductCommon : jastor
{
commonAttributes;
}

Product1 : ProductCommon
{
product1_specific;
}

Product2 : ProductCommon
{
product2_specific;
}

@elado
Copy link
Owner

elado commented Jan 16, 2013

Not currently, though pull requests are welcome.

@pcompassion
Copy link
Author

I implemented this and was about to do pull requests. but found it's already there in current version.

relavant bits of codes are ..

JastorRuntimeHelper.m
NSArray* arr = [JastorRuntimeHelper propertyNames:class_getSuperclass(klass)];
[propertyNamesArray addObjectsFromArray:arr];

//this will support traversing the inheritance chain
return [self propertyClassForPropertyName:propertyName ofClass:class_getSuperclass(klass)];

@elado
Copy link
Owner

elado commented Jan 18, 2013

Oh cool. Thanks @yosit for that :)

@elado elado closed this as completed Jan 18, 2013
@yosit
Copy link
Contributor

yosit commented Jan 18, 2013

;) you are welcome.

@lwheng
Copy link

lwheng commented Feb 6, 2014

Hi @yosit , do you have a working example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants