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
final String zarrRootStrPath = "/temp/Zurich.hackathon.testData/maybe_top_level.zarr";
DatasetSelectorDialog selectionDialog = new DatasetSelectorDialog(
new N5Importer.N5ViewerReaderFun(),
new N5Importer.N5BasePathFun(),
zarrRootStrPath,
new N5MetadataParser[]{new OmeNgffMetadataParser()},
PARSERS);
//just an empty function, otherwise NPE is thrown
selectionDialog.setContainerPathUpdateCallback(s -> {});
selectionDialog.run(ds -> {
System.out.println("just some data is selected...");
});
//makes the dialog to update (and thus display) its content
selectionDialog.detectDatasets();
When working with the pointed at file/path, the dialog is calling its containerPathUpdateCallback, which is normally initiated as null.
So, one has to provide there simply anything... to avoid having it getting NPE.
And the issue is that it is not obvious and perhaps the empty callback could be a better initial setting than just null.
What do you think? @bogovicj
The text was updated successfully, but these errors were encountered:
actually, the PR #96 is solving this issue (by getting access to the original code base rather than trying to construct and use the dialog itself directly)
Minimal opening example
When working with the pointed at file/path, the dialog is calling its
containerPathUpdateCallback
, which is normally initiated asnull
.So, one has to provide there simply anything... to avoid having it getting NPE.
And the issue is that it is not obvious and perhaps the empty callback could be a better initial setting than just null.
What do you think? @bogovicj
The text was updated successfully, but these errors were encountered: