microsoft / WinObjC

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

delegate "textField:shouldChangeCharactersInRange:replacementString:" not called #1572

Open edvv opened 7 years ago

edvv commented 7 years ago

Dear WinObjC Engineers,

delegate "textField:shouldChangeCharactersInRange:replacementString:" not called

It is not in: UITextField.mm

See also: https://github.com/Microsoft/WinObjC/issues/555

Sincerely,

Ed

tadam-msft commented 7 years ago

Can you explain the scenario that you are using the API for. Is it possible to workaround this by subscribing to the TextChanging event on the underlying XAML TextBox?

edvv commented 7 years ago

@tadam-msft It is being used to mark when text has changed for the purpose of a later commit if the mark has changed (is true). I suppose a XAML event processing token can be installed for this purpose. But, it seems that is something that a framework designer and/or developer (Microsoft) would want to do and it should not be done at the app level. I mentioned this issue, in a larger context, to Raj and Arnaud already on 2/8/2017. The workaround here for this present issue is to simply commit every time; but yeah, we are already installing XAML event tokens for other things so that can probably be done in this case as well.