startup handler

Mark Smith Mark_Smith at cpe.umanitoba.ca
Mon Nov 28 23:15:03 EST 2011


J. Landman Gay wrote
> 
> Startup is sent only once when the engine is first launched. In the IDE, 
> that happens long before any user stacks open (I think the IDE Home 
> stack catches it.) Startup will never occur in a stack open in the IDE, 
> only in a standalone.
> 

Thanks Jacque, I more or less suspected this but since it was not in the
dictionary thought I would seek confirmation. Here's another little
conundrum I've run into that you might be able to help with (or someone).

I've stored an encrypted password away in a custom property called cpassword
and use the following code to compare the user entered value:

on askpassword
   ask password "Enter password:" 
   if it is empty then quit
   if it = the cpassword of this stack then 
      exit askpassword
   else
      # incorrect password
      answer "Incorrect password. Please try again."
      askpassword
   end if
end askpassword

Now, before I begin, both the stack in the IDE and tested on the iPhone
simulator report the encrypted pw as \VUw|1,A   so, no difference there.

The above code works fine on the IDE when the correct pw is entered
(montreal), and loops endlessly on the iPhone saying "Incorrect password.
Please try again" when the same password is entered. Any wisdom or guidance
for the lost????

Thanks

-- M

PS have not tried it on a real iPhone yet, but probably will try that just
to rule out the improbable likelihood that this is a sim related problem.


--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/startup-handler-tp4117800p4118026.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the Use-livecode mailing list