Custom view classes
I'm loading a bunch of items from a database, per item I want to create a view, but it should be a view of it's own, it need to contain data specific for that view.
Is it possible to create a custom view class?
Or do I need to find another way around this?
3 Answers
- 
				
					I don't know if this is the right solution for my problem, but I fixed it by creating a new Window and setting the model mode to false. Like this:var listWindow = Ti.UI.createWindow({ 
 modal: "false",
 navBarHidden: "true",
 touchEnabled: "true",
 url: "list.js",
 height: 100,
 width: 100,
 data: list
 });listWindow.open();
 All the windows are added to a scrollableView. But I have a feeling that the window doesn't use the width and height, because the background of my entire application just changed to the background aplied in the window. 
- 
				
					Windows can be very expensive in terms of resources like memory and slow, you should use views instead. 
- 
				
					Why can't you simply update the controls on the view? somelabel.value = 'New text from db';Put just the view layout settings in the js file. Then, update as needed with the code on-page.