Re: Problems with Init.m
- To: mathgroup at smc.vnet.net
- Subject: [mg57782] Re: Problems with Init.m
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Wed, 8 Jun 2005 03:21:31 -0400 (EDT)
- References: <d811h9$cbs$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
klamser wrote:
> Hallo,
>
> in the appendix you see the contend of my Init.m file.
>
> For example, I define there the ShowStatus statement:
>
> ShowStatus[status_] := LinkWrite[$ParentLink,
> SetNotebookStatusLine[FrontEnd`EvaluationNotebook[], ToString[status]]];
>
> But it does not work like I think.
>
> At the startup I see the message windows, where the print statements are
> displayed, but not in my notebook, where the first order is executed.
>
> Also the test evaluation of the "ShowStatus["Mathematica 5.1.1"];" is
> displayed in the status line of the message window, not in the notebook
> status line, where it is intended to be displayed.
>
> And ??ShowStatus says:
>
> Information::"not found":"Symbol \!\(\"ShowStatus\"\) not found. \
> \!\(\*ButtonBox[\"Mehr\[Ellipsis]\", ButtonStyle->\"RefGuideLinkText\", \
> ButtonFrame->None, ButtonData:>\"General::notfound\"]\)"
>
> Where lays the error?
> Kind regards
>
> Peter Klamser
>
> Init.m
>
>
> (** User Mathematica initialization file **)
>
> (** Decide how to display graphics on this machine **)
>
> Begin["System`Private`"]
>
> (* Hide any symbols which are created *)
>
> Which[
> $Remote || $ParentLink =!= Null, <<"PSDirect.m",
> Environment["DISPLAY"] =!= $Failed, <<"Motif.m",
> True, <<"Terminal.m"
> ];
>
> Off[General::"spell"]
> Off[General::"spell1"]
> Off[General::"spell2"]
>
> $HistoryLength=10;
>
> $TextStyle = {FontFamily -> "Hlvtica", IndentMaxFraction->0};
>
> Unprotect[FindRoot];
> FindRoot[what_, {x_, {xmin_, xmax_}}, opts___] := FindRoot[what, {x,
> xmin, xmax}, opts];
> Protect[FindRoot];
>
> ShowStatus[status_] := LinkWrite[$ParentLink,
> SetNotebookStatusLine[FrontEnd`EvaluationNotebook[], ToString[status]]];
>
> SetOptions[Plot,PlotStyle ->
> {RGBColor[1,1,0],RGBColor[0,0,0],RGBColor[0,0,1],RGBColor[0,1,0],RGBColor[1,0,0],RGBColor[0,1,1],RGBColor[1,0,1]}];
>
>
> SetOptions[Plot,PlotStyle -> Table[Hue[i],{i,0,1,0.2}]];
>
> SetOptions[Plot,PlotStyle ->
> {RGBColor[1,1,0],RGBColor[0,0,0],RGBColor[0,0,1],RGBColor[0,1,0],RGBColor[1,0,0],RGBColor[0,1,1],RGBColor[1,0,1]}];
>
>
> SetOptions[Plot,
> PlotStyle\[Rule]{RGBColor[0,0,0],RGBColor[1,0,0],RGBColor[0,0,1],
> RGBColor[0,1,0],RGBColor[1,0,1],RGBColor[0,1,1],RGBColor[1,1,1]}];
>
> $TextStyle = {FontFamily -> "Times",
> IndentMaxFraction->0,FontSlant->"Italic",FontWeight->"Plain"};
>
> <<RealTime3D`
>
> On[ShowTime];
>
> Print["Mathematica 5.1.1 Start"]
> Needs["Utilities`ShowTime`"]
> ShowStatus["Mathematica 5.1.1"];
>
> End[]
>
Hello,
I think you will find that you have actually created a function with the
name System`Private`ShowStatus. The simplest thing to do is probably to
write a package which exports your ShowStatus function and then load it
inside init.m with Get.
David Bailey
http://www.dbaileyconsultancy.co.uk