After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 408341 - getAnchorTaskId and getHistory
getAnchorTaskId and getHistory
Status: RESOLVED FIXED
Product: lsr
Classification: Deprecated
Component: core
0.3.x
Other Linux
: Normal normal
: 0.5.0
Assigned To: Peter Parente
LSR maintainers
Depends on:
Blocks: 408024
 
 
Reported: 2007-02-15 18:59 UTC by Scott Haeger
Modified: 2007-02-16 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Scott Haeger 2007-02-15 18:59:42 UTC
Events should also be tied into getAnchorTaskName(), thus allowing event information to be obtained in tasks. 

This is the first step toward supporting event chaining.
Comment 1 Peter Parente 2007-02-15 20:45:21 UTC
I'm renaming this method before the bad naming convention runs rampant:

getName: human readable name of Task/Perk
getDescription: human readable description of Task/Perk
getClassName: class name of Task/Perk
getIdentity: programmatic string name assigned to a Task

In keeping with these other methods, this one should be called getAnchorTaskIdent. I will fix all references (there are few at present) when working on this bug.
Comment 2 Scott Haeger 2007-02-15 21:00:50 UTC
getAnchorTaskId() may be a better name than getAnchorTaskIdent().  It is both easier to identify it's function and is less wordy.
Comment 3 Peter Parente 2007-02-16 14:07:34 UTC
Agreed.

Here's what is now implemented:

getAnchorTaskId: Identity string of the task to which the one currently executing is chained, or None if this task is not part of a chain or the anchor has no string ID.

getAnchorPerkClassName: Class name of the perk containing the task returned by getAnchorTaskId.

getTaskHistory: Flattened list of all task identities that have executed before this tasks in response to the same event. Tasks without identifiers are listed as None.

getPerkHistory: Flattened list of all perk class names associated 1-to-1 with the names from getTaskHistory.

getHistory: Results from the two methods above combined as pairs in a zipped list. 

The identity parameter is now required on all Tasks. It may still be set to None, but must be done explicitly by the programmer. To clean up, I went through all the Tasks we currently register, gave important ones identifiers, gave other ones None as an id, and made all the names follow a standard convention of:

<some unique prefix> <task purpose>

For instance:

read all
read all continued
firefox read document address