Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Package writing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67392] Re: Package writing
  • From: "marek" <MarekBr at gmail.com>
  • Date: Wed, 21 Jun 2006 02:13:14 -0400 (EDT)
  • References: <e6lhqr$nfs$1@smc.vnet.net><e6r395$n8c$1@smc.vnet.net> <e737a2$41g$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Albert

As You pointed out at the end of your post I called that function with
one arguemnt and it needs two. That was the problem. I feel so stupid.
Sorry guys and thanks for all the replies.

> That's strange. This is why: Needs["PackageName`"] looks for a file
> PackageName.m (and some other extensions) to load. If it finds it, it will
> load it. If the file PackageName.m does not create the context PackageName`
> Needs will complain (but Get[] would not). For that reason you should
> definitly get an error message if you do Needs["DD`"] when the file DD.m
> doesn't contain a BeginPackage["DD`"]...

I guess we misunderstood each other here. Because I have BeginPackage[]
and EndPackage in my notebook that is the expected behaviour.

> I just tried it and atuoloading obviously only works if you have a full
> directory-structure for a package in Autoload, just a packagefile will not
> be loaded. Whether that is the desired behaviour I don't know but there is
> nothing to worry about your installation I guess...

what does it mean "if You have a full directory-structure for a package
in Autoload, just a packagefile will not be loaded"?

> When writing this I have another question: does you kernel run on the same
> machine as the frontend does? Are they seeing the same directory structure?
> Any notebook can have a Kernel-definitions associated, maybe the one for
> DataAnalysis.nb is different from the default?

yes I am running Mathematica kernel and front end on the same machine.


> and everything works as expected. hm. The only thing I realized is that you
> are calling e.g. DeconvolveData with just one argument, but it expects
> exactly two. Did you have another definition which works with one argument
> in an earlier version that gets loaded with a default notebook? If I change
> the tests to calls of DeconvolveData with an additional arguments they seem
> to work...

See the begining of that post. I had a default value set up for that
second parameter to that function and then I decided to change that and
forgot about that I changed that and so on and so forth   :)


> Something else: are you sure you want cellgrouping to be set to manual? Your
> sections are arranged somewhat irregular when closing the subgroups, at
> least to my taste :-). Maybe you want to just change Cells->
> CellGrouping->Automatic. Makes the closing of subgroups correspond to the
> structure much better, I think...

No, I am not sure that I want the cell grouping to be set to manually.
When I started writting my package I had some difficulties (related to
the fact that I do not know enough about Mathematica yet) adding my own
functions to the template.m file and keeping the cells groped in a
logical way. That was why I changed it to manual.

Anyway, My package got extended a bit and I used it to analyse a set of
my data. I am fairly pleased with the result. That was actually the
reason why I did not reply to this thread for some time. I had to put
together a short presentation. Now that is done so that I can get back
to improving my package and lerning more about Mathematica.

Marek


  • Prev by Date: Re: Numerical Integration
  • Next by Date: How to simplify exponents?
  • Previous by thread: Re: Package writing
  • Next by thread: Re: Re: Package writing