Re: when sent a message, the target can't find itself!

2012-08-05 Thread Peter M. Brigham
On Aug 4, 2012, at 11:32 PM, Kay C Lan wrote: > On Sun, Aug 5, 2012 at 10:46 AM, Peter M. Brigham wrote: > >> The real usefulness of the long name of a control (or card, or stack) is >> that it is in itself a complete object reference. So: >> >> put the long name of fle "xxx" into tFldRef >> pu

Re: when sent a message, the target can't find itself!

2012-08-04 Thread ambassador
Kay C Lan tFldRef will now equal Let's put something in to field xxx tFldRef is a variable, when you put something into a variable the variable contents change. The "put" command is handy for many things, but its use in HyperCard to allow setting values in objects lent itself to ambiguity, a

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Kay C Lan
On Sun, Aug 5, 2012 at 11:27 AM, Kay C Lan wrote: > put quote & "Sum" & quote into word 8 of tSummaryFldName > -- field "Sum" of card "Sum" of stack "Sum" > > Whoops, a gotcha, if you need to refer to a substack of a mainstack then it's name would be (assuming the main stack is called "Stk1" fie

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Kay C Lan
On Sun, Aug 5, 2012 at 10:46 AM, Peter M. Brigham wrote: > > The real usefulness of the long name of a control (or card, or stack) is > that it is in itself a complete object reference. So: > > put the long name of fle "xxx" into tFldRef > put "Let's put something in to field xxx" into tFldRef >

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Kay C Lan
On Sun, Aug 5, 2012 at 6:37 AM, Dr. Hawkins wrote: > > In several places, the names of the fields are actually being > constructed by string manipulation (e.g., val_sbt comes from [ fldNam > & "_sbt" ], and then I want to add the $123.45 in val (or possibly > fld fal) to the $852.87 already in f

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Peter M. Brigham
On Aug 4, 2012, at 10:19 PM, J. Landman Gay wrote: >> The catch is that the handler has no advance knowledge of what field >> or card it can be called from--I'm trying to make something generic >> that can add a currency formatted value to a field that already >> contains a currency formatted valu

Re: when sent a message, the target can't find itself!

2012-08-04 Thread J. Landman Gay
On 8/4/12 5:37 PM, Dr. Hawkins wrote: My real need is the very narrow issue of a handler pulling the value of the field that called it, and then putting something back in. It seems that this should take one line of code, not 8 or 10. The more I think about it, the less I think "the target" is

Re: when sent a message, the target can't find itself!

2012-08-04 Thread J. Landman Gay
On 8/4/12 5:37 PM, Dr. Hawkins wrote: The catch is that the handler has no advance knowledge of what field or card it can be called from--I'm trying to make something generic that can add a currency formatted value to a field that already contains a currency formatted value. It doesn't matter.

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Dr. Hawkins
On Sat, Aug 4, 2012 at 2:58 PM, J. Landman Gay wrote: > If you substitute "field x of card y" for every instance of "the long name > of the target" in your script, you'll probably see the problem right away. > As Alex mentioned, the "put" line evaluates to: > > put 45 into fld (field x of card y

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Mike Bonner
if I have a command "putit" in the field script and send "putit" to field "myfield" and the command putit has the line "put 85 into the target" it works fine for me. As was pointed out, you have to watch your references put 45 into fld (the long name of the target) actually says put 45 into *

Re: when sent a message, the target can't find itself!

2012-08-04 Thread J. Landman Gay
On 8/4/12 4:53 PM, Dr. Hawkins wrote: On Sat, Aug 4, 2012 at 2:31 PM, Mike Bonner wrote: Change it to put exists(the long name of the target) and it should behave as expected. Thanks. That got the exists() working. Maybe I'm dense, but I cant get access to the field to work the same way.

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Dr. Hawkins
On Sat, Aug 4, 2012 at 2:31 PM, Mike Bonner wrote: > > Change it to > > put exists(the long name of the target) > > and it should behave as expected. Thanks. That got the exists() working. Maybe I'm dense, but I cant get access to the field to work the same way. put the text of (the long nam

Re: when sent a message, the target can't find itself!

2012-08-04 Thread Mike Bonner
the long name of the target will return something like field "Field" of card id 1002 of stack "Untitled 1" Since it is the fully qualified name of the target, if you try to use field the long name of the target it is trying to see if field field "Field" of card id 1002 of stack "Untitled 1" e

when sent a message, the target can't find itself!

2012-08-04 Thread Dr. Hawkins
I'm sending a message to a field on another card to add my formatted values. But while in that field, the handler can't find it! put the long name of the target field blah group blah . . . put the id of the target it has one put the long id of t