Tag Info

Hot answers tagged

19

In version 10.1, I've built something like Spelunk into GeneralUtilities`. To use it, run Needs["GeneralUtilities`"] PrintDefinitions[symbol]; This will pop up a window that shows all definitions of symbol. Here is a short summary of features: The window shows code cells containing all DownValues, OwnValues, UpValues, SubValues, and Attributes of a ...


6

It seems that when the book appeared, the behaviour of how a symbol is resolved was different. We have two important things: the current $Context which is usually Global` unless you change it with e.g. Begin as you did the $ContextPath which is a list of contexts that are searched when you type in a symbol like x without explicit context Now there seems ...


3

It is hard to answer you without you showing a minimal example of the problem. But my guess is that you are making the mistake of returning symbols from the package back to the user. The way to handle these things, is to do like all Mathematica functions do, which is pass the symbols needed in the call itself. For example, when using DSolve or Integrate, ...


2

(this is wiki answer, as just noticed it is duplicate, but will keep it here for easy reference) The result is different from Version 2.2 and version 10.1, this is just to show the difference. Something changed between 1993 and today:


1

I have exactly the same project. In my case paramList always has the same variables' names, so I defined a "structure" to handle it in the package and a way to transform it into a rule: BeginPackage["foo`"] Unprotect @@ Names["foo`*"]; ClearAll @@ Names["foo`*"]; f::usage = "sol=f[x,plist]" Begin["`Private`"] constructPData[y_, z_] := pData[y, z]; pData /: ...


1

I'm still not sure whether I understand your problem and what you are trying to achieve but I now found something which is not entirely obvious. I think you try to load a sub-package file which was encoded with a key and put its context on $ContextPath. Here is what I think will do what you want: First you need a directory TestApplication in one of the ...


1

I think you're confused about context paths, partly because your application only has one package. I assume you have a package called TestPackage.m located in a folder called TestApplication located within FileNameJoin[{$UserBaseDirectory, "Applications"}]? On my machine this folder would be ...



Only top voted, non community-wiki answers of a minimum length are eligible