Bugs item #2985017, was opened at 2010-04-10 09:40 Message generated for change (Settings changed) made by irmaosaturno You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2985017...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: externals Group: v0.41 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Paulo Casaes (irmaosaturno)
Assigned to: B. Bogart (bbogart) Summary: popup not working in windows (with workaround)
Initial Comment: Ben Bogart's popup is not working properly in windows (PD-Extended 0.41).
It loads fine but it does not output a selection nor does using its inlet work to change its selection. Whenever you try to do so it gives the error: error: popup0xa4fda0: no such object
I tracked the problem down and it seems that in windows TK doesn't like it when the pointer reference in hex starts with 0x. This might actually be a problem with the TK provided in the windows version and not with popup itself. In Linux and OS X the reference has 0x in it and works just fine.
Here's a workaround that fixes the problem. diff popup.c popup.c.orig 596,599d595 < #ifdef NT < char buf2[256]; < char *buf2ptr; < #endif 646,654d641 < #ifdef NT < sprintf(buf2,"%p",x); < buf2ptr = &buf2; < if(strstr(buf2, "0x") == buf2ptr) { < buf2ptr++; < buf2ptr++; < } < sprintf(buf,"popup%s",buf2ptr); < #else 656d642 < #endif 661,663d646 < #ifdef NT < sys_vgui("proc popup_sel%x {index} {\n pd [concat popup%s output $index \;]\n }\n",x,buf2ptr); < #else 665c648 < #endif ---
Changes only in the popup_new function. It uses the NT preprocessing directive, in Linux and OS X it should remain unchanged. Basically it tests the pointer for 0x and removes it.
Paulo
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2985017...