Hi again,
I would suspect that selecting an object (i.e. changing the tool)
sets automatically the lockscreen to false.
You might try to avoid any selection by using directly: clone grp
"masterColumnGrp"
Let me know ;-)
Best regards from Paris,
Eric Chatonet.
Le 5 avr. 07 à 16:46, Ian McKnight a écrit :
Hi Eric
Inspired! I've just tried that and I'm getting strange results:
I'm building a timetable grid. So I clone a master column and populate
it with the days of the week. To achieve this I call the following
handler
on cloneGroup tnewGrpName
select grp "masterColumnGrp" of cd "timeTable" of this stack
clone the selectedObject
select it
set the visible of it to true
put the lockscreen &&&cr after msg -----------------------
set the name of the selectedobject to tnewgrpName
select empty
end cloneGroup
For the first call lockscreen is true
I now start a loop to clone the same master column but the first
topmost field is populated with the loop counter value. The same
cloneGroup handler is used here also. Again for each loop lockscreen
is also true.
The only handler that is called after this in the loop simply changes
field names and populates fields with data.
However as soon as the loop finishes the lockscreen is false!
Here is the code for the loop concerned
repeat with theNextPeriod = 1 to thePeriodDay
put tgrpNameStem& theNextPeriod into tGrpName -- renames the
cloned group
-- leave a space after the day column and
-- make a space to indicate break and lunch
if theNextPeriod = 1 or theNextPeriod = tbreakAfter+1 or
theNextPeriod = tLunchAfter +1
then
put tbreakGap into tGap
else
put tColGap into tGap
end if
-- 64 pixels is the width of 1 period field
put (item 1 of theStartLoc + 64 + tGap )&comma& (item 2 of
theStartLoc) into theStartLoc
cloneGroup tGrpName
changeFieldNames theNextPeriod, tgrpName
-- display the period number in the top most field
put theNextPeriod into fld (tColumnName & theNextPeriod) of grp
tGrpName of cd "timeTable"
-- move the new column into position
set the loc of grp tGrpName of cd "timeTable" to theStartLoc
end repeat
put the lockscreen &&"3"&cr after msg ------------------ this is
now false
For a 6 period day the lockscreen is
true -- at the start of this loop
true :1 -- remains true for each of 6 iterations
true :2
true :3
true :4
true :5
true :6
true 3 -- at the end of the loop
I can' t see why moving groups and renaming fields within them should
cause locksccreen to change state!
Thanks again
lockscreen is true
On 05/04/07, Eric Chatonet <[EMAIL PROTECTED]> wrote:
Hi Ian,
On the other hand:
As you know it: lock and unlock screen go by pairs.
So have you tried to lock the screen twice or three times and unlock
it until the lock screen = false?
Really dirty but worth a try ;-)
You can also add in some places: put the lockscreen & cr after msg to
understand which statement makes the lock screen reset to false...
Best regards from Paris,
Eric Chatonet.
Le 5 avr. 07 à 14:12, Ian McKnight a écrit :
--
Regards
Ian
----------------------------------------------------------------
http://www.sosmartsoftware.com/
[EMAIL PROTECTED]/
----------------------------------------------------------------
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution