MathGroup Archive 2007

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

Search the Archive

Re: classes.m

  • To: mathgroup at
  • Subject: [mg83393] Re: classes.m
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Mon, 19 Nov 2007 06:16:03 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fhp1j2$1d1$>

iitamanna at wrote:

> I wanted to know how can I use the .m files that i download from some
> source on web.
> I downloaded Classes.m file and placed it in WolframResearch
> \Mathematica\5.2\AddOns\ExtraPackages\ProgrammingInMathematica
> but still when i try to include or use this file ..i get
> "Can not open Classes.m file"
> how can i include properly and use the .m files.
> Also Get cn take as an argument directory path, how that should be
> specifies

You can choose either one of the following solutions:

1) Move the file Classes.m out of the directory ProgrammingInMathematica 
   and put it into the parent directory 
WolframResearch\Mathematica\5.2\AddOns\ExtraPackages\Classes.m, then 
evaluate Needs["Classes`"]

2) Keep the package Classes.m in the directory ProgrammingInMathematica 
  and evaluates Needs["ProgrammingInMathematica`Classes`"] (you can 
disregard the warning message).

You can check that Classes is correctly loaded by evaluating



and start using it.


Class[class, superclass, variables, methods] defines a new class as a \
subclass of superclass. Class[object] gives the class of an object.


  • Prev by Date: Re: What is a good way of returning a function from a Module[]?
  • Next by Date: Re: Basic Question about Mathematica
  • Previous by thread: Re: classes.m
  • Next by thread: instantiate GUI or graphic elements interactively