The "Put" command is not putting

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Maxiogee
Posts: 38
Joined: Thu May 05, 2011 5:45 pm

The "Put" command is not putting

Post by Maxiogee » Sat Mar 24, 2012 8:27 pm

Hi,
In a double repeat loop I like to be advised of where the process is at any point in time.

===
on mouseUp
set lockscreen to true
repeat with a = 1 to 1000
repeat with b = a+1 to 1000
put a && b
do stuff
end repeat
end repeat
set lockscreen to false
end mouseUp
===

That, in Hypercard, would show the relevant numbers in the message box.
But, in LiveCard nothing gets displayed in the message box - unless I add in a line

===
on mouseUp
set lockscreen to true
repeat with a = 1 to 1000
repeat with b = a+1 to 1000

wait 1 tick

put a && b
do stuff
end repeat
end repeat
set lockscreen to false
end mouseUp
====

I'm using LiveCode 4.6.1 on a G4 Mac running OS 10.4.11

Is this a LiveCode 'feature' or a Mac thing, and is there a workaround which doesn't add unnecessary pauses to an already lengthy process.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: The "Put" command is not putting

Post by Dixie » Sat Mar 24, 2012 8:37 pm

Hi...

I don't know what you are trying to do, but if you wish to see A and B increment then you can't have the screen locked. The script below that includes the 'wait with messages' line lets the engine catch its breath and display the increment...

Code: Select all

on mouseUp
   --set lockscreen to true
   repeat with a = 1 to 1000
      repeat with b = a to 1000
         put a && b
         wait 0 millisecs with messages
      end repeat
   end repeat
   --set lockscreen to false
end mouseUp
be well

Dixie

Maxiogee
Posts: 38
Joined: Thu May 05, 2011 5:45 pm

Re: The "Put" command is not putting

Post by Maxiogee » Sat Mar 24, 2012 9:28 pm

Thanks Dixie, but - the purpose of the lockscreen is to speed up the process as LiveCode doesn't need to go to new cards and they are are created.

The messagebox in HyperCard was exempt from the lockscreen process and thus the progress of a process could be noted without slowing the process.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10335
Joined: Wed May 06, 2009 2:28 pm

Re: The "Put" command is not putting

Post by dunbarx » Fri Mar 30, 2012 3:44 pm

YIPES!

I never knew this. It's true. I also use the msg box to track things. LC really locks you out, where HC had let this pass. I suppose the LC way is more consistent, but, well, geez.

I can't find a workaround. And of course setting locksreen back and forth takes noticeable time:

Code: Select all

on mouseUp
   put the ticks into temp
     set lockscreen to true
      repeat with y = 1 to 100
        set lockscreen to false
               put y
      set lockscreen to true
      end repeat
   put the ticks - temp
end mouseUp
There should be a property, the "messageBoxLockScreen". I will post it in the feature request area.

Craig Newman

Maxiogee
Posts: 38
Joined: Thu May 05, 2011 5:45 pm

Re: The "Put" command is not putting

Post by Maxiogee » Fri Mar 30, 2012 3:58 pm

Thanks Craig.
I'm new here and didn't know (a) if this was Mac-specific, or (b) where to post it to best effect.

Tony

Post Reply