On 2005-10-23 at 14:12:03 [+0200], Axel Dörfler wrote: > Adi Oanca <adioanca@xxxxxxxxx> wrote: > > On 10/17/05, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > > > > I agree sending one message only. Let's stay with this > > > > solution and > > > > see if all works OK. I just am afraid of ::DetachCurrentMessage() > > > > because, if this method is called from ::FrameMoved/Resized() the > > > > user will be dumped into debugger with a seg fault; more checking > > > > is > > > > required for "case B_VIEW_RESIZED/MOVED:" > > > I don't think you have to, as I don't think there is any point in > > > using > > > this method from these methods - and if you really think otherwise, > > > we > > > could still emulate the single message approach, as Stephan > > > proposed. > > > I don't think it's used that often anyway in any function that > > > deals > > > with BView messages. > > You may never know what the user wants to do. What it matters is > > that we have a bug and it should be fixed. > > It's not really a bug - it's a deviation from standard behaviour that > should just be documented. I cannot imagine anyone wanting to use > DetachCurrentMessage() in that case, anyway. > > But even if, we could still have some code like: > current = CurrentMessage(); > FrameResized(); > if (current != CurrentMessage()) > /* do whatever is appropriate */ > > > How are you going to emulate a single message? ::CurrentMessage() > > would return the original message anyway. > > And we can't change this, having the source and all? Should be fairly easy. BLooper::CurrentMessage() returns fLastMessage, which one can simply set to the "fake delivered" message in question. If that message is created on the heap, even DetachCurrentMessage() should work just fine. CU, Ingo