Commit bba05857 authored by Dave Griffiths's avatar Dave Griffiths

tweaks and fixes all over the shop

parent 66988f30
......@@ -26,7 +26,7 @@
<activity android:name="foam.symbai.FamilyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.MigrationActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IncomeActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.GeneaologyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.GenealogyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.SocialActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.FriendshipActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.AgreementActivity" android:configChanges="orientation"></activity>
......
......@@ -1031,18 +1031,18 @@
(define (build-test! db table village-ktvlist household-ktvlist individual-ktvlist)
(looper!
1
3
(lambda (i)
(msg "making village" i)
(let ((village (simpsons-village db table village-ktvlist)))
(looper!
3
15
(lambda (i)
(alog "household")
(msg "making household" i)
(let ((household (simpsons-household db table village household-ktvlist)))
(looper!
(random 10)
(+ 5 (random 10))
(lambda (i)
(msg "making individual" i)
(simpsons-individual db table household individual-ktvlist))))))))))
......
......@@ -795,7 +795,8 @@
((null? w) #f)
;; drill deeper
((eq? (update-widget-token w) 'contents)
(msg "updateing contents from callback")
(update-callbacks! (update-widget-value w)))
((eq? (update-widget-token w) 'contents-add)
(update-callbacks! (update-widget-value w)))
((eq? (update-widget-token w) 'grid-buttons)
(add-callback! (callback (update-widget-id w)
......@@ -862,6 +863,7 @@
(begin (display "no dialog called ")(display name)(newline))
(let ((events (apply (dialog-fn dialog) args)))
(update-dialogs! events)
(update-callbacks-from-update! events)
(send (scheme->json events))))))
;; called by java
......
This diff is collapsed.
......@@ -4,8 +4,16 @@
(list 'test-text (list "I am test text" "I am test text" "I am test text" "" ))
(list 'one (list "one" "" ))
(list 'two (list "two" "" ))
(list 'start (list "Symbai" ""))
(list 'three (list "three" "" ))
(list 'next (list "Next" ))
(list 'details-next (list "Next" ))
(list 'family-next (list "Next" ))
(list 'migration-next (list "Next" ))
(list 'income-next (list "Next" ))
(list 'gene-next (list "Next" ))
(list 'social-next (list "Next" ))
(list 'friendship-next (list "Next" ))
(list 'agreement-next (list "Next" ))
(list 'village (list "Village" "" ))
(list 'household (list "Household" "" ))
(list 'households (list "Households" "" ))
......@@ -32,6 +40,7 @@
(list 'quick-add (list "Quick add" "" ))
(list 'find-individual (list "Find individual" "" ))
(list 'filter (list "Filter" "" ))
(list 'filter-switch (list "Run filter" ""))
(list 'off (list "Off" "Off" "Off" "" ))
(list 'name (list "Name" "Kyrteng" ))
(list 'sync-all (list "Sync me!" "" ))
......@@ -112,7 +121,7 @@
(list 'migration-button (list "Migration" "" ))
(list 'friendship-button (list "Friendship" ))
(list 'income-button (list "Income" "" ))
(list 'geneaology-button (list "Geneaology" "" ))
(list 'genealogy-button (list "Genealogy" "" ))
(list 'social-button (list "Social" "" ))
(list 'agreement-button (list "Agreement" "" ))
(list 'is-a-child (list "Child" "" ))
......
// Starwisp Copyright (C) 2013 Dave Griffiths
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package foam.symbai;
import android.app.Activity;
import android.os.Bundle;
import android.content.Context;
public class GeneaologyActivity extends foam.starwisp.StarwispActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
m_Name = "geneaology";
super.onCreate(savedInstanceState);
}
}
......@@ -71,7 +71,7 @@ public class starwisp extends StarwispActivity
ActivityManager.RegisterActivity("family",FamilyActivity.class);
ActivityManager.RegisterActivity("migration",MigrationActivity.class);
ActivityManager.RegisterActivity("income",IncomeActivity.class);
ActivityManager.RegisterActivity("geneaology",GeneaologyActivity.class);
ActivityManager.RegisterActivity("genealogy",GenealogyActivity.class);
ActivityManager.RegisterActivity("social",SocialActivity.class);
ActivityManager.RegisterActivity("friendship",FriendshipActivity.class);
ActivityManager.RegisterActivity("individual-chooser",IndividualChooserActivity.class);
......
......@@ -73,8 +73,9 @@
;; only return (eg. name and photo)
(define (db-filter-only db table type filter kt-list)
(msg "db-filter-only")
(alog "db-filter-only")
(map
(lambda (i)
(alog "get-entity-only")
(get-entity-only db table i kt-list))
(dbg (filter-entities db table type filter))))
(filter-entities db table type filter)))
......@@ -51,6 +51,7 @@
(else (cons (car fl) (delete-filter key (cdr fl))))))
(define (build-query table filter)
(alog "build-query start")
(string-append
(foldl
(lambda (i r)
......@@ -82,16 +83,20 @@
filter))
(define (filter-entities db table type filter)
(let ((q (build-query table filter)))
(alog q)
(alog "filter-entities start")
(let ((s (apply
db-select
(dbg (append
(list db (build-query table filter))
(build-args filter)
(list type))))))
(append
(list db q)
(build-args filter)
(list type)))))
(alog "filter-entities end")
(msg (db-status db))
(if (null? s)
'()
(map
(lambda (i)
(vector-ref i 0))
(cdr s)))))
(cdr s))))))
......@@ -68,7 +68,8 @@
(define (dirty-entities db table)
(let ((de (db-select
db (string-append
"select entity_id, entity_type, unique_id, dirty, version from " table "_entity where dirty=1;"))))
"select entity_id, entity_type, unique_id, dirty, version from "
table "_entity where dirty=1 limit 5;"))))
(if (null? de)
'()
(map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment