Copy link to clipboard
Copied
We are currently using a custom flow composer that extends FlowComposerBase and implements IFlowComposer. In doing so, we are bypassing StandardFlowComposer. In the BaseCompose class, the protected _flowComposer variable is typed as 'StandardFlowComposer', which makes it impossible to use a flow composer that does not descend from StandardFlowComposer.
I had discussed this with Richard about this at MAX, and he indicated that it is something that should probably be fixed, so I just wanted to report it here.
We compile the TLF sources locally in our project. To work around this issue, I changed the _flowComposer var in BaseCompose to typed as IFlowComposer. The getter for 'lines' and the 'addLine()' method are not currently part of the IFlowComposer interface, so in places where those are used in the ComposeState, I cast _flowComposer to FlowComposerBase.
Seems like there would be a couple different options for fixing this issue. We could add the 'lines' getter and addLine() method to IFlowComposer, in which case the _flowComposer variable in BaseCompose could be typed as IFlowComposer and no other changes would be required. Another option would be to provide template methods for the IFlowComposer interface in FlowComposerBase and then type the _flowComposer var in BaseCompose as FlowComposerBase.
Adding lines getter and addLine method to IFlowComposer would probably be better, since we could potentially implement that interface without extending FlowComposerBase, but I guess that there could be a strong case for excluding those from the interface since they are for intended to be used only for internal composition purposes.
Maybe there could be a second interface that extends the IFlowComposer interface and adds the internal functionality required for composition. Then StandardFlowComposer and any custom flow composers created could implement that interface instead (and BaseCompose could reference that). That way IFlowComposer getters elsewhere in the API would not expose the lines getter and addLine() method...
Just some ideas...
Thanks,
Brent
Thanks Brent - I've logged this in our bug database.
Copy link to clipboard
Copied
Thanks Brent - I've logged this in our bug database.
Copy link to clipboard
Copied
It seems this problem is still not solved in the latest milestone 4.0.0.14159 release. Why?
How are we supposed to extend the FlowComposerBase when the it's base class has a proteced var typed to it's subclass, subclass?
Will this be solved in TLF 1.1? If so when will 1.1 be released? I need to know because I may only switch to 1.1 if it's release is before our project is to be released.
Thanks
- Benny
P.S.
Alan wrote: "Thanks Brent - I've logged this in our bug database."
I tried to look this up in the bugbase but couldn't find it. Could you please paste the link here so we can read up and vote for it? Thanks.
Copy link to clipboard
Copied
Its not solved in TLF 1.1 and that window is closed to us.
TLF's bugbase isn't visible through bugs.adobe.com
Best workaround is to not subclass any of the existing TLF classes but to write your own IFlowComposer implementation.
Richard