Hello everyone, Over the weekend, I was "given" a huge lesson in both PD and humility...
Anyway, what this is is an example of how to create an inlet proxy object to handle arbitrary list input on a cold right inlet. It is something that was extracted from the 'x_list.c' source, and generalized to be just a raw object. The example is not a useful object, but illustrates how the C source framework is designed.
I posted the files to ( http://puredata.info/Members/mjmogo ).
Feedback is welcome and expected...
Mike
Nice ! Is your SQLite object fully implemented ? (thus usable)
a
2007/12/10, Mike McGonagle mjmogo@gmail.com:
Hello everyone,
Over the weekend, I was "given" a huge lesson in both PD and humility...
Anyway, what this is is an example of how to create an inlet proxy object to handle arbitrary list input on a cold right inlet. It is something that was extracted from the 'x_list.c' source, and generalized to be just a raw object. The example is not a useful object, but illustrates how the C source framework is designed.
I posted the files to ( http://puredata.info/Members/mjmogo ).
Feedback is welcome and expected...
Mike
-- Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal. —Yehudi Menuhin (1916–1999), musician _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 12/11/07, Alexandre Quessy listes@sourcelibre.com wrote:
Nice ! Is your SQLite object fully implemented ? (thus usable)
Well, we are still discussing how the interface in PD should work. The version that is posted currently is still just a preliminary. It does crash, but I can't figure out just why. But considering that we are still fleshing out how this will work, I figured I would start over with a fresh external. I hope to have something by the weekend.
Mike
Thanks for this, it looks like a nice, clean example of how to do
this. Very valuable. I'm sure I'll have questions about this stuff.
For example, right now I am in the process of figuring out how to
parse the object arguments for "?", then dynamically create an inlet
for each "?" it finds. I believe the standard is to use "??" as the
escape mechanism, so that has to be included as well in the parsing,
but that's not too hard.
I am thinking that one proxy class will be enough, then I just make
one instance of the proxy class for each "?" found, thereby making an
anything inlet for each SQL placeholder. I guess the proxy class
should include the pointers for making a linked list of proxy classes
to store all the instances.
I was trying to figure out how this is done in [expr], but that code
is super strange, so no luck yet. Anyone else have examples of
dynamically creating inlets in C based on object arguments?
.hc
On Dec 10, 2007, at 11:34 AM, Mike McGonagle wrote:
Hello everyone,
Over the weekend, I was "given" a huge lesson in both PD and
humility...Anyway, what this is is an example of how to create an inlet proxy
object to handle arbitrary list input on a cold right inlet. It is
something that was extracted from the 'x_list.c' source, and
generalized to be just a raw object. The example is not a useful
object, but illustrates how the C source framework is designed.I posted the files to ( http://puredata.info/Members/mjmogo ).
Feedback is welcome and expected...
Mike
-- Peace may sound simple—one beautiful word— but it requires
everything we have, every quality, every strength, every dream,
every high ideal. —Yehudi Menuhin (1916–1999), musician _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
Hans-Christoph Steiner wrote:
I was trying to figure out how this is done in [expr], but that code is super strange, so no luck yet. Anyone else have examples of dynamically creating inlets in C based on object arguments?
pdlua does this, the relevant functions in pdlua/src/lua.c are:
// the lua constructor calls this with object pointer and inlet count pdlua_object_createinlets(); // this initializes a proxy inlet pdlua_proxyinlet_init();
Source browseable here:
https://devel.goto10.org/filedetails.php?repname=maximus&path=%2Fpdlua%2...
Hans-Christoph Steiner wrote:
I was trying to figure out how this is done in [expr], but that code is super strange, so no luck yet. Anyone else have examples of dynamically creating inlets in C based on object arguments?
str_new() in mrpeach/str/str.c adds an extra inlet for some of its arguments, not proxy inlets though.
Martin