Re: NotebookGet/Read/EvaluateSelection Issues
- To: mathgroup at smc.vnet.net
- Subject: [mg106821] Re: NotebookGet/Read/EvaluateSelection Issues
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Sun, 24 Jan 2010 05:41:36 -0500 (EST)
- References: <hj98as$g52$1@smc.vnet.net> <hj9e1n$k6t$1@smc.vnet.net> <hjeqc0$ft7$1@smc.vnet.net>
Hi, > David, > > Thank you for your explanations and your time. If you want to get your stuff done with mathematica, it is a good idea to listen to what David has to say! > I made up the simple routines to test out my "theory" of manipulating > notebooks by means of NotebookOpen, SelectionEvaluate, etc... > > I am not technically a beginner, but I am aware that Mathematica is very > complex package, and I have been only playing on its surface. Most of time, > I hated it because of it's confusing programming syntax. It took me a long > time to realize how the global variables work because I was used to local > variable programming in other language (Fortran90, Basic). I was trying to > design the Mathematica routines in similar concept to Fortran90 design where > you write modules in separate files, and get called up on whenever it is > needed. It think this is your problem: all the complicated stuff you explain below would not be necessary if you accept that work is best done in another way in Mathematica, whether that's good or not and whether you like that or not. Using Packages is a first step. On the other hand you might want to reconsider whether it is really necessary to split up your modules in many seperate files (there are good reasons to do that, but I am not sure if your situation justifies it). You might just as well try to learn more about using Mathematica notebooks, you can structure your code within a notebook using Sections, Subsections, you can even create multiple packages and localized modules within one Notebook, so you can put more into a file without loosing oversight than you might in a fortran textfile. So depending on your situation, you might not even need to create packages for what you want to achieve... If you want to avoid further frustration, I would strongly recommend you try to adopt the Mathematica way, otherwise you might end in endless discussions about all the deficiencies of Mathematica (you might want to see the 1 -> -1 thread to see what I try to tell you). I'm not saying that everything in Mathematica is perfect and could not be improved or that people who don't like Mathematica are stupid. But I I am convinced that people who accept Mathematica the way it is and are able to adopt their working style will get their problems solved in reasonable time. People who try to make Mathematica behave as _they_ think it should will usually end in frustration and years of tilting against windmills... hth, albert