Refreshing a card
Mark Smith
Mark_Smith at cpe.umanitoba.ca
Mon Nov 8 01:02:02 EST 2010
Hi Monte, sorry if I missed replying. The problem was that on any specific
card when I selected the "toggle date stamp" menu option, visibly nothing
happened. In reality the property "showdatestamp" was changing from true to
false on each menu selection based on the statement:
set the showDateStamp of this stack to not the showDateStamp of this stack
but the field itself (I think I've called it the datestampfield) did not
appear or disappear as one might expect.
Going from the current card (where the toggle was selected) to another card
did show the desired result. ie. if you toggled the "showdatestamp" to off
(or false in this case) then going to another card suppressed displaying the
datestampfield. There is a line of code each time you open a card that stays
if there is a fld "dateStampField" then
put the dateStamp of this card into field "dateStampField"
end if
but what I was doing (which did not work) was trying to make it visible or
not by doing something like this
if there is a fld "dateStampField" then
put the dateStamp of this card into field "dateStampField"
else
put " " into field "dateStampField"
end if
sort of trying to make it visible or not visible myself. I did not know
about the "set the visible of..." command sequence. By adding that into the
menu handler (if that is the correct term) so that it says
case "Toggle Date Stamp"
set the showDateStamp of this stack to not the showDateStamp of
this stack
-- new stuff added to make it visible/invisible
if there is a fld "dateStampField" then
set the visible of field "datestampfield" to the showdatestamp
of this stack
end if
works fine. Its still a bit tricky to wrap my head around this. The
"mechanics" of doing it have some pieces here, some pieces there, and its
not entirely clear to me how they all work together. And I guess the
critical portion to understand is that there is a large junk of this
visibility thing which I'm NOT doing. Now its something that reunrev handles
when you set the visibility property of the field through the menu.
Put another way, previously I was trying to make it appear or not by putting
the date in the field, or a space. Now, I don't worry about it. I put the
date in the field (if there is one) and let the "visibility" property handle
whether it gets displayed or not.
If that makes any sense. Anyway, I appreciate your feedback.
-- Mark
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Refreshing-a-card-tp3021743p3031539.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list