[haiku-development] Re: A few questions about the Haiku API

  • From: Barrett <barrett666@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 5 Jun 2012 23:24:41 +0200

Thanks a lot everybody for the help....


>  Just override QuitRequested like this:
>
> bool
> YourSettingsWindow::**QuitRequested()
> {
>    Hide();
>    return false;
> }
>

I have just a question....this way the window is aborting the system
shutdown...what's the better way to handle that? Actually i'm calling
YourSettingsWindow::Quit() from their parent class when the system is
shutting down....


> There is not a good way to solve this, since there is no way to subclass
> the BTextView that the BTextControl creates. The functionality is actually
> useful in Haiku, so it might be an even better idea to provide a patch.
> Maybe call BTextControl::SetEmptyHint(**const char*) or similar. Other
> frameworks call this SetMessage(), but that might be confusing with
> invokation BMessages and all.
>

I have another little doubt...to implement such functionality the method
suggested by René (i.e. intercepting the BTextView's B_MOUSE_DOWN
messaging) is already valid? I have not knowledge about the BTextControl
internals...but it seems something that should be implemented inside
BTextView to provide the functionality in both classes...am i wrong?

Regards

Other related posts: