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

Not working for me. #35

Open
Yura-Savchuk opened this issue Sep 16, 2016 · 0 comments
Open

Not working for me. #35

Yura-Savchuk opened this issue Sep 16, 2016 · 0 comments

Comments

@Yura-Savchuk
Copy link

Yura-Savchuk commented Sep 16, 2016

My source:
`
*.h file

import <Foundation/Foundation.h>

import "Presenter.h"

import "RubricMenuView.h"

import <BloodMagic/Lazy.h>

import "ProductCategoryIteractor.h"

@protocol RubricMenuView;

@interface RubricMenuPresenter : NSObject <Presenter, BMLazy>

@Property (nonatomic, strong, bm_lazy) ProductCategoryIteractor* productCategoryIteractor;

  • (instancetype) initWith: (id) view;

@EnD

*.m file

import "RubricMenuPresenter.h"

@interface RubricMenuPresenter()

@Property (weak) id view;

@EnD

@implementation RubricMenuPresenter

@dynamic productCategoryIteractor;

pragma mark - RubricMenuPresenter methods

  • (instancetype) initWith: (id) view {
    self = [super init];
    if (self) {
    self.view = view;
    }
    return self;
    }

pragma mark - Presenter methods

  • (void) viewDidLoad {
    ProductCategoryIteractor* sdf = self.productCategoryIteractor;
    [[[sdf execute]
    subscribeOn: [RACScheduler mainThreadScheduler]] subscribeNext:^(id x) {
    NSLog(@"Log result");
    } error:^(NSError *error) {
    NSLog(@"Log error");
    }];
    }
    `

When called line with source "ProductCategoryIteractor* sdf = self.productCategoryIteractor;"
application is crashing with error "*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RubricMenuPresenter productCategoryIteractor]: unrecognized selector sent to instance 0x7fdfd51985a0'"

What I am doing wrong?

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

1 participant