Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20222

Windows: Error while createcollection on Windows Phone

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 5.3.0
    • Component/s: Windows
    • Environment:
    • Story Points:
      8
    • Sprint:
      2016 Sprint 3 SDK

      Description

      I create a simple alloy app project but in my alloy.js if i put this line

      Alloy.Collections.category = Alloy.createCollection('category');
      

      when the app starts I see in the console this error

      [ERROR] :  Application Error: {
      [ERROR] :    "line": 2,
      [ERROR] :    "column": 10,
      [ERROR] :    "message": "Error while require(/app) Error while require(alloy/models/Category) unknown exception",
      [ERROR] :    "native_stack": [
      [ERROR] :      "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction"
      [ERROR] :    ]
      [ERROR] :  }
      

      everything works if a run the app on Android and iOS, but it crash if i run it in Windows Phone Simulator.
      This is my model category.js

      exports.definition = {
      	config: {
      		columns: {
                  "id": "INTEGER PRIMARY KEY AUTOINCREMENT",
                  "name": "TEXT",
                  "counter": "INTEGER",
                  "default_image": "TEXT"
              },
              defaults: {
                  "name": "TEXT",
                  "counter": "INTEGER",
                  "default_image": "TEXT"
              },
      		adapter: {
      			"type": "sql",
      			 "tablename": "category",
      			"collection_name": "category",
      			"db_file": "/db.sqlite",
      			"db_name": "category",
      			"idAttribute": "id",
      			"remoteBackup": false
      		}
      	},
      	extendModel: function(Model) {
              _.extend(Model.prototype, {
                  // extended functions and properties go here
              });
       
              return Model;
          },
          extendCollection: function(Collection) {
              _.extend(Collection.prototype, {
                  // extended functions and properties go here
              });
       
              return Collection;
          }
      };
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                AlbWebbergate Alberto Bonacina
                Reviewer:
                Gary Mathews
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20844
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code