The same FIELD, twice
[1/7] from: info::id-net::ch at: 30-Jul-2002 13:01
Hey, i need to have the same field two times in my VID 'window. I mean i want when something is done to the first one is done to the second, too.. and it's not only the same content (when the user add some characters to the field, but also when the user correct, or click between the differents characters in the content of the field.. I thought that maybe giving the same name to 2 different fields could resolve that, but it's not the case.. Someone has an idea ? Just one remark : my second one is without a background.... and that's the only difference between them. Philippe
[2/7] from: carl:cybercraft at: 31-Jul-2002 0:54
On 30-Jul-02, Philippe Oehler wrote:
> Hey, > i need to have the same field two times in my VID 'window.
<<quoted lines omitted: 7>>> Just one remark : my second one is without a background.... and > that's the only difference between them.
Hi Philippe, You've probably got this far, but to share a string between fields just give them the same string in the layout. ie...
>> str: ""
>> view layout [field str field str]
That's only half of what you want though. I would think editing the fields' feel/engage function would be required to get them to update together. See the block after 'key in engage. Try this to see a field's feel...
>> view layout [f: field] >> probe f/feel
Others will have to tell you precisely what to do there though. Hope that helps to get you on your way, though. -- Carl Read
[3/7] from: cyphre:seznam:cz at: 30-Jul-2002 14:55
Hi Philippe, Is this what you wanted(watch out line breaks)? <code> view l: layout [ fl1: field with [ feel: make feel [ engage: func [face act event] compose [(copy second get in ctx-text/edit 'engage) if system/view/focal-face = face/self [ fl2/text: copy fl1/text show fl2 ] ] ] ] fl2: field with [ feel: make feel [ engage: func [face act event] compose [(copy second get in ctx-text/edit 'engage) if system/view/focal-face = face/self [ fl1/text: copy fl2/text show fl1 ] ] ] ] ] </code> regards, Cyphre
[4/7] from: info:id-net:ch at: 30-Jul-2002 22:53
thanks cyphre and carl. The cyphre's code was perfect !! Phil
[5/7] from: info:id-net:ch at: 31-Jul-2002 10:52
Cyphre, your code is good but it doesn't work with complex VID structure: the error is below; i dont know how to resolve it val needs a value where: forall near: val: first args Phil
[6/7] from: cyphre:seznam:cz at: 31-Jul-2002 11:40
Philippe, please send me privately your complex layout code so I can help you... regards, Cyphre
[7/7] from: rotenca:telvia:it at: 31-Jul-2002 12:51
Try this: same-t: copy "" view layout [ f1: field same-t feel [ append second :engage [show f2] ] f2: field same-t feel [ append second :engage [show f1] ] ] --- Ciao Romano
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted