electrickery / pd-tof

Collection of control and signal objects by Thomas Ouellet Fredericks, previously part of Pd-extended
Other
5 stars 0 forks source link

[pmenu] doesn't always display all items in list #4

Open dfkettle opened 3 years ago

dfkettle commented 3 years ago

When displaying a menu with a large number of items (more than can fit in the first 2 columns), not all the items are displayed. However, if I add a [max_column_height( message before loading the menu, then all items will be displayed. The help file states that the first column defaults to 30 items and the 2nd. column is unlimited. (This isn't exactly true, it's limited by the vertical screen resolution.) The problem is that it doesn't display a 3rd. column for the remaining items, unless you send it a [max_column_height( message first. I've attached a patch to test with, along with a data file.

Image1 pmenu-bug.zip

dfkettle commented 3 years ago

P.S. I'm running v0.2.4 of tof, installed with Deken, under Pd 0.51.2 (64-bit) and Windows 7 Home Premium (64-bit).

electrickery commented 3 years ago

Hi David,

Thanks for testing and the report. This is the intended behaviour, the first case the original, pre-0.2.4 behaviour and the latter the 0.2.4 behaviour. The plan was to be backward compatible, I'm not sure this makes sense. But apparently it isn't documented properly.

Greetings,

Fred Jan

When displaying a menu with a large number of items (more than can fit in the first 2 columns), not all the items are displayed. However, if I add a [max_column_height( message before loading the menu, then all items will be displayed. The help file states that the first column defaults to 30 items and the 2nd. column is unlimited. (This isn't exactly true, it's limited by the vertical screen resolution.) The problem is that it doesn't display a 3rd. column for the remaining items, unless you send it a [max_column_height( message first. I've attached a patch to test with, along with a data file.

Image1 https://user-images.githubusercontent.com/8409615/106499762-fc8a7c80-648e-11eb-9d2d-9960946c6dfc.jpg pmenu-bug.zip https://github.com/electrickery/pd-tof/files/5905777/pmenu-bug.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/electrickery/pd-tof/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACXYQ7N7XMF77LB5YRWS5TS43VPJANCNFSM4W5HTMWQ.

dfkettle commented 3 years ago

So it won't be fixed? At the very least, the help file should be more clear on this behaviour. You're right, it doesn't make any sense. Just because I let the size of the first column default to 30, it won't display all the items?

electrickery commented 3 years ago

It will even make less sense, but the current situation is the fix. Before 0.2.4 there was only the first situation.

Please keep in mind this is a menu line object. A 60+ menu doesn't sound reasonable to me.

Greetings, Fred Jan

dfkettle commented 3 years ago

OK, I won't argue with that, although the use case I have in mind is a menu of up to 128 items representing MIDI percussion instruments. General MIDI defines percussion instruments from 27 to 87 inclusive (ie, 61 different values), but there could be up to 128 different values.

Anyway, all I ask is that you update the help file for [tof/pmenu] to warn users about this "intended behaviour", so they won't waste their time trying to figure it out, like I did. The help file makes no mention whatsoever about this "intended behaviour". Specifically, it says:

"Set the maximum height of the list. Every time this value is reached, a new column wil be started. The default behaviour (one 30 item column, second unlimited) is value 0 The setting is intended to be used before adding items." (emphasis added)

This implies, I think, that the number of items in a menu is unlimited, doesn't it?

Image2