Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23616] Class not found: Ti.UI.ScrollableView in ListView Template

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-08-24T20:26:08.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.5.0
ComponentsiOS
Labelsios, listview, qe-5.5.0, scrollableview, titanium
ReporterMathias Eklöf
AssigneeAngel Petkov
Created2016-07-07T09:01:31.000+0000
Updated2016-08-26T17:13:54.000+0000

Description

Problem

Trying to build for Device (iPhone) and for some reason the app dies and gives me an error about ScrollableView in my ListView template. *It all works as expected in the simulator* and I have also tested multiple versions of CLI, Xcode and Node. I have even reinstalled my Macbook but it didnt solve anything. _I just downloaded the super-latest 5.3.1 GA SDK, which didnt help either._ ---

Test case

Titanium.UI.setBackgroundColor('#000');

var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});

///////////
	var templates = {
		"scrollableView" : {
			properties: {
				height: 75,
				backgroundColor: "transparent",
				selectionStyle: Ti.UI.iPhone.ListViewCellSelectionStyle.NONE
			},
			childTemplates: [
				{
					type: 'Ti.UI.ScrollableView',
					bindId: 'scrollableView',
					properties: { height: 75, showPagingControl: false }
				}
			]
		}
	};

	var section = Ti.UI.createListSection({ items: [{ template: 'scrollableView' }]});
	
	var listView = Ti.UI.createListView(
	{
        templates 		: templates,
        sections 		: [section]  
	});


	win2.add(listView);
///////////

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  

tabGroup.open();
---

Logs

[WARN] :   Attempted to load TiUIScrollableViewProxy: Could not find class definition.
[ERROR] :  The application has crashed with an uncaught exception 'org.this_app_ios.module'.
[ERROR] :  Reason:
[ERROR] :  Class not found: Ti.UI.ScrollableView
[ERROR] :  Stack trace:
[ERROR] :  
[ERROR] :  0   CoreFoundation                      0x0000000180fdedb0 <redacted> + 124
[ERROR] :  1   libobjc.A.dylib                     0x0000000180643f80 objc_exception_throw + 56
[ERROR] :  2   this_app                       0x000000010011bae0 this_app + 768736
[ERROR] :  3   this_app                       0x00000001000a89e0 this_app + 297440
[ERROR] :  4   this_app                       0x00000001000a86ac this_app + 296620
[ERROR] :  5   CoreFoundation                      0x0000000180ecf944 <redacted> + 132
[ERROR] :  6   CoreFoundation                      0x0000000180ecf7b4 <redacted> + 172
[ERROR] :  7   this_app                       0x00000001000a82b8 this_app + 295608
[ERROR] :  8   this_app                       0x000000010025577c this_app + 2054012
[ERROR] :  9   this_app                       0x00000001002659f0 this_app + 2120176
[ERROR] :  10  UIKit                               0x0000000186493030 <redacted> + 692
[ERROR] :  11  UIKit                               0x0000000186493198 <redacted> + 80
[ERROR] :  12  UIKit                               0x0000000186482298 <redacted> + 2360
[ERROR] :  13  UIKit                               0x0000000186497c64 <redacted> + 104
[ERROR] :  14  UIKit                               0x00000001862288c4 <redacted> + 176
[ERROR] :  15  UIKit                               0x00000001861381e4 <redacted> + 656
[ERROR] :  16  QuartzCore                          0x0000000183aca994 <redacted> + 148
[ERROR] :  17  QuartzCore                          0x0000000183ac55d0 <redacted> + 292
[ERROR] :  18  QuartzCore                          0x0000000183ac5490 <redacted> + 32
[ERROR] :  19  QuartzCore                          0x0000000183ac4ac0 <redacted> + 252
[ERROR] :  20  QuartzCore                          0x0000000183ac4820 <redacted> + 500
[ERROR] :  21  QuartzCore                          0x0000000183abdde4 <redacted> + 80
[ERROR] :  22  CoreFoundation                      0x0000000180f94728 <redacted> + 32
[ERROR] :  23  CoreFoundation                      0x0000000180f924cc <redacted> + 372
[ERROR] :  24  CoreFoundation                      0x0000000180f928fc <redacted> + 928
[ERROR] :  25  CoreFoundation                      0x0000000180ebcc50 CFRunLoopRunSpecific + 384
[ERROR] :  26  GraphicsServices                    0x00000001827a4088 GSEventRunModal + 180
[ERROR] :  27  UIKit                               0x00000001861a6088 UIApplicationMain + 204
[ERROR] :  28  this_app                       0x0000000100065648 this_app + 22088
[ERROR] :  29  libdyld.dylib                       0x0000000180a5a8b8 <redacted> + 4
[ERROR] :  *** Terminating app due to uncaught exception 'org.this_app.module', reason: 'Class not found: Ti.UI.ScrollableView'
[ERROR] :  *** First throw call stack:
[ERROR] :  (0x180fdedb0 0x180643f80 0x10011bae0 0x1000a89e0 0x1000a86ac 0x180ecf944 0x180ecf7b4 0x1000a82b8 0x10025577c 0x1002659f0 0x186493030 0x186493198 0x186482298 0x186497c64 0x1862288c4 0x1861381e4 0x183aca994 0x183ac55d0 0x183ac5490 0x183ac4ac0 0x183ac4820 0x183abdde4 0x180f94728 0x180f924cc 0x180f928fc 0x180ebcc50 0x1827a4088 0x1861a6088 0x100065648 0x180a5a8b8)
---

