[haiku-development] Setting text in BTextControl

  • From: "James Kim" <jkim202@xxxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 13 Jul 2008 20:28:22 +1200

Hi all. I am having trouble setting custom text in BTextControl.

I am able to set text by calling BTextControl::SetText() within the same
method that initializes the BTextControl object. However, when I try to
call SetText() elsewhere (in a different method), it causes a run-time
error.

To be more specific, EditForm::InitializeControls() method initializes
BTextControl and EditForm::UpdateEditForm() method calls
BTextControl::SetText().

When I go into debug mode and perform 'bt', it is something like

debugger ()
BLooper:check_lock ()
BView::_CheckLockAndSwitchCurrent ()
BView::ConstrainClippingRegion ()
BTextView::_DrawLines ()
BTextView::_Refresh ()
BTextView::SetText ()
BTextView::SetText ()
BTextControl::SetText ()
BALM::EditForm::UpdateEditForm ()

Any advice would be appreciated. Thanks.


Regards,

James Kim

Other related posts: