Hi everyone

Firstly, hello from a newbie who's been captivated by Rebol since first 
sight.  It's a brilliant concept brilliantly done.

Apologies if this has been covered before, but I'm trying to set up an 
application, part of which involves editing patient records.  I think the 
user should be able to have two or more patient records open at once, but I 
cannot get Rebol to display a layout defined within an object more than once 
(I need the object context to avoid having one set of global variables 
trying to hold two records' data).  No permutations of copy or copy/deep 
seem to do it, and if I attempt eg obj2/lyt: make obj1/lyt [] I get "face in 
more than one pane" errors.

Ironically if I define the layout twice globally it works fine, and the two 
layouts are different and there are no shared faces.

A bit more detail: I have an object defined eg:

patient-record: context [
    id: none
    f1: none

    lyt: layout [
        across
        text "Name"
        f1: field
        return
        btn-enter "Save" [; save record to database for this id]
    ]

    populate: func [i [integer!]] [
        ; set f1/text = to name from database where id = i
    ]
]

The user selects a name from a text-list of patients, and clicks the "edit" 
button, and the associated code does:
    p: make patient-record [self/populate 1]
    view/new p/lyt

If the program later does:
    p: make patient-record [self/populate 2]
    view/new p/lyt

the new layout does not get shown at all.


Thanks for your help (and for Rebol!), Robbie the Rebol

ps Yes I am Scottish, have long hair and a beard, and a hefty claymore.

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to