Change task information
- Import the required classes and interfaces.
import javax.microedition.pim.ToDo;
import javax.microedition.pim.ToDoList;
- To replace an existing value with a new value, invoke the appropriate set method, such as ToDo.setString().
- To determine if a value is already set for the field, invoke ToDo.countValues().
if (task.countValues(ToDo.SUMMARY) > 0)
{
task.setString(ToDo.SUMMARY, 0, ToDo.ATTR_NONE, "Review notes");
}
- Create code to manage a FieldFullException that a method such as addString() throws when a value already exists.
Was this information helpful? Send us your comments.