Hi Johannes,
I will not have a chance to look at your changes until I get back from vacation and start getting my new linux machine going.
Comments inline.
IOhannes m zmoelnig wrote:
hi ben, hi list
i just checked your [popup], like it and have submitted several (imo) improvements to the CVS. namely:
- no restriction for max# of "options"; this might be not very
interesting (as on my machine i can only display 40 options at one time, so 100 seems to be sufficient anyhow) BUT i added additionally checks whether the max# has been exceeded; this keeps [popup] from segfaulting when you have more than 100 options
This sounds good to me. Are you doing some dynamic memory allocation to make this work?
- using a mixture of user-defined and default values if you provide less
than 5 arguments (i thought that 5 args are a bit much to remember)
Any type checking to guess what arguments are what? 5 Arguments is indeed a lot. I'm actually hoping that one day PD will have a nice GUI API that includes the iemgui (or something similar) "inspector" window to change properties (like font, bg and fg colour etc..)
- removed the "loadbang"-constraint (you can now add options and select
entries before the object has been drawn the 1st time)
Ah, how did you make this work? When I tried to send a loadbang to set a value it would always segfault. :( I could not figure out why and so added the funny bang thing, yes this is an ugly hack. Thanks a lot for fixing that, indeed beyond my debugging skill!
since i only tested it on linux, it would be great if somebody could tell me what i've broken...
I'll get on it as soon as a can... busy week.
but i have some questions:
- why are there 2 inlets ? i noticed you uncommented the
class_addsymbol()-method, so it seems like there is some reason for not using the 1st inlet for both numeric and symbolic selection of elements.
This is a design idea, the left side is "float" space and the right side is "symbol" space. I thought two inlets made things more visual sense when there are two outlets. So no there is no technical reason here, aesthetic.
- even more puzzling: why are there 2 outlets ?
for clarification, i don't have any problems with separate outlets for typfixed outlets (1 for numeric indices and 1 for symbolic names), but you are using the first outlet for 2 types (float vs. bang) so you somehow need a route to segregate those types. i would've suggested using either 1 outlet (with either ("bang" and "float" and "symbol") or ("bang" and "list")
As said above the bang is a hack and was not part of the original design. I don't want it! So your right that the idea was to have a separate float only and symbol only outlets.
since now the "loadbang" seems to work, could the "bang" output be removed ? (i find it rather annoying that everytime i switch console (this is: unhide the window), a bang is emitted.
yes yes yes, let me test to make sure it works on my machines.
but i guess, this would break a lot of patches....
Hmmmm, maybe not so many. The suggest "route" usage would mean the lack of a bang would be ignored. What would be missing is the signal to set the value in some "loadbang" cases. Now is probably better to change this than later! I think since so few people complained about the load-bang segfault that most people are not using popup with default values.
Thanks for the contributions Johannes! :)
B>
mfg.as.dr IOhannes
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev