Page 3 of 4

Re: message box covered with objects of some kind

Posted: Fri May 12, 2023 3:00 pm
by Klaus
Yep <> is the right one!

Re: message box covered with objects of some kind

Posted: Fri May 12, 2023 5:19 pm
by mwieder
Indeed it is. My writing before thinking.
But mostly I tend not to use negative conditionals anyway, because I find it makes code easier to read.

Code: Select all

if <condition> then
else
end if

Re: message box covered with objects of some kind

Posted: Fri May 12, 2023 10:25 pm
by mcelvain
These are copied; pasted SC scripts.

"elvis" is a term I'd put in to force a SC error stop which also revealed my variable list.

LC's approach (marking script by clicking at left of designated line) works much better; but for the same reason.

Dunno why.

Can't stand Elvis.


-----------

Question: doesn't bg script only respond to calls ?

Why would my preOpenStack-free stack handler be called by a "preOpenStack" in bg script ?

Re: message box covered with objects of some kind

Posted: Sat May 13, 2023 2:05 am
by mwieder
Look at Richard's message diagram again - background scripts come right before the engine. So everything in it is fair game for any stack or control.
If you want your script to respond only to explicit calls then your best bet would be to make it a substack.

Re: message box covered with objects of some kind

Posted: Sat May 13, 2023 5:02 pm
by jacque
mwieder wrote: Fri May 12, 2023 5:19 pm But mostly I tend not to use negative conditionals anyway, because I find it makes code easier to read.
I use them mostly when the condition can have more than one state and I only want to respond to one of them.

Code: Select all

if myProperty is not true then --  it's either false or empty 

Re: message box covered with objects of some kind

Posted: Sat May 13, 2023 5:14 pm
by stam
I use them frequently when needing to abort a handler if a condition is not met at the outset, eg

Code: Select all

command myHandler
   If not <condition> then exit myHandler
   <Handler code starts here>
end myHandler
I’m more comfortable doing this than putting the hole handler inside an if/then block. But that’s just me…

Re: message box covered with objects of some kind

Posted: Sat May 13, 2023 7:28 pm
by mwieder
Heh. Well, I did say "mostly".

And yes, I also do the

Code: Select all

if <something> is not true then
construct in cases where <something> is a three-state boolean: true, false, empty.
That resolves it to true or not true.

Re: message box covered with objects of some kind

Posted: Fri May 26, 2023 7:39 pm
by mcelvain
As a newbie here, my message box damage provides an example of how typing without thinking in a scripting environment is ill-advised(1).

Before I re-install, I at least want to come up with a recipe’ for what some of you refer to as the “dreaded ‘something’ dialog.”

Question:

Would using Macintosh “Time Machine” ap to restore a particular component of the initial LC build suffice ?



__________
1. I’m thinking it’s a combination of trying to use SuperCard language (which LC begins compiling before dumping) and bg script.

Against advice, I’m writing a translation script that will at least render my SC scripts into something the debugger can handle.

Re: message box covered with objects of some kind

Posted: Fri May 26, 2023 8:02 pm
by stam
mcelvain wrote: Fri May 26, 2023 7:39 pm As a newbie here, my message box damage provides an example of how typing without thinking in a scripting environment is ill-advised(1).

Before I re-install, I at least want to come up with a recipe’ for what some of you refer to as the “dreaded ‘something’ dialog.”

Question:

Would using Macintosh “Time Machine” ap to restore a particular component of the initial LC build suffice ?
Before going for the nuclear solution - have you checked to see if deleting the preferences file fixes your issue?
To locate the prefs file, use the code:

Code: Select all

put the filename of stack "revpreferences"
Quit LC
Delete the file in the path returned by the code above.
Relaunch LC - it will create a new preferences file.

That has fixed weird stuff with the messagebox I've caused with faulty coding before, it is worth a try...

Re: message box covered with objects of some kind

Posted: Fri May 26, 2023 8:11 pm
by jacque
Replacing LC would work, from a Time Machine backup or by reinstalling. That would be safer than trying to track down which component(s) you need to replace. I assume you've restarted LC? I've messed up the message box before and restarting LC usually fixes it.

You aren't the only one who's done this. Just yesterday I typed "set the scalefactor of this stack to 2" and hit the return key without thinking -- and the message box blew up to a huge size. I accidentally did the same thing with the script editor which happened to be in focus when I hit return in the message box. For a moment I wondered why my script was in 96 point type and the rest of the screen was obliterated. Both were easy to revert, but "stuff" happens.

Re: message box covered with objects of some kind

Posted: Sun May 28, 2023 12:48 am
by mcelvain
Stam and Jacque,
thank-you for responding !

Stam, yes, I have deleted the preference file using the tip you kindly provided.

No change.

Question to both you and Jacque is whether, before doing a full re-install (a.k.a. “nuclear” option), backing up documents pertaining to stacks I’ve created, then re-inserting them to the newly re-installed LiveCode folder is advisable.

Obviously, this list would include my stacks.

Are there other hidden files I should extract then reinsert ?

I am so tempted to heart transplant just the message box process, just as I was apparently drawn to previous experiments which messed it up in the first place.

However, I’m beginning to understand that hanging with this crowd requires a kind of careful visual thinking which my eager fingers tend to prevent.

So, I’m up for that.

Just need to supplement my brain with visual drawings.

Re: message box covered with objects of some kind

Posted: Sun May 28, 2023 1:01 am
by mwieder
Should be a simple matter of renaming your current installed version and then reinstalling. Then you'll have something to compare the virgin installation with.

Re: message box covered with objects of some kind

Posted: Sun May 28, 2023 2:56 am
by jacque
The LC app and all its parts is self-contained. Your own stacks and any plugins you've added are stored elsewhere on your drive. There's nothing to insert. Your stacks are just documents of the LC app.

Do what Mark suggests and everything will be fine.

Re: message box covered with objects of some kind

Posted: Mon Jun 05, 2023 3:04 pm
by mcelvain
Thank-you, Mark and Jacque.

I’ve heard you recommend removing pref file/reloading, renaming LC folder/reinstalling, and stating that personal stacks are not stored where LC internals are.

Forgot to mention that the mb “barnacles” act like scrolling fields w movable horizontal scrollbars.

Re: message box covered with objects of some kind

Posted: Sat Jun 17, 2023 10:47 pm
by mcelvain
Reinstallation boxed fixed the Message Box “barnacle” issue, but greatly sped-up the performance of all my stacks.

Although I was not able to produce the requested “recipe” for producing what has been called the “dreaded something dialog,” I will keep my eyes peeled.

To test my theory that it occurred on “closestack” from an unsaved new stack which was not at the “top,” which received a call from my background script to “save this stack” then “compact the stack” then “save this stack,” all while the message box was on top, I might consider dredging up my background script using “Time Machine.”

My inclination to do this would be before downloading the next upgrade, or something.

_____________________________________________

BTW: thanks again for all responses: the two that solved the issue are:

1. Check my bg script
2. reinstall