Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 04 2021 07:46
    jasperblues commented #609
  • Jan 04 2021 07:27
    ingemarson commented #609
  • Dec 23 2020 11:40
    jasperblues closed #609
  • Dec 23 2020 11:40
    jasperblues commented #609
  • Dec 23 2020 11:19
    jasperblues closed #578
  • Dec 23 2020 11:19
    jasperblues commented #578
  • Dec 23 2020 11:13
    jasperblues closed #500
  • Dec 23 2020 11:13
    jasperblues commented #500
  • Dec 23 2020 11:10
    jasperblues closed #288
  • Dec 23 2020 11:10
    jasperblues commented #288
  • Dec 23 2020 11:10
    jasperblues closed #380
  • Dec 23 2020 11:09
    jasperblues commented #380
  • Dec 23 2020 11:09
    jasperblues commented #558
  • Dec 23 2020 11:08
    jasperblues closed #558
  • Dec 23 2020 11:08
    jasperblues commented #558
  • Dec 23 2020 11:06
    jasperblues closed #450
  • Dec 23 2020 11:05
    jasperblues closed #429
  • Dec 23 2020 11:04
    jasperblues closed #357
  • Dec 23 2020 11:04
    jasperblues closed #164
  • Dec 23 2020 11:03
    jasperblues commented #609
Roman Temchenko
@iThinker
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
Preeti Sharma
@preeti13456
This message was deleted
mretty
@mretty
Testing
mretty
@mretty
Hi
@preeti13456 hi
Wiki Guide
@wikiguide_gitlab
yahoo mail login at yahoo.com