On 14.11.2024 14:05, IOhannes m zmoelnig wrote:
On 11/14/24 13:56, IOhannes m zmoelnig wrote:
i don't really see why we cannot consider sending a message to a
global receiver to be part of the API, at least for procedures that
do not return anything.
Because this is not idiomatic. I really don't want to assemble a Pd
message just to make an API call.
and on re-thinking, you can of course just use send messages directly
to the GUI:
```C
pdgui_vmess("load_plugin", "ss",
"helloworld-plugin", class_gethelpdir(helloworld_class));
```
That would be better because at least it's now clear that it's a GUI
message and we could have a place to document all GUI commands.
>> You just hit another downside of Pd messages: no opportunity for error
>> handling
and come to think of it: in this specific case (loading GUI-plugins),
there's no way to do error checking anyhow, as the actual loading is
done asynchronously in a different process.
i'm not proposing to replace all C API calls with Pd messages.
i'm not even suggesting that /in the future/ we should strive to use
Pd messages rather than C function calls.
i just think the Pd message is an appropriately simple solution that
can be used by both abstractions and externals.
And I think we shouldn't even start with it because IMO it would create
an awkward split in the API (C functions vs. Pd messages)
ghmadsf
IOhannes
---
pd-dev@lists.iem.at - the Pd developers' mailinglist
https://lists.iem.at/hyperkitty/list/pd-dev@lists.iem.at/message/DRA6TX5PXVFWOX22PPT2AKGUB5IS4BLF/
---
pd-dev@lists.iem.at - the Pd developers' mailinglist
https://lists.iem.at/hyperkitty/list/pd-dev@lists.iem.at/message/H4SJ3OCPZBMDROOYDKV5WVIQ2Q3URYXT/