Page 1 of 1

Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 4:07 am
by 88vpledung
Hi forum im a new so i want to say hello.

And second,

After the last time I saved and closed my livecode project now when I double click on the *.livecode file it opens livecode but not the stack. if i am in livecode and click file/open it never opens either. No error messages, just nothing. If i try to open a backup from a few weeks ago they open just fine. Is there a way to fix my up to date broken file? I the past when a file got broken I was able to send it to support and they fixed it. Is that still an option or maybe is there anything I can try to fix it myself? I tried uninstalling and renaming all the runrev folders in appdata and renaming the my livecode folder as suggested in another post, but due to the fact that only 1 stack wont open leads me to believe that solution wasn't going to work and it didn't.

Tks in advance!

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 5:36 am
by anmldr
Have you opened the Project Browser to be sure that it is not open? The stack may be just off screen.

Linda

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 9:09 am
by richmond62
I NEVER attempt to open LiveCode by clicking on a *.livecode file, I ALWAYS open LiveCode files via LiveCode itself.

In the past, when I tried clicking on a file things always went wrong.

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 10:23 am
by Klaus
Hi 88vpledung,

welcome to the forum!

Do this:
1. Create a new stack with a button
2. Give the button this script:

Code: Select all

on mouseUp
   answer file "Where is your stack?"
   put it into tStack
   if tStack = EMPTY then
      exit mouseup
   end if
   
   ## We center the stack on the screen in case it it off-screen
   set the loc of stack tStack to the screenloc
   
   ## We SHOW the stack in case it might be invisible
   set the visible of stack tStack to TRUE
   
   ## Avoid any possible PRE-OPEN-STACK-CARD handlers that may get in the way
   lock messages
   
   ## Now see if the stack can be opened
   go stack tStack
end mouseUp
3. Click the button
4. Tell us if it worked. :-)


Best

Klaus

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 11:00 am
by richmond62
I may be a bit goofy, but:

Code: Select all

## Now see if the stack can be opened
   go stack tStack
If the stack can be centred and made visible, surely that means it is already open?

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 11:12 am
by Klaus
No, we can set properties for "not yet open" stacks.

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 11:14 am
by richmond62
Klaus wrote:
Wed Jun 17, 2020 11:12 am
No, we can set properties for "not yet open" stacks.
I learn something useful almost every time you post something Klaus.

Thank you. 8)

Re: Hi all, i cannot open *.livecode

Posted: Wed Jun 17, 2020 12:16 pm
by Klaus
Some more info...

In this case:

Code: Select all

on mouseUp
   answer file "Where is your stack?"
   put it into tStack
   if tStack = EMPTY then
      exit mouseup
   end if
   
   ## We center the stack on the screen in case it it off-screen
   set the loc of stack tStack to the screenloc
...
LC will load that stack invisibly into memory without MESSAGES.
LC will apply the changes to the MAINSTACK in that stackfile, in case that stacks has substacks
If you quit LC, the changes to that stack will NOT be saved unless you do:

Code: Select all

...
save stack tStack
...
And that stack will stay in memory until you quit LC or explicitely:

Code: Select all

...
close stack tStack
...