What is the difference...
[1/4] from: info:id-net:ch at: 11-Dec-2002 16:09
Could someone help me about the difference between :
a: [field5/text: "hello" show field5]
do a ; the change is done
b: compose/deep [(to-set-word join "field" [5 "/text"]) "hello" show
(to-word join "field" "5")]
do b ; nothing is done in /View 1.2.03
The a and b block are the same. How Can I make the b-block effective
Philipppe
[2/4] from: greggirwin::mindspring::com at: 11-Dec-2002 10:31
Hi Philippe,
PO> Could someone help me about the difference between :
PO> a: [field5/text: "hello" show field5]
PO> do a ; the change is done
PO> b: compose/deep [(to-set-word join "field" [5 "/text"]) "hello" show
PO> (to-word join "field" "5")]
PO> do b ; nothing is done in /View 1.2.03
PO> The a and b block are the same. How Can I make the b-block effective
They may look the same to you, but they aren't. :)
view layout [
field5: field
button "A" [
a: [field5/text: "helloA" show field5]
do a ; the change is done
]
button "B" [
b: compose/deep [
(to-set-word join "field" [5 "/text"]) "helloB"
; This should work for you
;set in get (to lit-word! join "field" 5) 'text "helloB"
show (to-word join "field" "5")
]
do b ; nothing is done in /View 1.2.03
]
button "Same?" [
print same? a b
print equal? length? a length? b
repeat i length? a [
print [type? a/:i tab type? b/:i]
]
]
]
HTH!
-- Gregg
[3/4] from: al:bri:xtra at: 12-Dec-2002 12:09
Philipppe wrote:
> Could someone help me about the difference between :
> a: [field5/text: "hello" show field5]
<<quoted lines omitted: 3>>
> do b ; nothing is done in /View 1.2.03
> The a and b block are the same. How Can I make the b-block effective?
Unfortunately the blocks referred to by 'a and 'b aren't the same. Here's a
short console session to show why:
>> type? first [field5/text:]
== set-path!
>> type? first compose [(to-set-word join "field" [5 "/text"])]
== set-word!
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
[4/4] from: ammon:addept:ws at: 11-Dec-2002 19:42
Hi,
Try this:
>> do compose [
[ (to set-path! compose [(to word! join 'field 5) text]) "text"
[ show (to word! join "field" 5)
[ ]
HTH
Ammon Johnson --- CIO
Addept ------------------ (www.addept.ws)
435-616-2322 -------- (ammon at addept.ws)
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted