Skip to content

Commit

Permalink
Replaced globalInjector usage with defaultInjector. Fixes issue #19.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewind committed Jun 12, 2012
1 parent 31a4272 commit 054dca1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -56,16 +56,16 @@ An object can be fetched from objection by creating an injector and then asking
}
```

A global injector can be registered with Objection which can be used throughout your application or library.
A default injector can be registered with Objection which can be used throughout your application or library.

```objective-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
JSObjectionInjector *injector = [JSObjection createInjector];
[JSObjection setGlobalInjector:injector];
[JSObjection setDefaultInjector:injector];
}

- (void)viewDidLoad {
id myModel = [[JSObjection globalInjector] getObject:[MyModel class]];
id myModel = [[JSObjection defaultInjector] getObject:[MyModel class]];
}
```
### Awaking from Objection
Expand Down Expand Up @@ -141,7 +141,7 @@ Objection supports associating an object outside the context of Objection by con
@end
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
JSObjectionInjector *injector = [JSObjection createInjector:[[[MyAppModule alloc] init] autorelease]];
[JSObjection setGlobalInjector:injector];
[JSObjection setDefaultInjector:injector];
}
```
#### Meta Class Bindings
Expand Down

0 comments on commit 054dca1

Please sign in to comment.