Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349714

Summary: [client][textview] exception calling setSelection after init
Product: [ECD] Orion Reporter: Felipe Heidrich <eclipse.felipe>
Component: ClientAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mihai.sucan, Silenio_Quarti, simon_kaegi
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Felipe Heidrich CLA 2011-06-17 14:06:10 EDT
This code will fail:

		var options = {
			parent: "divParent",
			model: new mTextModel.TextModel(initialText),
			stylesheet: stylesheets,
			tabSize: 4
		};
		view = new mTextView.TextView(options);
		view.setSelection(0,1);


textView.js:3356 Uncaught TypeError: Cannot read property 'lineIndex' of undefined

this happens because updatePage() which initialized some of the text view internals is not being called as part of the constructor.
Comment 1 Silenio Quarti CLA 2011-06-17 14:10:26 EDT
Let's fix this for RC2.