Closed Bug 20470 Opened 26 years ago Closed 26 years ago

need to be able to get command dispatcher from text control frame

Categories

(Core :: XUL, defect, P1)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: buster, Assigned: waterson)

References

Details

(Whiteboard: [beta]?)

Attachments

(3 files)

talked to hyatt, discovered that we need a way for the text control frame to tell the xul command dispatcher that something has changed, and "update commands" needs to get called. but I have no way of doing this today. hyatt sez: waterson is the man, submit a bug and have him talk to me about it. so her ya go. once this bug is fixed, I'll do the work in the text control frame.
Depends on: 2253
Blocks: 20471
this will probably end up being a beta blocker. without this, I can't fix 20471, which means some menu items will only enable/disable when focus changes, instead of whenever the user interacts with the text control. guessing M13, chris please change if that isn't right. if you push this beyond M14, also change 20471. thanks.
Whiteboard: [beta]?
Target Milestone: M13
Status: NEW → ASSIGNED
Priority: P3 → P1
talked to hyatt. he said we needed to add back the nsIDOMXULCommandDispatcher attribute to nsIControllers. Is that correct? (If so, it's a no brainer: I'll do it tomorrow...)
yep, that's my understanding. add the attribute back on, set up the code so the getter gives me the command dispatcher object, and I'm happy.
Target Milestone: M13 → M12
damn buster, you're easy to please. i'll get on it.
Ok, this involved a bit more thinking that I thought it would. Just to verify the ownership model here... xul doc [1]===>[1] command dispatcher [1]--->[n] element ^ [1] || [1] | || | \/ [1] +----------------[1] controllers || [1] || \/ [n] controller Where double arrows indicate "strong ref" and single arrows indicate "weak ref", and [1]-->[1] indicates "one-to-one" and [1]-->[n] indicates "one-to-many".
Also, is there any reason that we need to make the "controllers" object creatable through XPCOM? I'd just as soon use an internal interface to construct the controllers object. Nobody is going to be creating controllers on their own, are they?
Correct. Someone might also have a weak ref back to the command dispatcher or controllers (or element) from the controller.
Correct. Nobody ever makes the controllers object, but remember that the HTML input field (gkhtml) and the GlobalWindowImpl (in jsdom.dll) are making it, and that's why I made it XPCOM.
ok, how about the CommandDispatcher object? will anyone outside of RDF.DLL ever need to create one of those?
Nope.
Attached patch proposed fixSplinter Review
Attached file nsXULControllers.h
Fix attached: hyatt could you review? . Generally gave nsXULCommandDispatcher.cpp and nsXULControllers.cpp some badly needed love. - Cleaned up some methods that weren't checking return codes - Created private header files . Got rid of nsIXULCommandDispatcher interface because it wasn't needed. . Removed XULCommandDispatcher from RDF factory; cannot be created externally now. . Set the command dispatcher after creating the controllers object in nsXULElement (XXX should we do this in GlobalWindowImpl, too?)
Go nuts.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
QA Contact: claudius → buster
Buster can verify if he wishes, I don't think claudius can
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: