On Dec 1, 2011, at 1:09 PM, IOhannes m zmoelnig wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2011-12-01 17:34, Hans-Christoph Steiner wrote:
#1 do you think "path" is a good name, or will people confuse that with "getdir"? probably [searchpath] would be more meaningful.
I'm not stuck on the name 'path', but I do insist on consistency. The prefs are called "Path...", the [declare] flag is called -path, and the command line arg is called -path.
so why is [import] not called [lib]?
while i beg for consistency myself, you must not forget the context where things appear. "path" in the context of starting an application can well mean something different than in the context of creating a programme, dealing with sound files. also i would not mind renaming the "Path..." to "Search paths..." in the prefs panel (i would object in the startup flags, for compatibility reasons)
The prefs are called "Startup..." and the cmd line and [declare] flag is called "-lib", so its less consistent than "path". I chose the name 'import' because its commonly used for loading libs in a number of langauges like Java and Python.
#3 could anybody tell me why [declare] does not take immediate effect?
Check declare_new() in g_canvas.c
this question was not a technical one. i understand the implementation and its implications pretty well. nevertheless, i find the behaviour confusing and unintuitive. to rephrase my question: #3 could anybody tell me, why [declare] is implemented in a way that it doesn't take immediate effect?
Its a tricky problem because if you have a patch, then you add [declare], [path] or [import] to it it could modify how the existing part of the patch is loaded the next time its opened since the #X declare stuff would then be loaded first.
It seems to me that ideally, [declare], [import], [path], etc. would reload the patch when instantiated the first time so that the patch would always behave the same. But then the patch would loose its state, so there would have to be a special condition of reloading where it saves the state, reloads, then puts the state info back in.
.hc
The arc of history bends towards justice. - Dr. Martin Luther King, Jr.