Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10298] BlackBerry: KitchenSink doesn't open any view the second time on device

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-04T01:35:00.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 12 BB, 2013 Sprint 12, Release 3.2.0
ComponentsBlackBerry
Labelsn/a
ReporterHranush Mezhlumyan
AssigneeRussell McMahon
Created2012-08-02T02:20:46.000+0000
Updated2014-06-19T12:42:59.000+0000

Description

KitchenSink doesn't open any view the second time on device. It is reproducible in the sdk with the following githash number: githash=33051bf . Steps to reproduce: Step1. Launch KitchenSink Step2. Open e.g. "controls_win_title" STep3. Click on e.g. "Activity Indicator" Step4. Go back by clicking "Back" button in the left below corner Step5. CLick again and again on "Activity Indicator" Actual Result: No any reaction Step6. You can click any other view, e.g. "Slider" Step7. Go back to the list (or even going back to Tab list and returning to the "controls_win_title" list which works fine doesn't matter how much time you go back and click it again) STep8. Click again "Activity Indicator" or "Slider" Actual Result: No any reaction Expected result: in STep5 and Step8 we should see the corresponding tabs opened. Solution to overcome: You can only open the "Activity Indicator" or "Slider" after closing and opening KitchenSink again.

Comments

  1. Hayk Zakaryan 2012-08-07

    I have done a small investigation and here are it's results. Added some logging information in Resources\ui\ControlsWindow.js - modified tableView.addEventListener as tableview.addEventListener('click', function(e) { if (e.rowData.test) { Titanium.API.info('Requireing corresponding file: ' + e.rowData.test); var ExampleWindow = require(e.rowData.test); Titanium.API.info('title = ' + e.rowData.title); Titanium.API.info('Self object type ' + Object.prototype.toString.call(self)); Titanium.API.info('Self object has containingTab property: ' + (typeof(self.containingTab) !== 'undefined')); Titanium.API.info('self.containingTab type ' + Object.prototype.toString.call(self.containingTab)); Titanium.API.info('Iterating over self'); for (var key in self) { Titanium.API.info(key + " -> " + self[key]); } Titanium.API.info('----------------'); var win = new ExampleWindow({ title:e.rowData.title, containingTab:self.containingTab, tabGroup:self.tabGroup }); Titanium.API.info('Windows created'); self.containingTab.open(win,{animated:true}); Titanium.API.info('windows opened'); } }); Here is the log output: NavigatorPrivate::handleWindowStateEvent - fullscreen [INFO]:Requireing corresponding file: ui/common/controls/button [INFO]:title = Button [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- [INFO]:Windows created [INFO]:windows opened [INFO]:Requireing corresponding file: ui/common/controls/button [INFO]:title = Button [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- TypeError: object is not a function [INFO]:Requireing corresponding file: ui/common/controls/button_state [INFO]:title = Button States [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- [INFO]:Windows created [INFO]:windows opened [INFO]:Requireing corresponding file: ui/common/controls/button_state [INFO]:title = Button States [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- TypeError: object is not a function [INFO]:Requireing corresponding file: ui/common/controls/button [INFO]:title = Button [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- TypeError: string is not a function [INFO]:Requireing corresponding file: ui/common/controls/button [INFO]:title = Button [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- TypeError: string is not a function [INFO]:Requireing corresponding file: ui/common/controls/button_state [INFO]:title = Button States [INFO]:Self object type [object Object] [INFO]:Self object has containingTab property: true [INFO]:self.containingTab type [object Object] [INFO]:Iterating over self [INFO]:---------------- TypeError: string is not a function
  2. Jean-Philippe Lemieux 2012-09-18

    This is a bug with the caching of the result of running js code in the require implementation. I commented out the code to use the cached value as a workaround for now. The result is originally a function object, but when retrieved from the cache, it is no longer of type function. I didn't investigate further.

JSON Source