Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 25 16:00
    ingemarson opened #606
  • Jul 25 03:45
    timur-st94 closed #605
  • Jul 25 03:45
    timur-st94 commented #605
  • Jul 16 09:48
    alexgarbarev commented #605
  • Jul 16 09:22
    timur-st94 opened #605
  • Jul 02 19:37

    alexgarbarev on master

    Travis config has been updated … (compare)

  • Jul 02 19:32
    alexgarbarev commented #603
  • Jul 02 19:22
    alexgarbarev commented #601
  • Jul 02 19:14

    alexgarbarev on master

    Example project migrated to Swi… Variable replaced to dynamic va… Merge pull request #604 from kb… (compare)

  • Jul 02 19:14
    alexgarbarev closed #604
  • Jul 02 19:14
    alexgarbarev commented #604
  • Jun 28 11:24
    kbakacak opened #604
  • Jun 26 03:45
    yalamandarao edited #603
  • Jun 25 10:51
    yalamandarao edited #603
  • Jun 25 10:23
    yalamandarao commented #578
  • Jun 25 10:23
    yalamandarao commented #578
  • Jun 25 10:22
    yalamandarao commented #578
  • Jun 22 04:38
    yalamandarao opened #603
  • May 30 18:38
    nicoabie commented #551
  • May 30 18:06
    nicoabie commented #551
Roman Temchenko
@iThinker
So I should either move all configuration to Assembly. Or don't use Assembly at all for it.
I've found.
Jasper Blues
@jasperblues
I see. . If you want it factory method to be on the class, you can have the class method use Typhoon. This would have to be a separate factory.
Roman Temchenko
@iThinker
It is Factory Definitions section I think.
Jasper Blues
@jasperblues
Your class method would look something like:
- (instancetype) myTyphoonAssembledInstance {
    MyAssembly *assembly = [[MyAssembly new] activate];
   //Decide what instance to return
  //Ask Typhoon to return it. 
}
This is not a common thing to do with Typhoon. It may or may not be a good idea for your specific case.
Roman Temchenko
@iThinker
I wanted not to mess with Typhoon inside my own classes. I just wanted to encapsulate some bahvipour and use factory methods.
Jasper Blues
@jasperblues
I can’t think of another way to do what you’re asking.
(with Typhoon)
I don’t think it will help you here.
Roman Temchenko
@iThinker
- (SwordFactory *)swordFactory
{
    return [TyphoonDefinition withClass:[SwordFactory class]];
}

- (Sword *)blueSword
{
    return [TyphoonDefinition withFactory:[self swordFactory] 
        selector:@selector(swordWithSpecification:) 
        parameters:^(TyphoonMethod *factoryMethod) {

            [factoryMethod injectParameterWith:@"blue"];
        }];
}
I thought I will be able to use this. But I did not dig into it yet.
Jasper Blues
@jasperblues
That feature is for creating a definition (object that can participate in dependency injection by Typhoon) that get emitted from another object (such as a legacy class).
Roman Temchenko
@iThinker
This is like my situation. I take a legacy class. Get object from it. Inject additional info and return it.
Jasper Blues
@jasperblues
Is it? Ok then.
I misunderstood that from the initial description.
Jasper Blues
@jasperblues
let us know how it works for you :)
Maciej Oczko
@literator
Hey guys, question: I initialize assemblies via .plist configuration, but I need in one debug place create objects - ideally would be to access [[TyphoonComponentFactory defaultFactory] componentForType:...], but I'm getting nil for that call. Is it possible to have default factory set somehow?
Jasper Blues
@jasperblues
Hey @literator !
We're not using gitter much lately.
but lucky we caught your message
you mean defaultFactory is nil?
eestrella198
@eestrella198
@jasperblues eestrella198
preeti13456
@preeti13456
This message was deleted
mretty
@mretty
Testing