Closed Bug 100122 Opened 24 years ago Closed 24 years ago

Dynamic Menus not showing on OSX

Categories

(Core :: XUL, defect, P1)

PowerPC
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: jelwell, Assigned: mikepinkerton)

Details

(Keywords: access, Whiteboard: [OSX+] PDT+)

Attachments

(1 file, 1 obsolete file)

We dynamically hide and show a whole menu. We have our Applications xul window contain various menu items, such as File, Edit, etc. And one which starts hidden. To do this we grab the menu id and setAttribute("hidden", "false") and the menupopup we setAttribute("collapsed", "false"). When we try to show the menu item on OS X, nothing happens. The same code works on Classic builds as well as Linux and Windows.
pinkerton: can we target this for 0.9.5?
Target Milestone: --- → mozilla0.9.5
Status: NEW → ASSIGNED
Summary: Dynamic Menu items not showing on Mac. → Dynamic Menus not showing on Mac.
Priority: -- → P1
ok, found why this doesn't work... // show this menu NS_ASSERTION(PR_FALSE, "nsMenuX::AttributeChanged: WRITE SHOW CODE."); thanks beard ;) ;)
Summary: Dynamic Menus not showing on Mac. → Dynamic Menus not showing on OSX
hahahah :-)
Whiteboard: [OSX+]
need some r/sr luvin' on the patch. thanks!
r=saari
+ if ( hiddenValue == NS_LITERAL_STRING("true") || collapsedValue == NS_LITERAL_STRING("true") ) Is that the optimal way to compare strings these days? How about hiddenValue.Equals()? I'm not sure. + if ( currMenu == this ) { slicing may break this compare in future if the menu classes start implementing other APIs. Probably best to compare interface pointers. + ::InsertMenuItem(menubar, ::GetMenuTitle(mMacMenuHandle, title), indexToInsert + 1); Does InsertMenuItem do meta-character interpretation? Could this cause problems?
Attachment #49982 - Attachment is obsolete: true
new patch addresses the latter 2 of smfr's concerns. According to jag, .Equals() and == are the same and should be inlined to the same code.
Comment on attachment 50150 [details] [diff] [review] take 2, addressing smfr's concerns sr=sfraser
Attachment #50150 - Flags: superreview+
Attachment #50150 - Flags: review+
a=chofmann for the 0.9.4 branch
Whiteboard: [OSX+] → [OSX+] PDT+
landed on branch. waiting for trunk to open.
landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: