Peculiar behavior of group objects with hide-lock. show-unlock
Sannyasin Brahmanathaswami
brahma at hindu.org
Thu Jul 6 00:05:54 EDT 2017
I have this routine where I am "typsetting" a field which updates with lessons/text… use can forward one lesson at a time.
local sLesson is incremented, the script fetch text on disk
but I am unable to get nice transition effect… sometimes it's even as if the "image" of the field is cached, even though I set it to empty and the screen updates only if I touch the field or try to scroll I get this on desktop and mobile, both behave the same
controls are a background image which is updated
and onto of that a semi-translucent back grc group with a text field on top
the grc and the text field "daily-lesson-text" are grouped into "lessonTextControl"
Given this scenario:
command buildLesson pLessonNumber
hide grp "lessonTextControl" with visual effect dissolve very fast
lock screen
put empty into fld "daily-lesson-text"
# FETCH FILES here
# insert into field, all the while setting type styles to the last line
# as the only way I could figure out how to dynamically set type from plain text
# then this:
# finish with the last bit of text:
put cr & (line 6 to -1 of tTodaysMWS) after fld "daily-lesson-text"
show grp "lessonTextControl"
unlock screen with visual effect Dissolve very fast
end buildLesson
What happens: is this sequence of visual events
1) goes empty… as if line 3 of the above came first
2) Now the grp (with only the grc) fades
3) there is a brief pause while my typesetting finishes in the background
4) now the bkg grc of grp "lessonTextControl" shows
5) but text does not appear, until I touch the field.. the "pop" it is rendered.
I suspect this is a) buggy but b) work--aroundable but I can't find the way.
swapping the hide and lock doesn't help
# finish with the rest of text
put cr & (line 6 to -1 of tTodaysMWS) after fld "daily-lesson-text"
unlock screen
show grp "lessonTextControl" with visual effect dissolve very fast
end buildLesson
the text appear briefly but then disappears until I touch it.
this doesn't work either
# don't us lock:
on buildlesson
hide grp "lessonTextControl" with visual effect dissolve very slowly
put empty into fld "daily-lesson-text" # this happens before the above
# then only does the background graphic fade
# set type here
# then simply
show grp "lessonTextControl" with visual effect dissolve very fast.
the text field is never updated on screen until I touch the field.
?? what am I missing?
The first dissolve of the grc never happens as the lock screen occurs almost immediately. but the text filed is empty… but the lock field trumps the visual effect.
then later the field never updates, the show should
Svasti Astu, Be Well
Brahmanathaswami
www.himalayanacademy.com
More information about the use-livecode
mailing list