Feature Requests item #3525910, was opened at 2012-05-11 10:32
Message generated for change (Tracker Item Submitted) made by jancsika1
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478073&aid=3525910&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Jonathan Wilkes (jancsika1)
Assigned to: Nobody/Anonymous (nobody)
Summary: Load patches as libs like _float_array does

Initial Comment:
Example of problem:

For me, [struct foo] is analogous to foo_class in an external-- that is, when 
you instantiate an object that is an external, it doesn't have to generate and 
compile new source code with 1001foo_class in it.  Rather it just allocates 
memory for all the stuff that class needs, and deallocates when you remove that 
object.  That corresponds to creating/deleting a scalar on a canvas.

So instead of [struct $0-foo], which is ugly and a hack, you should be able to 
do this:
1. Put [import bar] in your abstraction or whatever
2. In directory "bar" have bar_setup.pd, which contains [struct foo]
3. Pd searches its loaded libs to see if library "bar" has been loading; if it 
hasn't, it loads the patch bar_setup.pd without giving it a tk window (so that 
exactly one instance of [struct foo] exists now
4. You're abstraction loads and is able to instantiate scalar foo regardless of 
$0
5. For loading additional abstractions that use scalar "foo" go to step #1 and 
it should work.

Of course this runs into the same problems with namespace clashes as externals 
do, but probably has the same solutions, too.  This would also work for libs of 
abstractions that want to share a common [v] or a [table]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478073&aid=3525910&group_id=55736

_______________________________________________
Pd-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/pd-dev

Reply via email to