[TIMOB-18403] HAL: Create helper functions/macros for common property additions to classes
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-04-06T01:10:17.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Kota Iguchi |
Created | 2015-01-19T18:44:51.000+0000 |
Updated | 2017-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
https://github.com/appcelerator/titanium_mobile_windows/pull/202
Closing ticket as fixed.