Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18403] HAL: Create helper functions/macros for common property additions to classes

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-04-06T01:10:17.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterChristopher Williams
AssigneeKota Iguchi
Created2015-01-19T18:44:51.000+0000
Updated2017-03-16T22:30:59.000+0000

Description

Can't we come up with something like this:
JSExportFunction("UIModule","createScrollView");
This would generate:
JSExport<UIModule>::AddFunctionProperty("createScrollView", std::mem_fn(&UIModule::js_createScrollView));
Advantage is that we force a compile time pattern for the TitaniumKit defined interfaces and it's easier later if we want to change the pattern or add assertions or even compile this code out with our compiler because this method isn't used by the app. From Jeff's review comments here: https://github.com/sgtcoolguy/titanium_mobile_windows/commit/c2d07889a2ca6fbb4f689138252003838a42a7e6#commitcomment-9323249

Comments

  1. Kota Iguchi 2015-04-06

    https://github.com/appcelerator/titanium_mobile_windows/pull/202
  2. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source