Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Difficulty with saving Package .m files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110438] Re: Difficulty with saving Package .m files
  • From: M Kelly <michaelkelly1444 at gmail.com>
  • Date: Fri, 18 Jun 2010 01:24:57 -0400 (EDT)
  • References: <hvcvt0$g96$1@smc.vnet.net>

On Jun 17, 6:11 am, John Fultz <jfu... at wolfram.com> wrote:
> On Thu, 17 Jun 2010 02:04:10 -0400 (EDT), M Kelly wrote:
> > I am having difficulties in saving or editing the Package .m files.
> > If I open a .m file and attempt to make any changes to it and then
> > Save the file or even use Save As, then it always wraps every line
> > with (* *) annotation brackets, making the file unusable when I
> > attempt to load in the definitions with Get[].
>
> > Does anyone have a solution to this problem, or is it the case that
> > Mathematica is just forcing me to use the IDE Wolfram Workbench to
> > make any changes?
>
> > Any help would be appreciated.
>
> By default, cells created using the Code style will be saved as executable code,
> while those created using the Input style will be saved as commented code. The
> two styles are useful so that you can maintain code which you can execute inside
> the front end for testing or bootstrapping purposes, but which doesn't get
> deployed for runtime use.
>
> If you open a .m file, you should be in an environment where all new cells
> created by default are Code cells.  If you're working with a .nb file, then you
> will have to make sure to manually change the style to Code (Alt+8 or Cmd+8, or
> Code under the Format->Style menu) before choosing the Save As command and
> creating a package file.
>
> Sincerely,
>
> John Fultz
> jfu... at wolfram.com
> User Interface Group
> Wolfram Research, Inc.

Thanks John

I appreciate your quick response.
But why didn't WRI just stick with the old system of using
Initialization cells?
This worked in both environments. Also I was unable to find anywhere
in the documentation that
mentions Code cells. Shouldn't the tutorial and Guide on Packages at
least make some reference to this important difference for .m files?

Regards
Michael


  • Prev by Date: Re: Simplifying complicated expressions
  • Next by Date: Re: Using Mathematica for Electrophysiology Data Analysis
  • Previous by thread: Re: Difficulty with saving Package .m files
  • Next by thread: Re: Difficulty with saving Package .m files