On Jan 18, 2010, at 12:44 PM, [email protected] wrote:

Selon Hans-Christoph Steiner <[email protected]>:


sys_gui.c.  That code is pretty simple. I think you could do it by
appending something like "; pdsend "#sys_gui-receiver bang" to every
command sent, then bind to the receiver name "#sys_gui-receiver" to
get that bang.

attached diff should be this binding method but it doesn't work, the bang is
sent
before tcl is done; why attached patch works? (it bangs after tcl command is
done), the only difference is that the send command is trigged.

pc

<sys_gui-send-bang.diff><createDir.pd>

Ah, the error came from [textfile] not wanting to write an empty file. This works for me with your unchanged C code:

Attachment: createDir.pd
Description: Binary data




For the outlet, I would bind to a unique receive symbol generated from the pointer to the instance of the sys_gui object, then use that receive to send the bang in Tcl, receive it in C, then output it out the outlet:

 sprintf(buf,"#%lx", (long unsigned int)x);


.hc

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

News is what people want to keep hidden and everything else is publicity. - Bill Moyers


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to