Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18860] Windows: Introduce Nullable templated type in TitaniumKit APIs

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-05-21T12:18:56.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2015-04-29T18:45:05.000+0000
Updated2017-03-16T21:50:27.000+0000

Description

We have no notion of "null" primitive values. This is problematic when we have special arguments/parameter structs like MatrixCreationDict. It's also problematic if we want to check if a property has never been assigned a value (say color, on an animation). We can use "default" values and check for those (such as empty string), but for double/int32_t, uint32_t that's often more problematic. We want to explicitly know if the user gave a 0/-1/whatever versus never having set a value. There's the boost:optional type we could use, or we could simply make our own type.

Comments

  1. Kota Iguchi 2015-05-19

    Sounds like that's a right place for boost::optinal. Is there any possible issues/concerns for it?
  2. Christopher Williams 2015-05-19

    [~kota] I think boost::optional looks good enough to use. No reason to re-invent the wheel if they already have it and we already have a dependency on boost.
  3. Christopher Williams 2015-05-20

    https://github.com/appcelerator/titanium_mobile_windows/pull/245
  4. Lee Morris 2017-03-16

    Closing ticket as the issue has been fixed.

JSON Source