problem creating line object

Denis's icon

Hello

it happened to me a couple of times that Max doesn't recognize the [line] object. Existing line objects or line object creations generate a "line: no such object" in the Max window.
After some manipulations, including restarting Max, opening new patches, Max starts to recognise line objects again.
I use the latest 32bit windows version.
How is that possible???
Thanks

Jan M's icon

do you happen to have a patch called "line" in your search path?

Denis's icon

I actually have a line.js file. I renamed it and my lines don't make any problem now. Thanks!
I tried with a file named line.txt, it makes the same problem. I also tried with other objects like metro, with files in the same directory named metro.js or metro.txt, and I get the same problem.
I still find it strange that files with a different extension can "contaminate" object creations.
Thanks again!

Peter Castine's icon

For better or worse, when Max walks through the search path looking for a file, it matches on file name only (ignoring extension). The the search path is basically one global (and huge!) pot of files.

Max has been like this as long as there has been Max. And it's one thing that bites every single beginner in the arse. Google the site for "search path" and half the hits will be on this problem.

Cycling '74 really ought to add an alert that pops up whenever Max is run the first time on a computer: "DO NOT NAME ABSTRACTIONS, JAVASCRIPT, JAVA, COLL, TEXT, OR ANY OTHER KIND OF FILE WITH THE SAME NAME AS A STANDARD OBJECT. You have been warned."

Denis's icon

understood! I will be less of a beginner now.
Max could maybe even check js or coll or text objects arguments at creation time and warn about that.