I remember there was some discussion on the list about support for variables tied to the context rather than to the instance or class. This seems particularly useful for a web application where you might want to access the request and response from the context. What is the proper name for these kind of variables and where can I read about how to use them? Cheers, Jeff -- Jochen "Jeff" Rick, Ph.D. http://www.je77.com/ Skype ID: jochenrick
Hi Jeff, I think you should look at DynamicVariable and ProcessSpecificVariable classes. The first one is a read-only while the second is writable. You have to subclass these class for each variable you want. Ex: DynamicVariable subclass: #MyVar. MyVar value: 4 during: [ MyVar value ] HTH, Camiile On 15 oct. 2014, at 17:09, J.F. Rick <self@je77.com> wrote:
I remember there was some discussion on the list about support for variables tied to the context rather than to the instance or class. This seems particularly useful for a web application where you might want to access the request and response from the context. What is the proper name for these kind of variables and where can I read about how to use them?
Cheers,
Jeff
-- Jochen "Jeff" Rick, Ph.D. http://www.je77.com/ Skype ID: jochenrick
Thanks. Will do. Jeff On Wed, Oct 15, 2014 at 11:34 AM, Camille Teruel <camille.teruel@gmail.com> wrote:
Hi Jeff,
I think you should look at DynamicVariable and ProcessSpecificVariable classes. The first one is a read-only while the second is writable. You have to subclass these class for each variable you want.
Ex: DynamicVariable subclass: #MyVar. MyVar value: 4 during: [ MyVar value ]
HTH, Camiile
On 15 oct. 2014, at 17:09, J.F. Rick <self@je77.com> wrote:
I remember there was some discussion on the list about support for variables tied to the context rather than to the instance or class. This seems particularly useful for a web application where you might want to access the request and response from the context. What is the proper name for these kind of variables and where can I read about how to use them?
Cheers,
Jeff
-- Jochen "Jeff" Rick, Ph.D. http://www.je77.com/ Skype ID: jochenrick
-- Jochen "Jeff" Rick, Ph.D. http://www.je77.com/ Skype ID: jochenrick
Bear in mind that if you do any fancy stack slicing, you will get... *unexpected* behaviour from DynamicVariable. (See http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express... and follow-on links.) frank On 15 October 2014 16:34, Camille Teruel <camille.teruel@gmail.com> wrote:
Hi Jeff,
I think you should look at DynamicVariable and ProcessSpecificVariable classes. The first one is a read-only while the second is writable. You have to subclass these class for each variable you want.
Ex: DynamicVariable subclass: #MyVar. MyVar value: 4 during: [ MyVar value ]
HTH, Camiile
On 15 oct. 2014, at 17:09, J.F. Rick <self@je77.com> wrote:
I remember there was some discussion on the list about support for variables tied to the context rather than to the instance or class. This seems particularly useful for a web application where you might want to access the request and response from the context. What is the proper name for these kind of variables and where can I read about how to use them?
Cheers,
Jeff
-- Jochen "Jeff" Rick, Ph.D. http://www.je77.com/ Skype ID: jochenrick
participants (3)
-
Camille Teruel -
Frank Shearar -
J.F. Rick