Hi all, I am having a hard time trying to get an EditField with StyledText to run. I get NilObjectExceptions when trying to assign text to MyEditField.StyledText.Text. Here are the steps to reproduce what I don't understand:
1. Create a new RB project. 2. Add an EditField (say myEf) to Window1 (the default window). 3. In myEf's Open() event, programmatically set me.styled=true and me.multiline=true. 4. Then programmatically add some text, e.g.: myEf.styledText.text="Firstline"+EndOfLine+"secondline.". 5. Run the app; it will cause a NilObjectException at the line mentioned above (my config is RB2006r1 on WinXP). The interesting thing is that when the styled and multiline properties are set via the checkboxes in the window editing GUI instead of setting them programmatically, the NilObjectException does NOT occur. I need to be able to set both properties programmatically though because I am subclassing EditField and my subclass should support styled, multiline text by "definition". I have spent quite some time trying to figure out what the problem here is (including searching the RB archives), but no success. Can anyone help me out here? Maybe it's a simple and stupid thing I am not aware of? I hope so... Thanks, stefan. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
