Re: [Factor-talk] Button stack effect problem

2012-12-18 Thread Samuel Proulx
Yes, it makes sense to me. Thank you! Le mardi 18 décembre 2012, John Benediktsson a écrit : > If you use global values, this should work: > > SYMBOL: a > 1 a set-global > "Press" [ drop a get-global ... ] gadget. > > The problem with "set" and "get", is that the 'set' is using the namespace > o

Re: [Factor-talk] Button stack effect problem

2012-12-18 Thread John Benediktsson
If you use global values, this should work: SYMBOL: a 1 a set-global "Press" [ drop a get-global ... ] gadget. The problem with "set" and "get", is that the 'set' is using the namespace of the listener which may (likely not) be the namespace of the quotation being executed by the quotation. Nam

Re: [Factor-talk] Button stack effect problem

2012-12-18 Thread Samuel Proulx
I've been experimenting with it and I now have another question. I've figured a way to use symbols in the quotations like so: SYMBOL: a 1 a set "Press" *a get* *'*[ drop *_* ... ] gadget. I don't know if that's the best the way to do it but it works. Although, what I would like to do is to set

Re: [Factor-talk] Button stack effect problem

2012-12-17 Thread Samuel Proulx
I see! Thank you for your help and your explanations! 2012/12/17 Jon Harper > The quotation you pass to the constructor gets called by > the system when the button is pressed. At this time, the stack has nothing > to do with the stack shown in the listener. So you don't have the reference > to

Re: [Factor-talk] Button stack effect problem

2012-12-17 Thread Jon Harper
The quotation you pass to the constructor gets called by the system when the button is pressed. At this time, the stack has nothing to do with the stack shown in the listener. So you don't have the reference to the label. To have a reference to the label when the quotation is called, you should m

[Factor-talk] Button stack effect problem

2012-12-17 Thread Samuel Proulx
Hi, Yet another problem... Hopefully the last though. I tried to make a button that changes the text slot of a previously made label. Here's what I did: "Test" dup gadget. "Press" [ drop "Worked" >>text ] gadget. I got an error message saying "Data stack underflow" when I clicked it. So I che