titanium - Invalid type passed to a function while trying to open a view -
Then I have simple tabbed titanium mobile application using alloy I have a new view through a button in the tax tab Trying to open:
index.xml (see)
& lt; Alloys & gt; & Lt; TabGroup & gt; & Lt; Src = "taxes" /> & Lt; / TabGroup & gt;
taxes. Xml (see)
& lt; Alloys & gt; & Lt; Tab id = "taxes" title = "taxes" icon = "number of taxes" & gt; & Lt; Window title = "tax" square = "container" & gt; & Lt; Down Toolbar = "0" & gt; & Lt; Items & gt; & Lt; Button ID = "newcomer" title = "new record" onClick = "newreord" & gt; & Lt; / Button & gt; & Lt; / Item & gt; & Lt; / Toolbar & gt; & Lt; / Window & gt; & Lt; / Tab & gt;
Tax. (Controller)
var args = arguments [0] || {}; Function NewCord () {var new_record_view = Alloy.createController ('newrecord'). GetView (); New_record_view.open (); } newrecord.xml (see)
& lt; Alloys & gt; & Lt; Window title = "new record" category = "container" id = "newrecord" & gt; New record & lt; / Window & gt; & Lt; / Alloy & gt; When I click the button everything freez.
If I try to open in the current tab (code for newRecord in tax.js), then try to change the function here: error:
taxes.js (controller)
function newRecord () {var new_record_view = Alloy.createController ('newrecord'); New_record_view.openMainWindow ($ taxes.); } newrecord.js (administrator)
exports.openMainWindow = function (_tab) {_tab.open ($ newrecord.); } [Error]: Script Error {[ERROR]: Backtrace = "# 0 ()): 0"; [Error]: Line = 31; [Error]: Message = "Invalid type passed to work"; [Error]: Original location = "- [TiitabProxyOpenWindows:] (TUITBroProxy.M: 225)"; [Error]: native sage = "expected: Tivando Proxy, was: (empty)"; [Error]: Source ID = 301260640; [ERROR]: sourceURL = "file: ///Users/dimitar/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/8FD72932-FC27-43D4-9D3D-33F34F3E3039/autoservice.app/alloy/controllers/taxes Js "; [ERROR]:} Edit:
So, the issue is that I was trying to open the window with the new record ID instead of child_window. Now there is no error and the window has been opened, but it seems that there is such a disturbance that can be seen in the video:
< P> It is basically nothing more than a fast switching animation from the window with a background of light to a window with a dark background due to the incorrectly typed windows ID problem and "glitch".
Comments
Post a Comment