in Window.h menu_item was changed to void:
@Property (nonatomic, assign) void *menuList;
Should there be an Objective-C object we can pass here instead?
Option B: The Pure Objective-C Architecture (Recommended)
If you want to fully break the connection between your UI layers and raw C allocations, eliminate menu_item entirely from your view models.
Instead of storing a raw C array, convert selections instantly into your custom NethackMenuItem Objective-C wrapper class (which you already have defined inside your imports list) and store them inside an NSArray.
Modify Classes/Window.h to hold a high-level array:
@property (nonatomic, retain) NSArray<NethackMenuItem *> *selectedMenuItems;
Convert Data at the Boundary (winiphone.m):
When NetHack hands down a list of items inside a callback function, your version-specific window layer instantly loop-allocates your custom NethackMenuItem classes, loads the text/identifiers into them, and binds the object array to your window instance.
in Window.h menu_item was changed to void:
@Property (nonatomic, assign) void *menuList;
Should there be an Objective-C object we can pass here instead?
Option B: The Pure Objective-C Architecture (Recommended)
If you want to fully break the connection between your UI layers and raw C allocations, eliminate menu_item entirely from your view models.
Instead of storing a raw C array, convert selections instantly into your custom NethackMenuItem Objective-C wrapper class (which you already have defined inside your imports list) and store them inside an NSArray.
Modify Classes/Window.h to hold a high-level array:
@property (nonatomic, retain) NSArray<NethackMenuItem *> *selectedMenuItems;Convert Data at the Boundary (winiphone.m):
When NetHack hands down a list of items inside a callback function, your version-specific window layer instantly loop-allocates your custom NethackMenuItem classes, loads the text/identifiers into them, and binds the object array to your window instance.