Closed Bug 12247 Opened 26 years ago Closed 26 years ago

[BLOCKER]Can not add dynamic menuitems to toolbar menus

Categories

(Core :: XUL, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: radha, Assigned: saari)

References

Details

(Whiteboard: examining)

I want to add history menu items to the 'Go' menu dynamically. Though the creation and attaching code etc... works, the menu actually doesn't show up. As per last thursday's meeting, marking this as a blocker bug. The code is already checked in, If you uncomment the UpdateGoMenu() call at the bottom of the nsBrowserAppCore::OnEndDocumentLoad() you can see what is being done.
Status: NEW → ASSIGNED
Target Milestone: M10
This worked last week... and it doesn't work on any platform?
Well, this works for bookmarks, and there is no reason it shouldn't work here.
I just walked through UpdateGoMenu and it doesn't seem to ever find the go menu. We never make it to line 707 that breaks the for loop.
radha do you want to double check this based on what I wrote above?
Chris, Sorry about that. Since I didn't want to turn on this feature with some of my other work for back & forward menu, I didn't checkin navigator.xul where I had added an id for 'Go' menu. I'll check it in as soon as the tree opens.Once that is done, it s'd break out of the for loop and continue with creation of menu. You can also set APP_DEBUG to 1, at the top of the file and get more debug information. I'll let you know as soon as I check in the xul file.
Chris, I have checked in navigator.xul which adds an id to go menu.
Priority: P3 → P1
Whiteboard: examining
Ok, I walked through UpdateGoMenu, and CreateMenuItem, and things look OK at first glance, but the dynamic menu construction code doesn't see the new menuitem at all... I'm going to need some help with this one from hyatt or waterson at the content model level.
You can't set the id attribute dynamically right now. You should try to work around this bug if possible, since it may take a while to fix (e.g., just give the go menu an id in the XUL).
Why isn't UpdateGoMenu written in JavaScript?
The 'Go' menu already has an id in XUL. The problem is, dynamically adding children to the 'Go' menu seems to succeed in all stages, but it doesn't actually show up on the screen.
I think I found what the problem is, Calling AppendChild after I have set the menu items label, and other attributes shows the item on the screen. Originally, I appended the child and then set the label. Is onaction obsolete at this time?
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I got this working. Marking it fixed.
Status: RESOLVED → VERIFIED
code level fix, marking verified. reopen if i'm wrong here...
You need to log in before you can comment on or make changes to this bug.