<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/29/2015 11:04 AM, Dan Wilcox
wrote:<br>
</div>
<blockquote
cite="mid:82F16130-0DD4-433E-8355-57767FC12C0C@gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div>I guess so. I was just thinking, since you're in the middle
of working this out, that we/I could distill this wisdom into
libpd. I might be maintaining libpd right now but I don't have a
detailed understanding of the Pd source.</div>
<div><br>
</div>
<div>Are you mainly using gui_vmess? What else needs to be
wrapped?</div>
</blockquote>
<br>
gui_vmess just leverages sys_vgui to do the actual sending over the
socket. There's a lot going on in s_inter.c, but my approach is
that gui_vmess will replace all sys_vgui/sys_gui calls everywhere
else.<br>
<br>
For convenience, I also made an incremental wrapper that suits
things like garray data points and data structures. It looks like
this:<br>
<br>
gui_start_vmess("array_coords", "ss", canvas_tag, array_tag);<br>
gui_start_array();<br>
for (i = 0; i < array_length; i++)<br>
gui_f(array_coord[i]);<br>
gui_end_array();<br>
gui_end_vmess();<br>
<br>
I don't technically need it to be an array-- the interface could
instead send flat FUDI messages with the array coords tacked on to
the end. But I found that it's really nice to have the data arrive
to the GUI in a form that cordons off the array data. I stopped
short of just having it be JSON because that seemed like overkill
for the majority of cases where you're just sending a few positional
args.<br>
<br>
Anyhow, I've thought of that interface mainly as a stop-gap used to
make the garray and data-structure widgetbehavior intelligible. It
also helps with iemgui and other properties windows, where you can
have name/value pairs in an array of attributes rather than sending
a long list of positional args.<br>
<br>
-Jonathan<br>
<br>
<blockquote
cite="mid:82F16130-0DD4-433E-8355-57767FC12C0C@gmail.com"
type="cite">
<div><br>
enohp ym morf tnes<br>
<div>--------------</div>
<div>Dan Wilcox</div>
<div><a moz-do-not-send="true" href="http://danomatika.com">danomatika.com</a></div>
<div><a moz-do-not-send="true" href="http://robotcowboy.com">robotcowboy.com</a></div>
</div>
<div><br>
On Mar 29, 2015, at 10:54 AM, Jonathan Wilkes <<a
moz-do-not-send="true" href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 03/27/2015 02:55 PM, Dan
Wilcox wrote:<br>
</div>
<blockquote
cite="mid:AF77C038-EE7A-411A-AF35-818A9D9CCE37@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
You know, those could be added to libpd …</blockquote>
<br>
Do you mean as they currently exist in Pd-Vanilla? Unless
you're hooking them to tcl/tk I think that'd be of limited
value.<br>
<br>
My replacement API probably needs a few passes, though. Right
now it looks like this:<br>
<br>
gui_vmess("some_javascript_function_name", "sfiis",
"c-string", 98.6, 42, 42, "etc.");<br>
<br>
Looking at it now, it seems wrong. Maybe the format string
should come first, and that function name<br>
should just be the next string arg after that. An alternative
would be for the first arg to be a pointer to<br>
a Pd. (But then you'd have to send a 0 or dummy object for
messages to the running Pd instance.)<br>
<br>
One caveat is "s" here is a c-string and not a t_symbol* as it
is in pd_vmess. Also, I'd like to add a<br>
char to the format string for hex strings that representing
objects, but I'm not sure if that should be<br>
"x" or "p".<br>
<br>
-Jonathan<br>
<br>
<blockquote
cite="mid:AF77C038-EE7A-411A-AF35-818A9D9CCE37@gmail.com"
type="cite">
<div class=""><br class="">
<div class=""> --------<br class="">
Dan Wilcox<br class="">
@danomatika<br class="">
<a moz-do-not-send="true" href="http://danomatika.com"
class="">danomatika.com</a><br class="">
<div class=""><a moz-do-not-send="true"
href="http://robotcowboy.com" class="">robotcowboy.com</a></div>
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Mar 27, 2015, at 7:00 AM, <a
moz-do-not-send="true"
href="mailto:pd-list-request@lists.iem.at"
class="">pd-list-request@lists.iem.at</a> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="font-family: HelveticaNeue,
'Helvetica Neue', Helvetica, Arial, 'Lucida
Grande', sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal;
orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color:
rgb(255, 255, 255); float: none; display: inline
!important;" class="">Unfortunately, no. That's
the simple answer, as evidenced by the lack of
hooks in libpd for all the functionality inside
g_*.c.</span></div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br>
</div>
</blockquote>
</blockquote>
<br>
</body>
</html>