Menu

#2005 var UI_add_cont_items returns 0 for success

Documentation error
closed-out-of-date
nobody
None
5
2026-01-10
2017-02-04
No

Could you kindly note that when used as a variable, UI_add_cont_items apparently returns 1 if it failed and 0 if it succeeded, so if (variable) needs to be if (!variable) to confirm the item creation worked. You can see an example in the SI berry bush code: shape#(0x3FD)

This isn't currently listed, but it did trip me up tonight.

Discussion

  • Dominik Reichardt

    • status: open --> pending-fixed
     
  • Dominik Reichardt

    Can you verify this with current code and if it still works like this report on the github tracker? According to the documentation it should return how many objects were actually added to the container.

     
  • Dominik Reichardt

    • status: pending-fixed --> closed-out-of-date
     
MongoDB Logo MongoDB