I think you may not have sqlite installed.
http://www.sqlite.org/download.html precompiled binaries for ms go in your
factor folder for ease.  I have a sqlite3.def, .dll, .exe.    

 

I have these installed, as per your previous instructions.

 

You were missing two vocabs, at least, pehaps more.  I can't be sure until I
get past this  error, which is not specific.  The current problem does not
mention a word or a vocabulary; so I don't know what to fix. 

 

Regarding run-fac, here it is used, but I do not know where I got the code.
It is similar but not identical to that in your e-mail.

 

 

USING: kernel db.types db.tuples io.pathnames io.directories ;

IN: sqlite-test

 

! This is a self contained test of creating a sqlite db.

! Click on autouse, paste & enter.  

 

TUPLE: entity id author date content ;

 

entity

  "entity"

    {

      { "id" "ID" INTEGER +db-assigned-id+ }

      { "author" "AUTHOR" { VARCHAR 256 } +not-null+ } ! uid

      { "date" "DATE" TIMESTAMP +not-null+ }

      { "content" "CONTENT" TEXT +not-null+ }

    } define-persistent

 

: blog-db ( -- db )

    "adhoc" run-fac home prepend-path

      [ make-directories ] [ "blogs.sqlite" append-path ] bi <sqlite-db> ;

  

: with-blog-data ( quot -- )

    '[ blog-db _ with-db ] call ; inline

 

: init-db ( -- )

    [  entity ensure-table ] with-blog-data ;

 

"adhoc" home prepend-path "Look in: " prepend .

 

init-db

 

 

Shaping

 

 

 

On Sat, Nov 13, 2010 at 12:33 AM, Shaping <shap...@charter.net> wrote:

 I just tried the part from TUPLE: to init-db and it worked on both mac and
pc.   Was this an error message? 

What did you do exactly to test it?  I'm trying to find all the needed
vocabs one step at a time.  So far I've added two vocabs to the USE:
statement, and I have remaining this error:

"The image refers to a library or symbol that was not found at load time"

What is your context (USE:,  USING:, etc) for setup and testing?

Shaping

! This is a self contained test of creating a sqlite db.  Click on autouse,
paste & enter. 

TUPLE: entity id author date content ;

entity "entity" {
    { "id" "ID" INTEGER +db-assigned-id+ }
    { "author" "AUTHOR" { VARCHAR 256 } +not-null+ } ! uid
    { "date" "DATE" TIMESTAMP +not-null+ }
    { "content" "CONTENT" TEXT +not-null+ }
} define-persistent

: blog-db ( -- db ) "adhoc" home prepend-path [ make-directories ] [
"blogs.sqlite" append-path ] bi <sqlite-db> ;
: with-blog-data ( quot -- ) '[ blog-db _ with-db ] call ; inline 
: init-db ( -- )  [
    entity ensure-table  
     ] with-blog-data ;

"adhoc" home prepend-path "Look in: " prepend .

init-db


----------------------------------------------------------------------------
--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk




--
Jim
"I'm for extending the working Medicare program for our seniors all the way
back to contraception, so Americans can concentrate on living their lives
without fear of changing a job, going bankrupt from deductibles or fighting
HMO bureaucracy."


----------------------------------------------------------------------------
--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk




-- 
Jim
"I'm for extending the working Medicare program for our seniors all the way
back to contraception, so Americans can concentrate on living their lives
without fear of changing a job, going bankrupt from deductibles or fighting
HMO bureaucracy."

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to