-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Platform:
This behaviour appears on a Kotlin/JS application.
How to reproduce the bug:
Here's the demo code for reproducing the bug:
// create a new SolverFactory with additional library IOLib
private val customSolverFactory: SolverFactory = ClassicSolverFactory
.newBuilder()
.withLibrary(IOLib) // open issue
.toFactory()
// add new custom factory to :gui controller
var application: Application =
TuPrologApplication.of(
DefaultJsRunner(),
customSolverFactory,
Page.DEFAULT_TIMEOUT
)
// create a new page (should use the custom factory)
application.newPage()
// handle page creation
application.onPageCreated.bind { it:Event<Page> ->
// problem here
// page.solverBuilder doesn't have IOLib as a runtime library
}
Expected behaviour:
The solverBuilder of a newly created Page instance should also use IOLib as a runtime library
Workaround:
Add the library to the Page.solverBuilder instance as soon as the page is created
application.onPageCreated.bind { it:Event<Page> ->
it.event.solverBuilder.withLibrary(IOLib)
}
Metadata
Metadata
Assignees
Labels
No labels