TiddlyWiki.org

Ticket #475 (closed enhancement: fixed)

Opened 5 months ago

Last modified 5 months ago

Story idPrefix not properly encapsulated

Reported by: FND Assigned to: FND
Priority: minor Milestone: 2.3.1
Component: core Version:
Severity: low Keywords:
Cc:

Description (Last modified by FND)

The attached patch introduces two new functions, story.tiddlerId() and story.getTiddler(), which allow for properly encapsulating story tiddlers' ID prefix.

Attachments

ticket475.patch (5.1 kB) - added by FND on 16/02/08 13:13:17.

Change History

15/02/08 13:19:37 changed by FND

  • owner changed from JeremyRuston to FND.
  • status changed from new to assigned.

15/02/08 13:27:14 changed by MartinBudden

  • milestone set to 2.3.1.

15/02/08 14:26:48 changed by MartinBudden

  • description changed.

15/02/08 15:34:27 changed by FND

  • description changed.

For consistency with store.getTiddler(), the patch's story.getTiddlerElement() might be renamed to story.getTiddler().

MartinB:
No, patch is correct: tiddlers are in the store, tiddler elements are associated with hte story.

15/02/08 23:49:53 changed by SaqImtiaz

I agree that using tiddlerElem would be easier to understand, but only if other functions were similarly renamed. We refer to tiddlers in the story as just tiddlers in all other Story functions, and therefore the function should be called story.getTiddler. Using the naming convention TiddlerElement? for just this function will introduce confusion.

Other functions in Story: Story.prototype.saveTiddler Story.prototype.refreshTiddler Story.prototype.closeTiddler

Therefore the attached patch should definitely be amended.

16/02/08 13:05:25 changed by MartinBudden

On further consideration, Saq is correct. Patch should be amended - MB.

16/02/08 13:13:17 changed by FND

  • attachment ticket475.patch added.

16/02/08 13:14:35 changed by FND

  • description changed.

Patch amended accordingly.

16/02/08 17:21:02 changed by JeremyRuston

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in changeset:3535

18/02/08 15:47:54 changed by FND

cross-reference: This change has been superseded by #481.