Opened 4 years ago

Last modified 2 years ago

#11735 assigned bug

[BTextControl] Sends a Modification Message when the text is set with a SetText()

Reported by: Janus Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

BTextControl sends a Modification Message when the text is set with a SetText(), this is unexpected.

From the BeBook

SetModificationMessage, ModificationMessage

These functions set and return the message that the BTextControl sends to its target when the user begins to enter or edit text.

Change History (4)

comment:1 Changed 4 years ago by anevilyak

Have you verified that this isn't the case on R5? The BeBook is incorrect/out if date in quite a few places.

comment:2 in reply to:  1 Changed 4 years ago by Janus

Replying to anevilyak:

Have you verified that this isn't the case on R5? The BeBook is incorrect/out if date in quite a few places.

Sorry, I don't have an R5 anymore. It's strange because if you set the text you don't need a message, you know it's changed. As with other widgets you need a message when the user does. If you set a checkbox or a slidebar you don't receive a message. I found the description more logic and coherent than the behavior.

Last edited 4 years ago by Janus (previous) (diff)

comment:3 Changed 4 years ago by ttcoder

(commenting to get implicitely "Cc'ed" to this ticket since the Modify Ticket area no longer displays here.. Not sure if I'm doing something wrong or if it's worth filing a ticket against W+)

Same here, don't remember what happened when using that back in R5 so can't answer that, but definitely noticing it in Haiku, so much so that I've had to add ugly hacks in my framework (tcontrol->SetMessage(NULL) followed by SetText() followed by tcontrol->SetMessage(new BMessage(oldmsg)), ouch :-)

Maybe this'll have to be turned into an enhancement and moved beyond R1....

comment:4 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.