Skip to content

Instantly share code, notes, and snippets.

@carlosdelfino
Last active July 28, 2017 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosdelfino/808eaeb17c7f362e1a5e4f810257e8cc to your computer and use it in GitHub Desktop.
Save carlosdelfino/808eaeb17c7f362e1a5e4f810257e8cc to your computer and use it in GitHub Desktop.
Side Menu
var View = require("ui/core/view");
var SideMenu = (function(_super){
var SideMenu = function(){
_super.apply(this,arguments);
}
__extends(SideMenu, _super);
return SideMenu;
})(View);
module.exports = SideMenu;
<?xml version="1.0" encoding="UTF-8"?>
<grid-layout class="side-menu"
xmlns="http://schemas.nativescript.org/tns.xsd">
<stack-layout>
<label text="&#xf015; Início" id="home" tap="navigate" class="{{ selectedPage == 'home' ? 'selected' : '' }}" />
<label text="&#xf090; Identificar" id="login" tap="navigate" class="{{ selectedPage == 'login' ? 'selected' : '' }}" />
<label text="&#xf2bc; Cadastrar" id="register" tap="navigate" class="{{ selectedPage == 'register' ? 'selected' : '' }}" />
<label text="&#xf21e; ECG" id="ecg" tap="navigate" class="{{ selectedPage == 'ecg' ? 'selected' : '' }}" />
<label text="&#xf0c7; ECGs gravados" id="records" tap="navigate" class="{{ selectedPage == 'records' ? 'selected' : '' }}" />
<label text="&#xf0f9; Cardiologistas" id="doctor" tap="navigate" class="{{ selectedPage == 'doctor' ? 'selected' : '' }}" />
<label text="&#xf085; Configurações" id="settings" tap="navigate" class="{{ selectedPage == 'settings' ? 'selected' : '' }}" />
<label text="&#xf05a; Sobre" id="about" tap="navigate" class="{{ selectedPage == 'about' ? 'selected' : '' }}" />
</stack-layout>
</grid-layout>
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to start activity ComponentInfo{br.com.fullservice.MobileAPP.mobile.client/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onCreate failed
Error: Building UI from XML. @file:///app/pages/home/home.xml:35:7
> Module '/data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/widgets/menu' not found for element 'widgets/menu:SideMenu'.
> Unexpected identifier
File: "file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 195, column: 20
StackTrace:
Frame: function:'ScopeError', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 17, column: 24
Frame: function:'SourceError', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 28, column: 23
Frame: function:'', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 214, column: 17
Frame: function:'', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 195, column: 33
Frame: function:'', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 148, column: 13
Frame: function:'EasySAXParser.parse', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/js-libs/easysax/easysax.js', line: 751, column: 23
Frame: function:'XmlParser.parse', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 195, column: 22
Frame: function:'XmlStringParser.parse', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 201, column: 27
Frame: function:'parseInternal', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 46, column: 11
Frame: function:'loadPage', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 130, column: 27
Frame: function:'pageFromBuilder', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 128, column: 26
Frame: function:'resolvePageFromEntry', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 112, column: 20
Frame: function:'FrameBase.navigate', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 180, column: 20
Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 706, column: 19
Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(Native Method)
Caused by: com.tns.NativeScriptException:
Calling js method onCreate failed
Error: Building UI from XML. @file:///app/pages/home/home.xml:35:7
> Module '/data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/widgets/menu' not found for element 'widgets/menu:SideMenu'.
> Unexpected identifier
File: "file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 195, column: 20
StackTrace:
Frame: function:'ScopeError', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 17, column: 24
Frame: function:'SourceError', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 28, column: 23
Frame: function:'', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 214, column: 17
Frame: function:'', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 195, column: 33
Frame: function:'', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 148, column: 13
Frame: function:'EasySAXParser.parse', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/js-libs/easysax/easysax.js', line: 751, column: 23
Frame: function:'XmlParser.parse', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 195, column: 22
Frame: function:'XmlStringParser.parse', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 201, column: 27
Frame: function:'parseInternal', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 46, column: 11
Frame: function:'loadPage', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 130, column: 27
Frame: function:'pageFromBuilder', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 128, column: 26
Frame: function:'resolvePageFromEntry', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 112, column: 20
Frame: function:'FrameBase.navigate', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 180, column: 20
Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 706, column: 19
Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/br.com.fullservice.MobileAPP.mobile.client/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1043)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:925)
at com.tns.Runtime.callJSMethod(Runtime.java:912)
at com.tns.Runtime.callJSMethod(Runtime.java:896)
at com.tns.Runtime.callJSMethod(Runtime.java:888)
at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:13)
at android.app.Activity.performCreate(Activity.java:5425)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1090)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
... 11 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment