Last modified 10 years ago Last modified on 09/24/09 14:52:16

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=EMBEDDED_BOOKS_CONTENT_R1, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block



Books can be part of other books

Task requirements

  • Implement truly embedded books.
  • "Book" menu item in the "Insert" menu should trigger a submenu that offers "Embedded" and "Linked" options.
  • The embedded and linked books should not be interactive in author mode
  • In reader mode the controls for switching pages should be active.
  • Embedded books should be shown in embedded books palette. Linked embedded books should be shown with a prefix "[Linked]". Double clicking an embedded book from the palette should open it for editing.
  • Optional : A content halo should trigger a HUD that gives the opportunity to choose whether the controls will be visible and which page will be shown at the first opening
    • Content halo should appear inside the bounding rectangle, on click, with 10px right and top offset from the click.
    • Volume control slider for the embedded book.

Task result


Implementation idea

Add an option for real embedded book in the menu and when chosen create a child book resource of the current book. Then create a frame whose main resource is the newly created book.


How to demo

  • Insert two books, one linked and one truly embedded
  • Open them for editing in the palette.
  • Show hud and remove controls for one of the books (optional)


Make the InsertBookItem menu item a successor of AppMenu and make two AppMenuItems that are registrated to it - InsertEmbeddedBook and InsertLinkedBook. The operation in EmbeddedBookLogic that handles InsertLinkedBook should be called ON_ADD_LINKED_BOOK_FRAME and the other - ON_ADD_EMBEDDED_BOOK_FRAME.

Use the old logic to handle the file menu showing but make the AutoAction use the FrameH.create(...) method. Use the same for the handling of the other event but when you get the File to embed open the ResourceAccess to it and copy its model as a child of the current book.

Fix the EmbeddedBooksPalette to go through all frames and if they are “book-frame” add their main-resource`s as BookItems. Also add a property that flags a book as linked. It should be true if the ref points to an outer resource. Override the doubleclicked() method of BookItem and use the AppViewUtil.openBook to open the book for editing.

Clear the effects list of the content controls when adding the new ones and also clear the list of contentControl views every time they are recomputed.

For those controls to work properly it is best to make the ResourceAccess.#getRef() method to always give absolute ref. This is going to fix a lot of other ishues.



[6655], [6674]

Merged into [6751].


(Place the testing results here.)


(Write comments for this or later revisions here.)