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

MathGroup Archive 2008

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

Search the Archive

Re: Saving Packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86843] Re: Saving Packages
  • From: Albert Retey <awnl at arcor.net>
  • Date: Sun, 23 Mar 2008 01:01:57 -0500 (EST)
  • References: <fro3a6$i8l$1@smc.vnet.net> <frqpnm$505$1@smc.vnet.net> <fs26nq$6r$1@smc.vnet.net>

Hi,

> Yet I'd like to explain better what is my larger problem is:
> to break down a big project in pieces, it is correct then to save big
> chunks of code definitions as packages?

Absolutely, that is much better than handle many notebooks which you 
have to evaluate before starting to work...

> I'm asking because I'd like to still keep on modifying those packages,
> as in a standard notebook. But opening the .m file brings up a
> different interface, which although it seems useful (drop down boxes
> with Functions and Sections - I'd like to have them in the notebook!)
> it's not so clear to me if I'm losing something present in the
> notebook interface.

well, what you see in fact is a notebook - with a special style which is 
trimmed to work on mathematica code and some extras which make possible 
to save the noncode parts of the notebook within the .m file, too. The 
main drawback I see is that at this time not too much (none?) 
information is available wheter and how you can customize this style 
with an own stylesheet.

> What I'm doing now, thanks to your answers, is to work in the .nb
> file, modify it as needed, select all cells and set them to init, and
> save as .m file. Correct?

Basically yes, but if you set the Notebooks option AutoSavePackage to 
Automatic, then the .m file will be generated automatically each time 
you save the notebook, which makes the whole process very handy. As has 
been pointed out this is the recommended way to go for versions < 6, for 
version 6 the recommended way seems to be to edit .m files directly, but 
the "old" way still works. It's a matter of taste which way you go.

hth,

albert


  • Prev by Date: Re: finding positions of elements in a list
  • Next by Date: Re: ListPlot Joined/Filling bug?
  • Previous by thread: Re: Saving Packages
  • Next by thread: Re: Saving Packages