microsoft / WinObjC

Objective-C for Windows
MIT License
6.24k stars 808 forks source link

In UIAlertView.mm the number of buttons is hardcoded to 16 #1614

Open edvv opened 7 years ago

edvv commented 7 years ago

Dear WinObjC Engineers,

In UIAlertView.mm the number of buttons is hardcoded to 16:

ActionButton _buttons[16];

and there is no check on this limit when adding buttons so adding over 16 throws an exception.

Sincerely,

Ed

tadam-msft commented 7 years ago

@edvv, thanks for logging this issue. The intent was to limit it to 16 buttons, is the limit blocking you?

edvv commented 7 years ago

@tadam-msft It is not blocking, a workaround is done. UIAlertView is just a stopgap measure to deal with the lack of UIAlertController and lack of other UI elements. They both suffer from a lack of features (even on the iPad).

You might want to at least put a check for the 16 limit (and perhaps a log statement) so that it doesn't throw a memory exception.

tadam-msft commented 7 years ago

Agreed

From: Ed VanVliet [mailto:notifications@github.com] Sent: Wednesday, January 4, 2017 9:54 AM To: Microsoft/WinObjC WinObjC@noreply.github.com Cc: Terry Adams Terry.Adams@microsoft.com; Mention mention@noreply.github.com Subject: Re: [Microsoft/WinObjC] In UIAlertView.mm the number of buttons is hardcoded to 16 (#1614)

@tadam-msfthttps://github.com/tadam-msft It is not blocking, a workaround is done. UIAlertView is just a stopgap measure to deal with the lack of UIAlertController and lack of other UI elements. They both suffer from a lack of features (even on the iPad).

You might want to at least put a check for the 16 limit (and perhaps a log statement) so that it doesn't throw a memory exception.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/WinObjC/issues/1614#issuecomment-270438150, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUXHkE7QawrOoYB-yvJF_BxdMSm2VHFHks5rO9y4gaJpZM4LZywQ.