🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.oop.macapp3
1 messages
1 total messages Started by Victor Consulting, Ken Victor,PA... Tue, 05 Jan 1993 02:09
MenuWidth Bug?
#218
Author: Victor Consulting, Ken Victor,PA...
Date: Tue, 05 Jan 1993 02:09
43 lines
2665 bytes
does anyuone know if there is a bug in the toolbox CalcMenuSize when dealing
with styled hierarchical menus?
 
my situation is as follows:
 
i have several hierarchical menus declared (with no items) as CMNU resources in
my .r file.  the menuId of these menus is greater than mLastMenu.  the main
menus for these hierarchical menus are also delcared as CMNU resources in my .r
file, with menuIDs less than mLastMenu.  all resource IDs are equal to menuIDs.
the main menus are listed in the kMBarDisplayed resource and the hieracrhical
menus are listed in the kMBarHierarchical resource.
 
dynamically i create additional items for my hierarchical menus, including
other hierarchical menus (being sure to only use a menuID < 235 and one that
isn't already in use).  in my dosetupmenus, i enable my items as appropriate,
and enable the declared hierarchical menu as well.
 
everything was working fine, and just the way i expected it to until i decided
i wanted some of the added items to be bold or outlined.  i changed my
dosetupmenus to issue either a SetItemStyle or (MacApp's) SetStyle, depending
on whether the menuid was greater or less than or equal to mLastMenu.  i even
tried calling CalcMenuSize or NeedCalcMenuSize.  my hierarchical menus are
being drawn too narrow for the styled items, and thus the styled items have the
infamous 3 dots on the end.  its as if CalcMenuSize is calculating a width
while ignoring the item's style.
 
i tried patching the menuwidth in the menuinfo record after my call to
CalcMenuSize (in dosetupmenus) to no avail.  i've traced this as far as inside
toolbox MenuSelect.  MenuSelect seems to set the menuwidth to -1 the first time
it needs the hierarchical menu, and then it calls CalcMenuSize before
displaying the hierarchical menu.  if i set an atrap at CalcMenuSize after
entering MenuSelect, and then patch menuwidth AFTER CalcMenuSize does its
thing, my menus display with the width i've patched in...
 
HELP??? :-(
 
Ken Victor
(415) 964-9870
 
p.s. i'm running sys 7.1, macapp 3.0.1.  i think i saw something similar in a
previous macapp 2.01 app i developed running on sys 7.0 and 7.01 with and
without tuner, but i didn't follow that one as much as this one.
 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads