1
$\begingroup$

Bug introduced in 11.1.1 (or earlier) and persisting through 11.3, fixed in 12.1 or earlier

CASE:3919858


This dataset is active:

Dataset[<|"a" -> 1, "b" -> <|"b1" -> 1, "b2" -> 2|>|>]

active dataset

by active I mean that you can click on it to explore deeper levels. Notice how the cursor becomes a hand and the text becomes blue on mouse over. And if you click on it, you get:

enter image description here

For some reason the following commands result in datasets that are inactive:

Button["test", 
    CreateDocument[
        {ExpressionCell[
             Dataset[<|"a" -> 1, "b" -> <|"b1" -> 1, "b2" -> 2|>|>],
             "Output"]}]]

and even simpler:

Button["test", 
    CellPrint[
        ExpressionCell[
            Dataset[<|"a" -> 1, "b" -> <|"b1" -> 1, "b2" -> 2|>|>], 
            "Output"]]]

This is how an inactive dataset looks like:

inactive datase

My questions are:

  1. Why is the interactivity of the dataset lost?
  2. Is there a way to preserve it for the cases shown?

I am using Mathematica 11.1.1 under Windows 7.

$\endgroup$
4
  • $\begingroup$ I hate that I can't explain it! :) $\endgroup$
    – Kuba
    Jul 19, 2017 at 20:55
  • $\begingroup$ @kuba then it must be a good question! I contacted support (CASE:3919858), they reproduced it and proposed a workarround using NotebookWrite, SelectionMove and SelectionEvaluate. Do you think this should be tagged as a bug? $\endgroup$ Jul 24, 2017 at 17:46
  • $\begingroup$ I don't work with Datasets as I find the formatting unpredicatable anyway so it is hard to judge for me. What I find interesting is at what stage is this hyperlink added/dropped that it is affected by button, even "Queued" one. $\endgroup$
    – Kuba
    Jul 25, 2017 at 7:30
  • $\begingroup$ All examples (including the first) are inactive in MMA 10.4.1 for Microsoft Windows (64-bit). If I click on 2 levels, I get TypeSystemStruct[{"a", "b"}, {TypeSystemAtom[Integer], TypeSystemAssoc[TypeSystemAtom[TypeSystemEnumeration["b1", "b2"]], TypeSystemAtom[Integer], 2]}]. $\endgroup$ Jun 7, 2018 at 3:36

2 Answers 2

1
$\begingroup$

I tried it on 13.2 on a mac and I am uploading a screen recording.

enter image description here

The commands are the same as in the OP and I am providing them below as well for completeness

Quit[]

Dataset[<|"a" -> 1, "b" -> <|"b1" -> 1, "b2" -> 2|>|>]

Button["test", 
 CreateDocument[{ExpressionCell[
    Dataset[<|"a" -> 1, "b" -> <|"b1" -> 1, "b2" -> 2|>|>], 
    "Output"]}]]

Button["test", 
 CellPrint[
  ExpressionCell[
   Dataset[<|"a" -> 1, "b" -> <|"b1" -> 1, "b2" -> 2|>|>], "Output"]]]
$\endgroup$
0
$\begingroup$

as the picture shows, 12.1 works.

enter image description here

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.