Hello, I'm trying to use Fable with the Nethereum lib. I'm getting the following error
FABLE: Cannot resolve Nethereum.Web3.Web3.GetAddressFromPrivateKey. Here is a gist of the code https://gist.github.com/klimisa/054d8da05a63bc7e25e546a0a4af483f
Apologies if that question doen't make sense, I'm a newbie.
Fable cannot compile any F# library they need to be Fable compatible.
When you see
Cannot revolse XXX that's the error Fable output in this cases. Although, we did improve the error message, to make the error more clear, in a version of Fable so you are probably not using the latest version of it.
It is not supported you have to use.
Disclaimer: I am the maintainer of Thoth.Json
Currently, Thoth.Json with it's counter part Thoth.Json.Net which allows to have the same APIs on both Fable and .NET. The .NET version currently use Newtonsoft under the hood.
Hello @poborin , there is
Decode.fromValue which behave almost the same as
Decode.fromString which you need to give it the "root" arguments.
In general, you just dive it
$ because you are decoding from the top level of the "JSON"/Object.
This is actually, what
Decode.fromString do under the hood: https://github.com/thoth-org/Thoth.Json/blob/7f6b448ce9ba283b606926eace136eacc148d159/src/Decode.fs#L117
[<assembly:ScanForPlugins>], referenced the compiled binary and decorated a type with it. No matter what I do though, I'm not getting the loaded message (like
Loaded Feliz.HookAttribute). The project compiles but the attribute seems to be ignored by Fable.
you should add a comment on this issue fable-compiler/Fable#2489 or open a new issue to ask Alfonso to publish documentation about the plugins. If we are several people it could help ;).
I also found one of the original PR where Alfonso introduced the plugin feature.
There is a note about using using
--exclude to exclude the plugin source code and use the dll instead in development mode. It is possible that your problem is related to that.
@kaashyapan I think you will need to create your own cmd/subscription instead of the classic commands because you will need 3 Msg
Here is some pseudo code so you get the idea:
let httpRequestWithProgress (arg:'a) (onProgress : _ -> Msg) (onSuccess : _ -> _) (onFailure : _ -> _) = let request = setupHttpRequest arg request.on("progress", (fun res -> dispatch (onProgress res) ) request.on("complete", (fun res -> dispatch (onSuccess res) ) request.on("error", (fun res -> dispatch (onFailure res) ) request.start()
Bulma.fileInput? According to https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory it's possible, but I cannot find such a property in Bulmas prop's
Is it possible to style the input button in such a way so it fits Bulma's dropdown menu in the navbar naturally? e.g. I would like to make it similar to the Save element.
Inside the navbar you can use the
control component as "a container for almost anything you want" Docs.
About customizing the the File component to have a similar style as the save button, it is not available by default from Bulma: https://bulma.io/documentation/form/file/
The reason is probably that in general the current style is what is expected from the user. But you can always write your own CSS.