-
-
Notifications
You must be signed in to change notification settings - Fork 136
Missing constants from TS definitions and runtime for android #235
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
From @PeterStaev on September 30, 2015 12:27 Seems not only the definitions are missing but also the android runtime is missing support for those constants. Learned it the hard way, spending couple of hours trying to make a simple contact add code to work... Ended up adding local constants with the correct string values for each of those |
This is a tricky gotcha in the Runtime. Constants that are not declared by a class itself but come from an implemented interface are exposed through that interface, not the type that implements it. Additionally, in this particular case, the constants are declared in Here is what I mean:
So, the constant should be available through the
BUT - it is currently not, because the As for the definitions - we are currently revisiting the generator tool and these should be available in the new version. |
A partial fix will be available for 1.5: #236. The constants will still not be available on the implementing type but will be visible on the declaring one. |
Just encountered this today as well... wish I would have seen the issue sooner :) |
This comment was marked as abuse.
This comment was marked as abuse.
the problem with metadata is solved, and all that remains is the d.ts generation. The issue for the d.ts: #104 |
From @PeterStaev on September 29, 2015 16:21
I'm writing some code to save a new contact and noticed that the following constants seems to be missing from the .d.ts:
Copied from original issue: NativeScript/NativeScript#850
The text was updated successfully, but these errors were encountered: