And no I couldn't, the first problem is the menu:

(de getRelations (Cls)
   (filter '((X) (isa '+relation (car X))) (getl Cls)))

(de getEntities ()
   (filter '((X) (isa '+Entity X)) (all)))

(setq *ClassTree
   (sort
      (make
         (for Cls (getEntities)
            (link (list Cls (getRelations Cls)))))))

(setq *ClassTreeMenu
   (make
      (for Cls *ClassTree
         (link (list (sym (car Cls)) (pack "@crud?class=" (car Cls)))))))

(de menu (Ttl)
   (action
      (html 0 Ttl *Css NIL
         (<div> '(id . menu)
            (<menu> *ClassTreeMenu))
         (<div> '(id . main) " "))))

I'm here trying to make a menu (which succeeds) but then when a link is
pressed I want that class name (+Feed for instance) to be available in the
crud function. This is not succeeding with (get Key 'http) anyway. And the
demo app isn't helping because individual files are used whereas here the
goal is to generate the GUI in a generic fashion which makes separate files
seem a bit overkill or?

Another thing that surprised me is the use of lower case in +relation which
was surprising, is there some special reason or a typo?

Later on when retrieving the +Entity whose relations I want to use works, I
want to be able to have a generic search form where all the entries are
simply compared, the functionality I'm after is a (db) that will return a
list of results, not just one item if there are more matches. I suppose a
comparable pilog query would be if "same" is used to compare all the fields,
however generating a working pilog query seems overkill.

I hope I'm not too confusing here, the main goal is to create a basic CRUD
interface in line with choCuSu in app but all the information to build it
will have to come from introspection of the +Entities and their relations,
that plus conventions on what to do in certain cases. The reason for doing
this is that it could be dropped into any project and instantly provide a
working (but stupid) CRUD interface.

/Henrik



On Mon, Jan 11, 2010 at 9:25 AM, Henrik Sarvell <hsarv...@gmail.com> wrote:

> Ok, got it to work sorry about that, should've read the readme better for
> the correct startup.
>
> Hopefully I'll be able to manage from here on.
>
>
>
>
>
> On Mon, Jan 11, 2010 at 8:01 AM, Alexander Burger <a...@software-lab.de>wrote:
>
>> On Sun, Jan 10, 2010 at 11:51:37PM +0100, Henrik Sarvell wrote:
>> > but then when I try to login with admin/admin I get:
>> >
>> > : !? (get *DB (cdr Tree) (car Tree))
>> > Bad DB file
>>
>> This looks like there is no database open. Did you start it as
>>
>>   $ ./dbg app/main.l lib/too.l -main -go
>>
>> This will create the "db/app/" directory if not already there.
>>
>>
>> > I'm thinking that my 32bit executable is not 100% alright since it's
>> > compiled and used on a 64bit system and all.
>>
>> This should be OK. I used 32-bit versions, compiled either under 32-bit
>> or 64-bits, on 64-bit systems without problem.
>>
>> Perhaps prefixing 'strace' to the above command can help?
>>
>> Cheers,
>> - Alex
>> --
>> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
>>
>
>

Reply via email to