I got this working ok, the problem I think olaj is referring is perhaps the "unsuccessful control" functionality in browsers (and html spec) meaning they don't return unchecked check boxes in the request when a form is submitted. This means you have to clear all categories first before updating existing categories otherwise the user won't be able to clear all checkboxes and clear all categories from a content item.
Assuming you have the source content item's guid you just just need to call GetContentsBySchema() for each schema that is a category on your source item's schema. From here you can get the ["UUID"] and call RemoveCategoryFromContent() :
Code:CmsContext.ContentService.RemoveCategoryFromContent( oSourceContentItem_Guid, (Guid)oCategoryItem["UUID"]);
It doesn't matter if the category item is not currently selected for the source content item, RemoveCategoryFromContent() just ignores it, so I just send all possible categories to RemoveCategoryFromContent()
Once you have cleared all categories you are free to pass an array of selected category guids to the UpdateContent() function. The great thing about the array of guids is that you don't have to specify which category schema they relate to as Kooboo figures it out for you. What this means is that if you have two or more category schemas in a content item schema then you don't have to do anything extra, all category guids go in the same array
Kooboo peopleI saw a post where you said you were unhappy with the current category support within the Kooboo API and were recommending that people don't use it so you can make changes. However I'm happy with it and I have code that relies on it working the way it currently does. So if you do change the way category handles can you please add it as new functionality and keep RemoveCategoryFromContent() and the array of category guids in UpdateContent()?
Thanks
ps: This is GazNewt but I can't unlock my old account as I have apparently forgotten the name of my dog!