{ "id": "167311", "key": "TIMOB-24628", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-04-27T08:33:31.000+0000", "created": "2017-04-26T04:05:19.000+0000", "epic": { "id": 162541, "key": "TIMOB-23765", "name": "Hyperloop for Windows", "summary": "Windows: Direct API Access not working ", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "Medium", "id": "3" }, "labels": [ "hyperloop" ], "versions": [ { "id": "19101", "name": "Hyperloop 2.1.0", "archived": false, "released": true, "releaseDate": "2017-04-28" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-04-27T08:33:31.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "On Hyperloop Windows, there's no way to handle collections with generics like {{IList}}.\r\n\r\n{code:title=C++/CX}\r\nPlatform::Collections::Vector^ vec = ref new Platform::Collections::Vector();\r\nvec->Append(1);\r\nvec->Append(2);\r\n{code}\r\n\r\n{code:title=C#}\r\nSystem.Collections.Generic.List vec = new System.Collections.Generic.List();\r\nvec.Add(1);\r\nvec.Add(2);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Windows: Hyperloop Collections support with Generics", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "418087", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "You have an idea about the syntax? iOS doesn't support generics as well, but I'm wondering how we would map those.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-04-26T10:19:54.000+0000", "updated": "2017-04-26T10:19:54.000+0000" }, { "id": "418147", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Syntax-wise, It turns out we can create generic instance work by just specifying generic parameter in {{require}}.\r\n\r\n{code}\r\nvar List = require('System.Collections.Generic.List');\r\nvar vec = new List();\r\n{code}\r\n\r\nBut then {{vec.Add(123);}} fails now. So this ticket is for following issue. This might be a type conversion issue that is not related to generic type. We might want to change ticket description then.\r\n\r\n{code}\r\nSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> \r\nSystem.ArgumentException: The value \"123\" is not of type \"System.Int32\" and cannot be used in this generic collection.\r\nParameter name: value\r\n at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType)\r\n at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item)\r\n{code}", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-04-27T07:38:11.000+0000", "updated": "2017-04-27T07:38:57.000+0000" }, { "id": "418148", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "ok, confirmed that we already support this by TIMOB-24637 using {{cast}}. So I would close this.\r\n\r\n{code}\r\nvar List = require('System.Collections.Generic.List'),\r\n Int32 = require('System.Int32');\r\n\r\nvar vec = new List();\r\nvec.Add(Int32.cast(1));\r\nvec.Add(Int32.cast(2));\r\nvec.Add(Int32.cast(3));\r\n\r\nalert(vec.Count);\r\n{code}", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-04-27T08:33:31.000+0000", "updated": "2017-04-27T08:33:31.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }