[PD-dev] revised search-plugin.tcl
Hans-Christoph Steiner
hans at at.or.at
Sat Jun 25 19:19:37 CEST 2011
On Jun 24, 2011, at 4:36 AM, IOhannes m zmoelnig wrote:
> On 2011-06-23 01:05, Jonathan Wilkes wrote:
>>
>>> I think separating on by dir to get a distinction between root/user
>>> accessible libraries won't work, like if I compile pd in ~/newest-
>>> vanilla/
>>> and search for "included" libs. (Plus MacOS/Win/GNU-Linux
>>> distinctions...)
>
>
>>
>>
>> e.g., everything in /path/to/pd/bin/../extra would be
>> "included",
>> whereas everything in /home/${USER}/ would be
>> user-installed.
>
> well, the trick was not to look at the permissions of the directory.
> but of course you are right, that the full path should not be the only
> means for discrimination.
> my original example noted /path/to/pd/ which of course could
> resolved to
> /home/me/newest-vanilla/
>
> what makes things worse, is that for different instances of Pd, the
> term
> "included" and "user-installed" might get swapped.
>
>
> e.g.
> $ ~/pd-0.43/src/pd -path ~/pd-0.42/src/extra
> would use the not-included-in-pd-0.43 [expr~] from pd-0.42,
In Tcl space, there are different variables to tell you this, and
they'll work cross-platform, and should work cross-installation (i.e.
in ~/newest-vanilla.) From pd-gui.tcl:
# root path to lib of Pd's files, see s_main.c for more info
set sys_libdir {}
# root path where the pd-gui.tcl GUI script is located
set sys_guidir {}
# user-specified search path for objects, help, fonts, etc.
set sys_searchpath {}
# hard-coded search patch for objects, help, plugins, etc.
set sys_staticpath {}
.hc
>> i would probably find it more convenient, if there was a
>> simple way to
>> see the full path of a certain object.
>> i can then figure out myself, whether this is
>> user-installed or
>> system-installed, and it helps me discriminate between
>> multiple entries
>> of the same name.
>>
>>> Could probably do a firefox style status bar to show the path when
>>> the
>>> mouse hovers over the respective link (otherwise it's pretty ugly
>>> if it's
>>> just in the search results for each result).
>
> yes something like this.
> i originally thought of using tooltips, but tried to avoid giving any
> specifics.
>
>>
>>> Do you think the path is needed in the search results for any
>>> reason other
>>> than to resolve ambiguity between the same library being system-
>>> installed
>>> and user-installed at the same time? I mean, if someone just
>>> wants to
>>> know whether the object described by cyclone/foo-help.pd is
>>> system- or
>>> user-installed, they just click on the link and see the path is at
>>> the top
>>> of the help patch window.
>
> well, the search results could be made anonymous buttons, since the
> user
> will see what they selected as soon as the patch opens anyhow.
>
> it's mainly about convenience, and if i know that the system-installed
> patch is sure to crash my installation, then i probably want to know
> beforehand.
>
> fgmasdr
> IOhannes
>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
----------------------------------------------------------------------------
I hate it when they say, "He gave his life for his country." Nobody
gives their life for anything. We steal the lives of these kids. -
Admiral Gene LeRocque
More information about the Pd-dev
mailing list