Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
fixed the "RangeError #2006" bug, when a Book was instantiated withou…
Browse files Browse the repository at this point in the history
…t children.
  • Loading branch information
Rafael Belvederese authored and blvz committed Aug 11, 2010
1 parent 84cbf21 commit e4d07e7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
14 changes: 7 additions & 7 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FlexBook #

- Current Version: 1.0.3
- Current Version: 1.0.4
- Flex 3.5 / AS3 / Flash Player 9+
- Date: 4th July 2007
- Original Author: Ruben Swieringa
Expand All @@ -11,15 +11,15 @@ For demos / implementations, look at this repo:

## Release Notes

- Fixed the 'sticky-page' bug
- Added the jumptoPage method. It's similar to the gotoPage method, but it won't do a lot of flips to reach some page.
- Fixed the bug that, when adding a Page dynamically, the Page didn't show fold gradients.
- Fixed the 'sticky-page' bug;
- Added the jumptoPage method. It's similar to the gotoPage method, but it won't do a lot of flips to reach some page;
- Fixed the bug that, when adding a Page dynamically, the Page didn't show fold gradients;
- Fixed the "RangeError #2006" bug, when a Book was instantiated without any children.

## Known Issues / Bugs

- For Book instances, height values greater than the height of the content may slow down the application.
- ScrollPolicies for Page instances are disabled (the properties have been overridden and are idle in the Page class). When a Page instance is not being flipped, its fold-gradient is drawn upon a Shape instance stored within that Page its rawChildren. When scrollbars are displayed, the Shape instance will no longer be in place.
- When a Book instance without any children is initialized a RangeError is thrown. I will look into this issue, in the meanwhile you may want to use the following workaround; Put two child Page instances in the Book instance, then (from withinin the creationComplete property of the Book instance) remove the two dummy-children by using the removeChild() method.
- For Book instances, height values greater than the height of the content may slow down the application;
- ScrollPolicies for Page instances are disabled (the properties have been overridden and are idle in the Page class). When a Page instance is not being flipped, its fold-gradient is drawn upon a Shape instance stored within that Page its rawChildren. When scrollbars are displayed, the Shape instance will no longer be in place;
- When using the jumptoPage method, the previous pages are instantly rendered before the flip. Example: You are on pages 2-3 and want to go to pages 8-9. When jumptoPage is called, the pages 6-7 will override pages 2-3, before flipping to pages 8-9.

## Credits
Expand Down
2 changes: 1 addition & 1 deletion src/com/rubenswieringa/book/Book.as
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ package com.rubenswieringa.book {
* @author Ruben Swieringa
* and others.
* http://github.com/rthesaint/FlexBook
* @version 1.0.3
* @version 1.0.4
* @see PageManager PageManager
* @see Page Page
* @see BookEvent BookEvent
Expand Down
7 changes: 5 additions & 2 deletions src/com/rubenswieringa/containers/SuperViewStack.as
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package com.rubenswieringa.containers {
* @author Ruben Swieringa
* [email protected]
* www.rubenswieringa.com
* @version 1.0.3
* @version 1.0.4
* @see mx.containers.ViewStack
*
*
Expand Down Expand Up @@ -480,9 +480,12 @@ package com.rubenswieringa.containers {
* @see mx.containers.ViewStack#selectedChild
*/
public function get selectedChild ():Container {
if (this.numChildren == 0)
return null;

return super.getChildAt(this._selectedIndex) as Container;
}
public function set selectedChild (child:Container):void {
public function set selectedChild (child:Container):void {
this.selectedIndex = this.getChildIndex(child);
}

Expand Down

0 comments on commit e4d07e7

Please sign in to comment.