Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349714 - [client][textview] exception calling setSelection after init
Summary: [client][textview] exception calling setSelection after init
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 14:06 EDT by Felipe Heidrich CLA
Modified: 2011-09-01 11:41 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.