Does OpenStack trigger on each save in IDE?

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Does OpenStack trigger on each save in IDE?

Post by kaveh1000 » Tue Jan 28, 2020 5:43 pm

Hi all

Using 9.5.1 Indy on Mac Catalina

I have several Script only stacks that are loaded when I open a Main stack. Several have OpenStack in the scripts. Generally working well, but when I have the Script Editor open and I save I get an error (Red circle with cross in) that seems to be something to do with OpenStack. (Sorry I can't be more specific.) I then have to save and open again.

Looking at message watcher I think that OpenStack runs every time I say save. Is this always the case? can I stop running OpenStack when I save a stack?
Kaveh

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by FourthWorld » Tue Jan 28, 2020 6:55 pm

Saving a stack should not trigger any openStack message. Are you referring to building a standalone?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by kaveh1000 » Tue Jan 28, 2020 7:25 pm

Good question, as I think I read that after making a Standalone LC opens the current stack again.

But definitely just IDE. I attach a picture of message watcher. it is quiet until I press save. Then I see Openstack runs immediately and of course the handlers in OpenStack run.
Attachments
0000.png
Kaveh

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by mwieder » Wed Jan 29, 2020 3:45 am

Check what object that openStack handler is firing in.

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by kaveh1000 » Wed Jan 29, 2020 2:03 pm

Good question. Actually several of the script only stacks have openstack handlers. I know you rightly said that openstack has to go in a card, so only triggers first time stack opens, but SoS's do not have cards.

I am sure I need to clear my head, and not have openstack in SoS at all. I will try and gather all info and put in the main stack and in a card. Then will report back if still problem.

Thanks Richard and Mark.
Kaveh

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

Re: Does OpenStack trigger on each save in IDE?

Post by dunbarx » Wed Jan 29, 2020 3:52 pm

Does the "Find and Replace..." gadget find a string in the script of a SoS?

Craig

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by kaveh1000 » Wed Jan 29, 2020 4:01 pm

Using the "Find and replace" window, I can search and find everything in all SoS's. So if I search for OpenStack I find several.
Kaveh

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by mwieder » Wed Jan 29, 2020 5:37 pm

Kaveh-

In that message viewer plugin if you click on the openstack message it will show the containing object to you.

Interesting question about openStack in a SoS stack. Not sure how to deal with that.

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by kaveh1000 » Wed Jan 29, 2020 8:23 pm

OK. I have now removed all OpenStacks, so just one left in the one card of the Main Stack, as suggested by Mark some time back.

After more testing here is what I see:

I have a main stack that uses 8 external SoS stacks. The Main stack is running correctly and no script errors. I can save any of the stacks any time without errors, as long as Script Editor window is not open. Message Watcher just shows a single

Code: Select all

     saveStackRequest 7:15:34 PM (1579)
for each save.

I then open any Script Editor window. I save. An error immediately appears. (Error is different every time and I cannot find pattern for it.)

Message Watcher shows an extra

Code: Select all

      cIDETransient 7:15:42 PM (7954)
See screenshot.

I close the SE window. Program runs normally. I reopen SE window. Shows green tick and no errors.
Attachments
error.png
Kaveh

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by mwieder » Wed Jan 29, 2020 8:46 pm

You either need to declare your variables or turn off variable checking.

Code: Select all

on use_library_stack
  local tStackName

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Does OpenStack trigger on each save in IDE?

Post by kaveh1000 » Wed Jan 29, 2020 8:53 pm

Hah. Yes, I had switched on

Code: Select all

Strict compilation mode
in preferences. Serves me right for clicking something without knowing what it is!!

Thank you so much Mark.
Kaveh

Post Reply