You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As this site is going to be the first place that new users visit before using the Toolkit, and in many cases there will be need to use the old Java classes to integrate with other libraries (such as JavaFX and its file and directory choosers) the lack of any mention of interworking is likely to put people off trying the Toolkit.
In addition the context prompts in IDEs such as VsCode do not offer the implicit conversions, so when you got to create an os.Path you are not offered the ability to pass it an io.File, just the ability to pass it a PathConvert or String.
So I would suggest a short extra page, or an extra paragraph on the last page in the os-intro section which says something like:-
os.Path objects can be created from existing java.io.File and java.nio.Path objects by passing them to the constructor/apply, and if you need to get an io.File you can use the toIo method, and for an nio.Path the toNio method.
The text was updated successfully, but these errors were encountered:
In the section https://docs.scala-lang.org/toolkit/os-intro.html there is information on how to use op.Path and friends on its own, but nothing about how to convert java.io.File and java.nio.Path objects to and from os.Path.
As this site is going to be the first place that new users visit before using the Toolkit, and in many cases there will be need to use the old Java classes to integrate with other libraries (such as JavaFX and its file and directory choosers) the lack of any mention of interworking is likely to put people off trying the Toolkit.
In addition the context prompts in IDEs such as VsCode do not offer the implicit conversions, so when you got to create an os.Path you are not offered the ability to pass it an io.File, just the ability to pass it a PathConvert or String.
So I would suggest a short extra page, or an extra paragraph on the last page in the os-intro section which says something like:-
os.Path objects can be created from existing java.io.File and java.nio.Path objects by passing them to the constructor/apply, and if you need to get an io.File you can use the toIo method, and for an nio.Path the toNio method.
The text was updated successfully, but these errors were encountered: