Skip to content

Not working for me. #35

@Yura-Savchuk

Description

@Yura-Savchuk

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions