Hi kevin, the add_tag() seems to be an internal function used to manage the tags list. The correct way to add tag in a task is the plugin_api.insert_tag(), which is:
def insert_tag(self, tag):
"""Inserts a tag into the current task (in the textview).
Note: this method only works with the onTaskOpened method.
@param tag: The tag's name (without the '@').
"""
itera = self.textview.get_insert()
if itera.starts_line() : self.textview.insert_text("@" + tag,itera)
else : self.textview.insert_text(" @" + tag,itera) self.textview.grab_focus()
I noticed that the add_tag () method creates confusion, that is why I opened bug #493835
Hi kevin, the add_tag() seems to be an internal function used to manage the tags list. The correct way to add tag in a task is the plugin_ api.insert_ tag(), which is:
def insert_tag(self, tag):
"""Inserts a tag into the current task (in the textview).
Note: this method only works with the onTaskOpened method.
@param tag: The tag's name (without the '@'). get_insert( )
self. textview. insert_ text("@ " + tag,itera)
self. textview. insert_ text(" @" + tag,itera)
self.textview. grab_focus( )
"""
itera = self.textview.
if itera.starts_line() :
else :
I noticed that the add_tag () method creates confusion, that is why I opened bug #493835