Heya Nils...
This will take a few messages to get everything explained...
First off... in your proc, you're grabbing the next object_id from the sequence... which is the same thing that happens when you pass "" for object_id to acs_object__new...
So you could do:
ad_proc -public mfp::note::add {
-title:required
-item_id
} {
This proc adds a note.
} {
if { ! [info exists item_id] } {
set item_id ""
}
:
:
}
and get a similar result (note also replacing "c eq 0" with "! c"; eq is a string compare, == is numeric)
More to come (about why even have the item_id come into the func if it's to be a new object) later :)