message box covered with objects of some kind

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: message box covered with objects of some kind

Post by Klaus » Fri May 12, 2023 3:00 pm

Yep <> is the right one!

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

Re: message box covered with objects of some kind

Post by mwieder » Fri May 12, 2023 5:19 pm

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

mcelvain
Posts: 58
Joined: Sat Apr 29, 2023 10:13 pm

Re: message box covered with objects of some kind

Post by mcelvain » Fri May 12, 2023 10:25 pm

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 ?

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

Re: message box covered with objects of some kind

Post by mwieder » Sat May 13, 2023 2:05 am

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.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: message box covered with objects of some kind

Post by jacque » Sat May 13, 2023 5:02 pm

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 
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: message box covered with objects of some kind

Post by stam » Sat May 13, 2023 5:14 pm

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…

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

Re: message box covered with objects of some kind

Post by mwieder » Sat May 13, 2023 7:28 pm

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.

mcelvain
Posts: 58
Joined: Sat Apr 29, 2023 10:13 pm

Re: message box covered with objects of some kind

Post by mcelvain » 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 ?



__________
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.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: message box covered with objects of some kind

Post by stam » Fri May 26, 2023 8:02 pm

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...

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: message box covered with objects of some kind

Post by jacque » Fri May 26, 2023 8:11 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mcelvain
Posts: 58
Joined: Sat Apr 29, 2023 10:13 pm

Re: message box covered with objects of some kind

Post by mcelvain » Sun May 28, 2023 12:48 am

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.

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

Re: message box covered with objects of some kind

Post by mwieder » Sun May 28, 2023 1:01 am

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.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: message box covered with objects of some kind

Post by jacque » Sun May 28, 2023 2:56 am

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mcelvain
Posts: 58
Joined: Sat Apr 29, 2023 10:13 pm

Re: message box covered with objects of some kind

Post by mcelvain » Mon Jun 05, 2023 3:04 pm

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.

mcelvain
Posts: 58
Joined: Sat Apr 29, 2023 10:13 pm

Re: message box covered with objects of some kind

Post by mcelvain » Sat Jun 17, 2023 10:47 pm

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”