Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ManagedObject: properties awaiting function should have type: "function" instead of type: "any" #1908

Closed
11 tasks done
boghyon opened this issue Feb 21, 2018 · 4 comments
Closed
11 tasks done

Comments

@boghyon
Copy link
Contributor

boghyon commented Feb 21, 2018

Since 7f32a36 & 860805d, it is possible to define "function" as a type of property. However, many modules, derived from ManagedObject, still use the type "any" whereas a function is awaited.

It would be nice if they adapt to the "new" type so that at least the API Reference can display the type correctly.

sapui5 openui5 type any

URL (minimal example if possible):

... Probably more (didn't check closed sourced modules)

What is the expected result?

type: "function" if applicable.

What happens instead?

type: "any"

@gerym
Copy link
Contributor

gerym commented Mar 28, 2018

Hello @boghyon ,

Thank you for sharing this finding. I've created an internal incident 1870103964 and the colleagues will comment here in GitHub if the change is possible.

Regards,
Gery

@codeworrior
Copy link
Member

I considered to adapt those controls when I introduced the type function but the problem was strict compatibility. Type any allows values other than functions and the control implementations either might have validated on their own and thrown an exception (then using 'function' would be okay). Or they might have tolerated and ignored non-function values. Then the type is not easily usable or at least requires a deeper analysis of the potential impact.

That doesn't mean it can't be done, but we have to leave the decision up to the control owners.

@jdichev
Copy link
Contributor

jdichev commented Apr 17, 2018

Hi,

I checked the respective controls as (co-)owner/author of involved code in Dialog, MessageView and MessagePopover. The discussed change should have already be done - we were just not aware of the new API.

Type 'any' is there for historical reasons and used only because of no better alternative at the time of implementation.

Best regards,
Jordan

@boghyon boghyon changed the title ManagedObject Properties Awaiting a Function Should Have type: "function" Instead of type: "any" ManagedObject: properties awaiting function should have type: "function" instead of type: "any" Sep 2, 2022
@flovogt
Copy link
Member

flovogt commented Sep 6, 2022

Internal incidents are created

  • sap/m/MessageView: 2270115809 by 32e2e17
  • sap/m/MessagePopover: 2270115810 by 32e2e17
  • sap/m/Input: 2270115891 by 32e2e17
  • sap.ui.table.AnalyticalColumn: 2270115892 by 219630c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants