Search path discussion


RE: Search path discussion
#37
(2022-03-16, 0:38)Travis Cobbs Wrote: Having said that, the top-level model folder still makes sense if you think of that folder as the current working directory for the whole model. Adding the current file's directory to the search path is reasonable, but I don't think it should replace the top-level model's directory. What about this:

What would be the advantage of that?

I can only see it causing potential problems, expanding on my above example.

If the b.ldr model want to use something from the higher folder it should reference it using "..\d.ldr" otherwise it will (again) fail to load when opening just b.ldr.

And also it will complicate things for programs working with multiple open models at once.

Because you will need to keep track of how a model was opened.

It will cause two different 'b.ldr' instances when a user first opens b.ldr standalone and later also opens 'a.ldr' in the same program.

The first b.ldr will indicate missing references and the second one will display fully keeping track of this will need lots of house keeping without gaining, imho, any advantage over not including the working folder at all.

In short every model should live in it's own little universe fully isolated from anything else loaded.

This way you can work with multiple open models without the scoping problems a 'working folder' would cause.

Also when will it even be needed?

You say you think there are no real multi folder models out there, which would mean the <current file folder> and <working folder> would be the same for almost all models (at least in your experience).

So what would be the point of adding it to the search order causing all these headache's for developers Smile
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Search path discussion - by Orion Pobursky - 2021-03-16, 13:26
RE: Search path discussion - by Travis Cobbs - 2021-03-16, 22:11
RE: Search path discussion - by Travis Cobbs - 2021-03-16, 22:09
RE: Search path discussion - by Travis Cobbs - 2021-03-17, 19:27
RE: Search path discussion - by Travis Cobbs - 2021-04-14, 18:09
RE: Search path discussion - by Travis Cobbs - 2021-04-15, 20:14
RE: Search path discussion - by Cam's Bricks - 2022-03-15, 11:08
RE: Search path discussion - by N. W. Perry - 2022-03-15, 17:12
RE: Search path discussion - by Travis Cobbs - 2022-03-15, 21:34
RE: Search path discussion - by Roland Melkert - 2022-03-16, 7:46
RE: Search path discussion - by Travis Cobbs - 2022-03-16, 16:37
RE: Search path discussion - by Travis Cobbs - 2022-03-16, 23:53
RE: Search path discussion - by Travis Cobbs - 2022-03-19, 21:02

Forum Jump:


Users browsing this thread: 1 Guest(s)