[AC-135] Accessing controllers inside folders in Alloy using <Require src> causes problems in runtime
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-13T18:53:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Studio |
Labels | n/a |
Reporter | Eric Cheung |
Assignee | Shak Hossain |
Created | 2015-05-22T22:17:36.000+0000 |
Updated | 2015-11-13T18:53:31.000+0000 |
Description
I'm trying to build a simple Alloy App with a folder structure inside the views/styles/controllers, for organization purposes..
{{app
- controllers
- - folder
- - - somecontroller.js
- styles
- - folder
- - - somecontroller.tss
- views
- - folder
- - - somecontroller.xml}}
In the XML, when using a to refer to a controller, this seems to cause an error when I run the app. The app returns the error on runtime:
[ERROR] : Script Error Couldn't find module: alloy/controllers/folder/somecontroller for architecture: arm64
If I take the folder structure out of the views/styles/controllers and leave the .xml/.tss/.js in the top level folders, change the path of the app runs fine.
It seems like when building the app, the files inside the folders are not included.
Attachments
Hello [~echeung@leviton.com] can you please attach a test case?
Attached is the sample source files with a /windows inside /views, /styles and /controllers. Two controllers were created: mainwindow and helpwindow index.js contains a tab group with 2 tabs. The tabs are loading the window via
Attached is the sample source files without a subfolder inside /views, /styles and /controllers. Two controllers were created: mainwindow and helpwindow index.js contains a tab group with 2 tabs. The tabs are loading the window via
The screenshot of the iOS simulator running the app with the
The screenshot of the iOS simulator running the app with the
I'm having the same issue when running my app on the iPhone 6. Surprisingly, I'm able to successfully run the app using the iOS Simulator - iPhone 6. My app is an Alloy app with view/models/controllers in a folder structure under app.
Hello, Tested this issue. This is not a valid bug, working expected in the simulator. *Test Environments:* CLI Version :4.1.3 Titanium SDK Version:4.1.1.GA Simulator:iPhone 6,iOS SDK: 8.2 Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 Alloy: 1.7.6 Mac OS X,Version = 10.10.1 *Test Steps:*
Copy customer’s code to app directory.
Go to *app>controllers>Rename the Windows folder* as *tests*
Repeat step 2 for views and styles folder.
Run Project.
*Test Code:* *index.xml**index.js*
*mainwindow.xml*:
*helpwindow.xml*:
*Test Result:* [Project | http://i57.tinypic.com/rs6ept.png] is running successfully without any error. Here is console log:
Thanks
As Rob experienced, It seems like I was able to get it working on the iOS simulator. But on an actual device (iPhone 5S) It does not work. Please change the test case to use an actual device.
Tested on actual device and it works as per details below. *Test Environments:* CLI Version :4.1.3 Titanium SDK Version:4.1.1.GA, Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 Alloy: 1.7.6 Mac OS X,Version = 10.10.1. Device:iPad,iPod 5G *iPad logs:*
*iPod 5G logs:*
Thanks