http://www.newton-inc.com/dev/techinfo/qa/qa.htmnewtCheckAllButton (@872) which you can use. This proto sends the CheckAll method to the layout. In Newton 2.1 OS, newtOverLayouts have two new methods, CheckAll and UncheckAll, which implement this behavior. However, none of this is present in Newton 2.0 OS .CheckAll and UncheckAll methods for your overview layout (or any other layout you wish to implement check all for.)protoCheckAllButton. These samples implement an earlier (and less useful) flavor of Check All. The old samples check all the items which are currently visible in the overview, while the Newton 2.1 OS checks all the items that are present in the currently selected folder/card filter. "Checkbook" (version 8 or later) or "WhoOwesWhom" (version 3 or later) will reflect the Newton 2.1 behavior.protoCheckAllButton from the older sample code, since that gives the correct look and button bounds, and modify it as follows:buttonClickScript should look something like this: func()
if newtAppBase.currentLayout = 'overView then
begin
if layout.checkAllPrimed then
layout:UnCheckAll()
else
layout:CheckAll();
layout.checkAllPrimed := NOT layout.checkAllPrimed;
end;
CheckAll:
func()
begin
local curse := dataCursor:Clone();
curse:Reset();
hilitedIndex := nil;
selected := MapCursor(curse, func(e) MakeEntryAlias(e));
AddUndoSend(layout, 'UnCheckAll, []);
layout:DoRetarget();
end;
UncheckAll:
func()
begin
hilitedIndex := nil;
selected := nil;
layout:DoRetarget();
end
hilitedIndex and selected. hilitedIndex is used internally by newtOverLayout to track the tapped item. You may set it to NIL (as above) to clear the value, but do not set it to some other value or rely on its current value. selected contains an array of aliases to soup entries representing the currently selected items, and will be used by the routing and filing buttons for processing entries. It is important to clear hilitedIndex when modifying the selected array in any way.menuRightButtons array for the status bar. The older sample code puts it on the left, however user interface discussions as part of the Newton 2.1 OS effort resulted in the decision to place the button on the right.