Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19593] Windows: Track native API wrapper conversion objects

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionWon't Do
Resolution Date2016-11-04T06:42:57.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2015-09-28T17:12:50.000+0000
Updated2017-03-21T20:34:41.000+0000

Description

We automatically will wrap/unwrap native UI elements to interact with Ti.UI.View and its subclasses. The issue is that we dynamically unwrap the native Windows.UI.Xaml.UIElement and then wrap it in a special subclass of Ti.UI.View without tracking the two objects. So if we say add a native TextBlock to a Ti.Ui.Window - that will generate a one-time dynamic Ti.Ui.View to wrap the TextBlock. If we make other calls that require converting, we'll generate a _new_ converted Ti.UI.View rather than re-use the previously generated one.
win.add(textblock); // will auto convert the TitaniumWindows::UI::Xaml::TextBlock to a TitaniumWindows::UI::View holding the same underlying Windows::UI::Xaml::TextBlock object.
win.remove(textblock); // This likely won't work. We'll generate _another_ dynamic TitaniumWindows::UI::View object rather than lookup the one we generated above.
// We'd probably have to do:
// win.remove(win.children[win.children.length]);

Comments

  1. Kota Iguchi 2016-11-04

    Resolving this ticket for now because it is obsolete, since we're moving to reflection-based Hyperloop implementation as of TIMOB-23765.

JSON Source