6
$\begingroup$

After having assigned the usage message to f using

ClearAll@f;
f::usage=ToString@RandomInteger@{10^10,10^11};

the mouseover message is stuck at the first assignment while ?f shows the freshest usage message.

How to clear and reassign the usage message so even mouseover is updated?


Env:
Mathematica 12.0 on Win10

$\endgroup$
2
  • 3
    $\begingroup$ You have use Remove to get rid of usage messages. $\endgroup$ – m_goldberg Jan 24 '20 at 23:43
  • $\begingroup$ @m_goldberg works! I'll accept if you answer... why doesn't ClearAll work though? $\endgroup$ – lineage Jan 25 '20 at 3:17
5
$\begingroup$

It seems one can use the following to force the front-end to update the usage templates (starting in version 12.0):

FE`CacheTemplateAndUsage["f"]

Please note that the front-end will not update the templates even if you set a new usage message. Simply call the above again to force the update once again.

$\endgroup$
3
  • $\begingroup$ I think the packet this calls has existed since 11 $\endgroup$ – b3m2a1 Jan 29 '20 at 23:16
  • $\begingroup$ @b3m2a1 For me, it doesn't seem to work: I get "Could not process unknown packet "CacheTemplateAndUsagePacket"" if I try it in 11.3. Am I missing something? $\endgroup$ – Lukas Lang Jan 30 '20 at 8:40
  • $\begingroup$ not really sure but I think it it did work $\endgroup$ – b3m2a1 Jan 30 '20 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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