Re: usage / "More..."
- To: mathgroup at smc.vnet.net
- Subject: [mg47194] Re: usage / "More..."
- From: Felix Kossak <felix.kossak at scch.at>
- Date: Mon, 29 Mar 2004 04:22:40 -0500 (EST)
- Organization: Johannes Kepler Universitaet Linz
- References: <c3udnh$9og$1@smc.vnet.net> <c40s9s$mo7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Thanks for your suggestion, but I do not yet know how to apply this. When coded in a package, the "usage" message is a string - or can it be something else? How do I add a button to a string? And why do usage messages of Mathematica standard packages not show such a button added to the string, yet it appears when called from the frontend? Let's look at an example from a Mathematica standard package: eg "Graphics.m". In the frontend, I type "?Histogram", and I get a text plus the "More..." hyperlink. When I look at the full form of the cell, the whole thing is wrapped in "BoxData". Yet when I look at the package source, the usage message is just a string, without that "More..." button. I actually tried to set a "usage" message to a "Cell[ BoxData[ ... ] ]", but then, when loading the package, I get an error message: MessageName::messg: MyPlot::usage cannot be set to Cell[BoxData[RowBox[\ \[LeftSkeleton]1\[RightSkeleton]]], Print, CellTags -> Info3?812768]. It must \ be set to a string. So there seems to be a mechanism (in the frontend?) which automatically adds this hyperlink. Do you know about this? Thanks, Felix Ken Morgan wrote: > "Felix Kossak" <felix.kossak at scch.at> wrote in message > news:c3udnh$9og$1 at smc.vnet.net... > >>Hi, >> >>I wonder how the "More..." hyperlinks appended to usage info are >>generated as I want to have that feature for our own packages. I found a >>posting by Bobby Treat dt 2002 suggesting to copy and modify the full >>form of some existing usage text, but looking at the source of standard >>Mathematica packages shows that the "More..." hyperlink is actually not >>coded into the usage text itself. I also failed to find a hint in an >>init.m file. I guess that the frontend generates this hyperlink >>automatically, but based on what information? What do I have to do to >>get those links to our own help notebooks? >> >>Thanks, >>Felix >> > > > Here is how the "More..." button can be generated for the Plot usage: > > Button[More?, RuleDelayed[ButtonData, "Plot"], Rule[Active, True], > Rule[ButtonStyle, "RefGuideLink"]] > > If you evaluate this, you will get a clickable "More..." button. > > Ken >