7
$\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$ Commented Jan 24, 2020 at 23:43
  • $\begingroup$ @m_goldberg works! I'll accept if you answer... why doesn't ClearAll work though? $\endgroup$ Commented Jan 25, 2020 at 3:17

1 Answer 1

7
$\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$ Commented Jan 29, 2020 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$ Commented Jan 30, 2020 at 8:40
  • $\begingroup$ not really sure but I think it it did work $\endgroup$ Commented Jan 30, 2020 at 8:42

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.