not enough arguments for method apply: (title: String, assetsFinder: controllers.AssetsFinder)(content: play.twirl.api.Html)play.twirl.api.HtmlFormat.Appendable in object main. Unspecified value parameter assetsFinder.
The browser highlights this line in red as the offender: @main(“Hello”) {
I am 100% new to this platform, but it seems that main has one argument and the apply method is expecting two arguments. So on a whim I changed the example code to: @main(“Hello”, null) {… and it “worked”.
Is the example wrong? Do I have a dependency issue?
This makes the assetsFinder from inside the HomeController available to the Twirl template and passes it to the main template as the second parameter.
The problem with the tutorial is that (due to the change above) the Java and Scala starter projects now have diverged as the Java one still uses the old approach and the Scala one uses an AssetsFinder but the tutorial tries to talk about both at the same time.
I did try your suggestion, but after a compile request it throws a similar error:
no arguments allowed for nullary method apply: ()(implicit assetsFinder: controllers.AssetsFinder)play.twirl.api.HtmlFormat.Appendable in object hello
Other steps in the tutorial cause various errors for the Scala version. The instructions in Step 2 request the H1 tag to use a @name variable. I could not distinguish what was instructional error versus my own and stopped with that example.
I have moved past Hello World since it is problematic for me. The other examples, like ScalaComet, work fine and offer me a learning opportunity. Thanks again for the effort.