GS/OS. If I wanted to know.... [message #387795] |
Tue, 15 October 2019 14:25 |
|
Originally posted by: Leon Sargent
For the fun of it? Yes. For the fun of it!
I would like to understand where menu item names are stored, how they are called and how to change their names. Are they in a resource fork, data fork perhaps called from a tool?
If someone could point me both to a textual resource and an app appropriate for looking at this data and altering them I would appreciate it...
Leon
|
|
|
Re: GS/OS. If I wanted to know.... [message #387796 is a reply to message #387795] |
Tue, 15 October 2019 14:50 |
|
Originally posted by: fadden
On Tuesday, October 15, 2019 at 11:25:09 AM UTC-7, Leon Sargent wrote:
> I would like to understand where menu item names are stored, how they are called and how to change their names. Are they in a resource fork, data fork perhaps called from a tool?
IIRC, menus can be created from code or resources. For code, you can find scans of the IIgs toolbox reference online. Chapter 13 (volume 1) explains the Menu Manager routines. Chapter 37 (volume 3) has some updates.
For resources, IIgs toolbox chapter 45 (volume 3) documents the Resource Manager generally. You should look into the format of Rez files, which are text source files fed into the resource compiler. They look like this:
resource rMenu (Edit_Menu, $C018) {
$0003, // menuID
$A008, // menuFlag
Edit_pString, { // menuTitleRef
Undo_Menu_Item,
Cut_Menu_Item,
Copy_Menu_Item,
Paste_Menu_Item,
Clear_Menu_Item
};
};
(I dug this out of the HardPressed SPRE app. The code was generated by Genesys... hand-creating rez files is a bit tedious.) The menu structure is in one resource, the actual strings are in a different resource.
So... if the app created the menus with code, you'd need to find the strings in the code segment. If they're in the resource fork, it's a bit easier to find and fiddle with, as a resource editor can modify individual resources.
|
|
|
|