I agree. If you just need access to the popup menu, you can support both old versions and the new global popup by first checking the pd version or available of .popup (ie. check if it exists) and use the one available to the version. There are various examples of this in the Pd tcl sources, ie. checking Tcl/Tk versions or checking if a name or variabel exists before creating or trying to use it, etc.
I also agree about the issue: it's likely the plugin may be trying to grab stuff that just isn; y there yet. I would move part of this setup stuff to something later in the process, ie. perhaps a lazy-creation proc which gets the plugin popup reference and sets the value from the global instance if it doesn't exist yet.
On May 15, 2023, at 10:08 AM, pd-dev-request@lists.iem.at wrote:
So, I'm not sure I get it but I'm assuming this won't be an issue in the next version, right? Please confirm.
what would "not be an issue"? with Pd-0.54 the ".popup" will not be created any more at all, so if your code depends on such an item, it will fail. otoh, Pd-0.54 will replace the ".popup" with a window-specific "${win}.popup". this window-specific item will not be created until the window is created, so if your code depends on such an item to exist at startup time, it is likely to fail as well.
-------- Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Thanks, I assume there are ways to workaround it, but with my limited time and knowledge I'll just adapt the code to what's easier to me (tell students and people to add 'else' to the path) and wait til 0.54 is out where it seems that it'll just work. I will probably fail a lot in my attempts and keep bugging you people til I get it right :)
cheers
Em seg., 15 de mai. de 2023 às 12:29, Dan Wilcox danomatika@gmail.com escreveu:
I agree. If you just need access to the popup menu, you can support both old versions and the new global popup by first checking the pd version or available of .popup (ie. check if it exists) and use the one available to the version. There are various examples of this in the Pd tcl sources, ie. checking Tcl/Tk versions or checking if a name or variabel exists before creating or trying to use it, etc.
I also agree about the issue: it's likely the plugin may be trying to grab stuff that just isn; y there yet. I would move part of this setup stuff to something later in the process, ie. perhaps a lazy-creation proc which gets the plugin popup reference and sets the value from the global instance if it doesn't exist yet.
On May 15, 2023, at 10:08 AM, pd-dev-request@lists.iem.at wrote:
So, I'm not sure I get it but I'm assuming this won't be an issue in the next version, right? Please confirm.
what would "not be an issue"? with Pd-0.54 the ".popup" will not be created any more at all, so if your code depends on such an item, it will fail. otoh, Pd-0.54 will replace the ".popup" with a window-specific "${win}.popup". this window-specific item will not be created until the window is created, so if your code depends on such an item to exist at startup time, it is likely to fail as well.
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com robotcowboy.com