On 20.10.2024 14:35, jyg@gumo.fr wrote:
Do you think it would be acceptable if we could let the [pointer] object store the canvas to which the glist is referring, even when the referring scalar has been deleted ?
First off, glist and canvas are the same thing.
In theory, [pointer] *could* obtain the head of the owning glist of an invalidated gpointer, as long as the stub hasn't been cut off (i.e. the glist hasn't been deleted). This could be a new method, e.g. "glist", maybe with an extra argument to specify whether invalidated pointers should be considered or not.
Personally, I find it hard to imagine a use case, though. If you want to update all [pointer] objects after a scalar has been deleted, this is likely done from a central place, so I don't see why you can't just store the canvas name.
This way, we should be able to send messages to the canvas (using send-window message), without the need to explicitly know what is the canvas name ...
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/GBSW4MIIFS...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/