Q&A

[http://stackoverflow.com/questions/37750914/titanium-cant-build-for-device-com-apple-syslog-relay-error]

Comments

  1. Hans Knöchel 2016-07-08

    Hey there, may the problem be that your item template is named "scrollableView" and that overlaps with some other API? Just some troubleshooting... *EDIT:* Guess I got it. We are adding some classes to the compiled ones automatically when using a list view:
       	contents.push(
       			'#ifdef USE_TI_UILISTVIEW',
       			'#define USE_TI_UILABEL',
       			'#define USE_TI_UIBUTTON',
       			'#define USE_TI_UIIMAGEVIEW',
       			'#define USE_TI_UIPROGRESSBAR',
       			'#define USE_TI_UIACTIVITYINDICATOR',
       			'#define USE_TI_UISWITCH',
       			'#define USE_TI_UISLIDER',
       			'#define USE_TI_UITEXTFIELD',
       			'#define USE_TI_UITEXTAREA',
       			'#endif'
       		);
       
    So we may need to add the USE_TI_UISCROLLABLEVIEW as well. But I would highly suggest to not include it, since scrollable-views should not be placed in list-views in ways of good code-style.
  2. Mathias Eklöf 2016-07-08

    Hi, thank you for trying to help me with this. The weirdest part is that everything worked perfectly until I updated the SDK. But I have tried and successfully downgraded everything but it still doesnt work. What do you suggest I do? (even if this method is not recommended, we really need it.)
  3. Mathias Eklöf 2016-07-12

    I found where this code is located (The code you mentioned), and I added the USE_TI_UISCROLLABLEVIEW but nothing happened differently. ^ '#ifdef USE_TI_UILISTVIEW', '#define USE_TI_UILABEL', '#define USE_TI_UIBUTTON', '#define USE_TI_UIIMAGEVIEW', '#define USE_TI_UIPROGRESSBAR', '#define USE_TI_UIACTIVITYINDICATOR', '#define USE_TI_UISWITCH', '#define USE_TI_UISLIDER', '#define USE_TI_UITEXTFIELD', '#define USE_TI_UITEXTAREA', '#define USE_TI_UISCROLLABLEVIEW', '#endif'^ Do you have any other clue what to do? As I described, everything works fine in the simulator and on my collegues computers.
  4. Hans Knöchel 2016-08-21

    Hey there, sorry for the delay. We'll put it under further investigation in the next code-sprint.
  5. Angel Petkov 2016-08-22

    Added scrollableView and stepper to the defines. * PR:https://github.com/appcelerator/titanium_mobile/pull/8250
  6. Mathias Eklöf 2016-08-23

    Hey guys, I just downloaded mobilesdk-6.1.0.v20160823024541-osx.zip but it didnt help, still the same issue. Am I supposed to do anything more?
  7. Angel Petkov 2016-08-23

    [~oakleaf] Hello, the PR isn't merged so the change isn't part of the SDK yet. It should still fail, It will be merged shortly once it's FT. Thank you!
  8. Hans Knöchel 2016-08-24

    [~oakleaf] The PR was just merged. Please grab a fresh 6.1.0 build and test it with it, thanks. *EDIT*: Try [this build](http://builds.appcelerator.com/mobile/master/mobilesdk-6.1.0.v20160824151018-osx.zip).
  9. Mathias Eklöf 2016-08-24

    Awesome guys, seems to work. Thank you all!
  10. Chee Kiat Ng 2016-08-25

    [~apetkov] [~hansknoechel] let's back port for 6.0.0 and 5.5.0.
  11. Angel Petkov 2016-08-25

    [~cng] Alright, sure thing. * 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8261 * 5_5_X PR: https://github.com/appcelerator/titanium_mobile/pull/8260
  12. Josh Longton 2016-08-26

    Verified as fixed. Tested on: {noformat} iPhone 6 plus (9.3.4) iPhone 6 (10.0) iOS Simulator (10.0) 
Mac OSX El Capitan 10.11.6 
Appc NPM: 4.2.7 Studio: 4.7.1.201608190732 SDK: 5.5.0.v20160825003900 Appc CLI: 5.5.0-5 Xcode 8 beta 4 Node: v4.4.7 {noformat} *Closing ticket*

JSON Source