TiddlyWiki.org

Ticket #124 (new enhancement)

Opened 2 years ago

Last modified 10 months ago

Encapsulate Tiddler's "links" and "tags" fields

Reported by: UdoBorkowski Assigned to: MartinBudden
Priority: major Milestone: unscheduled
Component: core Version:
Severity: high Keywords:
Cc:

Description

To provide the option to improve the implementation of the "links" and "tags" handling in the Tiddler class it is necessary to no longer access the "links" and "tags" fields directly (like in "tiddler.links = ..."). Instead these fields are encapsulated through accessor and mutator functions:

Tiddler.prototype.getLinks = function() {return this.links};
Tiddler.prototype.setLinks = function(links) {this.links=links};
Tiddler.prototype.getTagList= function() {return this.tags};
Tiddler.prototype.setTagList= function(tags) {this.tags=tags}; 

Only these functions should be used to access or modified the "links" and "tags" of a tiddler. Also you should not assume that the implementation given above will stay. E.g. we may change the "tags" field internally from an array to a hashmap and just create and return a tags *array* "on demand".

The direct access to these fields is "deprecated". I.e. any code that directly accesses the fields (like in plugins) may break in a later version of TiddlyWiki.

Change History

06/10/06 16:20:02 changed by JeremyRuston

In fact, perhaps we should encapsulate all the other fields (eg modifier, modified, created) with getters and setters as well.

06/10/06 16:20:29 changed by JeremyRuston

  • owner changed from JeremyRuston to MartinBudden.

22/10/06 09:20:06 changed by MartinBudden

  • priority changed from major to minor.

22/10/06 09:22:08 changed by MartinBudden

  • priority changed from minor to major.

22/10/06 10:22:32 changed by MartinBudden

  • status changed from new to assigned.

11/11/06 09:41:06 changed by MartinBudden

  • owner deleted.
  • status changed from assigned to new.

11/11/06 09:41:12 changed by MartinBudden

  • owner set to MartinBudden.

25/11/06 07:43:07 changed by MartinBudden

  • milestone changed from 2.2 to 2.3.

12/10/07 14:41:19 changed by MartinBudden

  • milestone changed from 2.3 to unscheduled.