Avoiding recursion with a setProp handler

depstein at att.net depstein at att.net
Sun Aug 22 18:53:34 EDT 2004


MC 2.5's help stack says that "when you set an object's property from within a setprop handler, setprop messages are not sent."  Is this true?

Here's my handler:

setProp beenChanged whether
  put the short date  into fld 3
  set the beenChanged of this stack to whether -- (without this, the setProp handler intercepts the calling command, and the property is not set)
end setProp

When some other handler commands "set the beenChanged of this stack to true", my setProp handler gets called.  But when I watch the message watcher, it appears that the second line of my setProp handler is recursively calling the setProp handler, and I get a "recursion limit reached" error.

I realize that I could easily avoid resorting to a setProp handler at all, but I was tempted by the ease with which I thought it would allow me to add some behavior I had not thought of when I first wrote a lot of handlers that "set the beenChanged of this stack."  Having come this far, I would like to understand how to use setProp properly.

Many thanks.

David Epstein


More information about the metacard mailing list