Function PopupMenu.setItemMetadata

Sets the metadata of an item, which may be of any type. You can later get it with getItemMetadata, which provides a simple way of assigning context data to items.

void setItemMetadata(VariantArg1) (
  in long idx,
  in VariantArg1 metadata
);