Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find proxy for ... #75

Open
Daxten opened this issue Apr 9, 2018 · 0 comments
Open

Cannot find proxy for ... #75

Daxten opened this issue Apr 9, 2018 · 0 comments

Comments

@Daxten
Copy link

Daxten commented Apr 9, 2018

Hi,

my AjaxClient has some dependencies, so I've made it a class and create it on demand with this method:

  def withFileMap[Trait](files: Map[String, File])(onProgress: Option[Double] => Callback = _ => Callback.empty,
                                                   progressNotComputable: Boolean => Callback = _ => Callback.empty): ClientProxy[Trait, Json, Decoder, Encoder] = new AjaxClient(files, onProgress, progressNotComputable)[Trait]

From time to time I get the following macro(?) error:

 Cannot find proxy for... 

Funny thing is, that I can fix it by not using lambdas

    .withSimpleOptionalFileList[WiredApi]("banner", state.selectedImageFile, onProgress = e => $.modState()) // Macro error
    def updateProgress(d: Option[Double]) = $.modState(_.copy(progress = d))
    .withSimpleOptionalFileList[WiredApi]("banner", state.selectedImageFile, onProgress = updateProgress) // no Macro error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant