Ticket #475 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Story idPrefix not properly encapsulated

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

Description (last modified by FND) (diff)

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

Attachments

ticket475.patch Download (5.1 KB) - added by FND 5 years ago.

Change History

Changed 5 years ago by FND

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

Changed 5 years ago by MartinBudden

  • milestone set to 2.3.1

Changed 5 years ago by MartinBudden

  • description modified (diff)

Changed 5 years ago by FND

  • description modified (diff)

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.

Changed 5 years ago 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.

Changed 5 years ago by MartinBudden

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

Changed 5 years ago by FND

Changed 5 years ago by FND

  • description modified (diff)

Patch amended accordingly.

Changed 5 years ago by JeremyRuston

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

Fixed in changeset:3535

Changed 5 years ago by FND

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

Note: See TracTickets for help on using tickets.