background image
C H A P T E R 1 6
Find
Using the Find Service
16-19
querySpecFrame :=
{
dateBefore
:
{
indexPath : 'timeStamp,
endKey: findTime,
},
dateAfter
:
{
indexPath : 'timeStamp,
beginKey: findTime,
},
dateOn
:
{
indexPath : 'timeStamp,
beginKey: kOneDay *
(findTime div kOneDay) ,
endKey: kOneDay + kOneDay *
(findTime div kOneDay) ,
}
};
local querySpec := querySpecFrame.(findType);
// Get the cursor.
myCursor := mySoup:Query(querySpec);
// Set up finder frame and add it to the results
// array.
if myCursor:Entry() then
begin
ourFinder := {
_proto: ROM_SoupFinder,
owner: self,
title: "My Application",
findType: findType,
findWords: [DateNTime(findTime)],
cursor: myCursor
};
AddArraySlot(results, ourFinder);
end;
end;
Adding Application Data Sets to Selected Finds
16
You can allow users to choose data sets in an application to search by adding the
AppFindTargets
method and either or both of the
FindTargeted
or
DateFindTargeted
methods. This functionality is useful when you want to
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна