Posts

Post not yet marked as solved
2 Replies
I'm having a similar problem I'm attempting to change the content (text) o f the contextmenus buttons. I need to change between KG and LBM. I tried to do this using a var(context1) set in the view struct. Either I get the first two menu items duplicated or it fails to compile with a too complex error.Maybe this is a bug..contextMenu(menuItems:{ Button(context1. action: { self.animal = AnimalSize.smallAnimal }) Button("10..50 lbm", action: { self.animal = AnimalSize.mediumAnimal }) Button("50..150 lbm", action: { self.animal = AnimalSize.largeAnimal }) Button("Toggle Kg - lbm", action: { self.drugDosage.unitsLbm.toggle() self.clientLbmDex = 0 }) })