Password Protecting Stack

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Password Protecting Stack

Post by SirWobbyTheFirst » Sat Sep 18, 2010 9:25 pm

Hi I've encountered what I think is a bug (It might not be but I don't know to be honest) when I've password protected a stack. If I build a stack to use the system messages like PreOpenStack and them and then password protect it and build it as a standalone it seems the stack does not work and just displays a blank window with the stacks name rather than the label.

I want to know if anyone else has this problem because I believe I should report it to quality control as a bug but want to be on the safe side first. If someone wants a screenshot of what I mean, I'll upload it when I reply.

Michael.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Password Protecting Stack

Post by Mark » Sun Sep 19, 2010 12:33 am

Hi Michael,

Yes, I've seen this before. It has absolutely nothing to do with the password. There might be an error in your preOpenStack handler or you are trying to make RunRev do something it cannot. First, check that there is no error in your preOpenStack handler. If you're sure all syntax is valid, you might try the following trick.

Code: Select all

on preOpenStack
  -- do only really necessary stuff here
  -- such as start using stack and insert
  -- front script and back scripts
  hide this stack
  send "initialise'" to me in 0 millisecs
end preOpenStack

on initialise
  -- do everything else here, such as setting
  -- the window rect and location and adjusting
  -- the loc and size of objects to the card size
  show this stack -- if you want
 end initialise
Between preOpenStack and initialise, RunRev will load all libraries and externals and you will be able to use them all in the initialise handler. Also, when the initialise handler runs, RunRev will have taken notice of the actual size of your window and e.g. quicktime movies.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Re: Password Protecting Stack

Post by SirWobbyTheFirst » Sun Sep 19, 2010 12:39 am

Ah as I said Mark, I wasn't sure whether or not it was a bug or not. I'll give that method a go and report back the results, in an application I used before I had a launcher stack which had preopenstack messages in the card but wasn't password protected and called a startup function in a seperate password protected stack and everything worked perfectly.

Additionally that password protected stack had a couple of handlers in like ErrorDialog, ShutdownRequest and ResizeStack and they all work perfectly, so you're probablies right.

Thanks alot dude. :)

Post Reply