MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Using Notebooks to write packages?

  • To: mathgroup at
  • Subject: [mg66852] Using Notebooks to write packages?
  • From: "Steven T. Hatton" <hattons at>
  • Date: Thu, 1 Jun 2006 06:55:33 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I have encountered a problem while working with packages in which a package
needed when loading the one I'm creating will produce a shadow warning. 
For example if I have 

BeginPackage["Drawing`", {"Graphics`Arrow`"}]

DrawGrid::usage = "DrawGrid[\[Theta],X,Y,origin, options]";



  DrawGrid[theta_, X_, Y_, o_, opts___?OptionQ] := 
    Module[{dx = UR[theta], dy = UR[theta + Pi/2], Dx, mXColor, mYColor},
      mXColor = xColor /. {opts} /. Options[DrawGrid]; 
      mYColor = yColor /. {opts} /. Options[DrawGrid]; 
      Dx = {o, X dx}; 
      Dy = {o, Y dy}; 
          , Table[Line[{Dx[[1]] + #, Dx[[2]] + #} &@(y dy)], {y, 0, Y}]
        , Arrow[o, dx, HeadScaling -> Relative]
          ,Table[Line[{Dy[[1]] + #, Dy[[2]] + #} &@(x dx)], {x, 0, X}]
          ,Arrow[o, dy, HeadScaling -> Relative]



I get a shadow warning saying that Arrow and HeadScaling are in multiple
contexts; global and Graphics`Arrow`.  I checked before loading the
package, and they were not present in global scope.  I tried creating a
very minimal package along the same lines, and using Graphics`Arrow`, and I
didn't get the warning.  I then took all the code I had written and rewrote
it using Emacs, and saved it as a .m file.  No more warning.

This is on Linux.  Has anybody else encountered this kind of problem? I'm
inclined to believe the problem has to do with the fact that I created the
package using the Notebook front end.  It doesn't happen every time I
create a package using the front end, but I have not identified any kind of


  • Prev by Date: Re: Mathematica Font problems
  • Next by Date: Re: Re: Exporting Graphics to .eps
  • Previous by thread: Re: Problem with a limit.
  • Next by thread: Re: Using Notebooks to write packages?