rthornton128 / goncurses

NCurses Library for Go
Other
383 stars 51 forks source link

Fix menu driver arg type #54

Closed rthornton128 closed 4 years ago

rthornton128 commented 4 years ago

Setting the type of the value in a const only propagates its type when using iota. When manually setting each value, the type needs to be explicitly specified. This means the MenuDriverReq type only applied to REQ_LEFT and none of the other constants.

Additionally, the menu driver method took in a generic integer value. This allowed any of the menu driver options to be passed in except REQ_LEFT. It should accept only valid menu request values.

Fixes #53