Please check my homework?
Posted: Sun Dec 08, 2013 12:50 pm
This is a stack I downloaded and went to town on: All comments are mine and would someone be kind enough to critique and let me know that I have understood Every last thing correctly, this is important for me.
The stack consists of two sets of three text entry fields; top three are for numerics, bottom three for text. Both sets grouped on one card, that's it.
Many appreciations
chris
Probably good to upload the stack I thought
The stack consists of two sets of three text entry fields; top three are for numerics, bottom three for text. Both sets grouped on one card, that's it.
Many appreciations
chris
Code: Select all
on myTestRoutine
put long id of the target into tTarget--when you press inside the text field, this is the target
--put path name of clicked field into (tTarget= now the card id) which owns the group called "gNumbers"
put the long id of the owner of tTarget into tOwner --put path of stack id (who owns the card id)
-- into (tOwner=now the stack id)
put the short name of tOwner into tShort ----put the name (found in the properties inspector) which is "name of the stack"
--which is called "callinghierarchy", put this name into the variable tShort.
switch tShort --the variable containig the properties inspector group name (switch=Define altered states of existence)
case "gNumbers" --the name of the group for numbers (Case=Situation/present circumstance)
doCalculations tOwner --tOwner contains the name of the field and therefore the number that is put into it
break --(break=change lanes from within the motorway)
case "gChars" --name of grp for characters (same as above except for characters now)
doChars tOwner
break
end switch
end myTestRoutine
--This bit logical
on doCalculations pOwner
if field 1 of pOwner is a number and field 2 of pOwner is a number then
put field 1 of pOwner + field 2 of pOwner into field 3 of pOwner
else
answer "Information incomplete or not a number"
end if
end doCalculations
on doChars pOwner
put field 1 of pOwner && field 2 of pOwner into field 3 of pOwner
end doChars