[PD] multiple instances of a patch forbidden in 0.49, why?

Miller Puckette msp at ucsd.edu
Sun Sep 23 22:32:48 CEST 2018


actually, it's probably not a serious problem that one can multiply open help
files (if one really wants to), so probably it's not worth fixing this.

On the other hand, a naive user on a Mac would expect that clicking on a
file in the "finder", if Pd already has the file open, would show the user
the open file instead of opening another copy.

Supposing the "open" menu called "pd open" with the third nonzero argument,
but if "pd open" acted as it does now so that one could programmatically
open multiple copies of a patch, would this permit you to do what you're
planning?  (I think that this would be patch-level back compatible).

cheers
Miller

On Sun, Sep 23, 2018 at 11:52:54AM +0200, katja wrote:
> Thanks Miller for this quick yet powerful fix.
> 
> It currently operates on patches as opened from the window menu. Help
> patches can still be opened more than once from the contextual menu. I
> verified that this can be fixed by calling glob_open() instead of
> glob_evalfile() from open_via_helppath() in s_path.c:
> 
> glob_open(0, gensym((char*)basename), gensym(dirbuf), (t_floatarg)1);
> 
> However to make it work, the prototype of glob_open() must be declared
> when compiling s_path.c, otherwise the float argument is not passed
> correctly for some reason (while the file and dir name are, isn't that
> odd?)
> 
> Katja
> 
> On 9/23/18, Miller Puckette <msp at ucsd.edu> wrote:
> > Well, I ended up simply reverting to the old behavior but leaving a hook in
> > so that users can specifically ask only to open a patch once.
> >
> > cheers
> > M
> >
> > On Sun, Sep 23, 2018 at 12:10:01AM +0200, Antoine Rousseau wrote:
> >> Yes I realized that. So it should be something more specific.
> >> Why not a wider scope object, like [pdconfig], that would take "once" as
> >> an
> >> argument?
> >>
> >> Antoine Rousseau
> >>   http://www.metalu.net <http://metalu.net> __
> >> http://www.metaluachahuter.com/
> >> <http://www.metaluachahuter.com/compagnies/al1-ant1/>
> >>
> >>
> >>
> >> Le sam. 22 sept. 2018 ?? 23:55, Roman Haefeli <reduzent at gmail.com> a
> >> ??crit :
> >>
> >> > On Sat, 2018-09-22 at 23:29 +0200, Antoine Rousseau wrote:
> >> > > Of course [once] would be much better than [lock]....
> >> >
> >> > [once] is taken by iemlib. Not that I think every library in existence
> >> > should be considered regarding name conflicts when introducing new
> >> > objects to Pd, but I feel that [once] is in wide use and adding a
> >> > [once] with totally different behavior would be a bold move.
> >> >
> >> > Roman_______________________________________________
> >> > Pd-list at lists.iem.at mailing list
> >> > UNSUBSCRIBE and account-management ->
> >> > https://lists.puredata.info/listinfo/pd-list
> >> >
> >
> >> _______________________________________________
> >> Pd-list at lists.iem.at mailing list
> >> UNSUBSCRIBE and account-management ->
> >> https://lists.puredata.info/listinfo/pd-list
> >
> >
> >
> >
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> > https://lists.puredata.info/listinfo/pd-list
> >
> 
> 
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list