Books and Parts

The Suggestion

The suggestion is that Chapters could be allocated to Parts, which are allocated to books, or that Chapters could be allocated directly to books. (For ease of programming I'd suggest that all Books are treated as having at least one Part, but that the single part be transparent to the user unless there are more than one.)

Project (YW5 file)

Book 1

Part 1

Chapter 1

Chapter 2

Chapter 3

Part 2

Chapter 4

Chapter 5

Book 2

Part 1

Chapter 1

..

Part 2

..

Book 3

..

Response by the programmer

I've been thinking about this a bit, and my primary concern was how to group all the different books and parts without rewriting half the software.

Seems I need to break the problem into two halves: specifying which part of which book each chapter belongs to, and then allowing the user to filter their chapter list on book/part.

Creating Books and Parts

I'd need a new setup page where you could create a tree with Book 1, Book 2, etc, and under those you could add Part 1, Part 2, etc. I could generate a hidden ID code for each book and each part.

Next, on the chapter setup form you could have a pair of dropdowns - one for the books, the other populated with the parts of the selected book. Specifying both would set the 'Book' and 'Part' variables in that chapter to the hidden ID. If you've only created books or only created parts, then the relevant combo would be greyed out. This would allow users to work on a single book with multiple parts, or a series of books which aren't split into parts (I don't use parts in my books)

That's implementation, which would take me a couple of hours to set up. Now for the hard part.

Using Books and Parts

Each character, location and item could belong to one or more books, and one or more parts. The default should be to appear in everything, with buttons to remove from all, add to all, etc.

Or, thinking ahead, it would be better if this 'belonging to' was done by simply dragging a character onto a scene. The scene belongs to a chapter, which belongs to a part in a book, and so the character now belongs in that book (but can be in multiple books, obviously)

There's an issue where you might fill out notes which are relevant for one book but not another, but the notes entry box is unlimited so you can always put

Book1: (notes)

Book2: (notes)

and so on.

All char/item/loc lists and displays would have to have additional filtering by book or show all. Should the all characters list show all, or just for the selected book? Need to show from all books if you want drag/drop to update which books they belong to. Maybe a pair of radio buttons - this book/all books

All reports would have to have additional filtering by book/part/all. That could go on the chapter selection form where you also tick whether to print used/unused. The start and end chapter combos would have to be refilled depending on these choices.

There are many places in the code where the program goes through every chapter in the project (e.g. updating word counds) These would all have to be rewritten to allow for a specific book or part.

The chapter list would need to have the same - an option to show chapters in all books & parts, the selected book, or the selected part of a given book. A couple of dropdowns at the bottom would do it, perhaps with a checkbox to lock them from accidental changes.

I can see a new tab control which should contain the existing chapter list along with a second tab for a project tree. Clicking a part or a book would return you to the chapter list, with only the chapters relevant to that book or part displayed. It would be handy to drag/drop chapters onto books/parts, but this wouldn't be possible if both controls were on the same tabbed dialog, since they can't be visible at the same time.

Summary

Adding a form to create books and parts is relatively easy. Moving chapters into books and parts is also straightforward - perhaps initially by changing drop-downs in the chapter settings form.