Sub-stack hassles with bg grc

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

Post Reply
JGonz
Posts: 24
Joined: Wed May 22, 2013 2:21 pm

Sub-stack hassles with bg grc

Post by JGonz » Tue Jun 18, 2013 9:00 pm

Hi,

Have a main stack now that works fine (shape as a grc, bg as a grc, 4 cards). Now, dependent of the choices of this main stack I want to show a sub stack window at a certain point.

My code:

Code: Select all

lock screen
   go cd the short name of me of stack "content"
   move stack "content" to the right of me +397, the top of me + 490
   show stack "content"
   unlock screen
For some strange reason sub-stack "content", that doesn't have more than a bg group consisting of the card bg, a title field and an exit btn right now, loses it's loc any other time i save it. And loses its bg grc (part of the group), and shows at strange places.

To be clear: anything works ok, but when I use the saved work the other morning, all's gone haywire?

I have set the locs (and the visible) of the sub-stack over and over, but too often the next day the loc as well as the bg grc is borked. Really, I save it every day when it works, to find a borked version the other day.

What's goin on, anybody an idea?

Have fun!

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Sub-stack hassles with bg grc

Post by Klaus » Wed Jun 19, 2013 12:13 pm

Hi JGonz,

never heard of this phenomenon in the last 20 years I work with Livecode and its ancestors!?
Did you "lockloc" all your objects that get "borked"? Any scripts involved? Honestly? :-D

And how "borked" are the objects in fact? Can you post a screenshot somewhere?
Or send me a screenshot, if you are not yet allowed to post here: klaus AT major-k.de

To your script:
"lock screen" unfortunately only woks inside of a stack and not on the screen!
So you should do something like this:
...
## Set loc BEFORE you open the stack
set the loc of stack "content" to the right of me +397, the top of me + 490

## Now go to desired card in stack
go cd (the short name of me) of stack "content"
...

No need to hide/show or whatever.


Best

Klaus

JGonz
Posts: 24
Joined: Wed May 22, 2013 2:21 pm

Re: Sub-stack hassles with bg grc

Post by JGonz » Sat Jun 22, 2013 3:42 pm

Hi Klaus,
Klaus wrote:never heard of this phenomenon in the last 20 years I work with Livecode and its ancestors!?
This is good news - because it means that it's me that messed it up somehow, and that should be correctable.

Main reason for my question was to to hear if there's something known, that's to consider (for instance: "Never create a group containing a graphic after eating garlic!" or such ...). Too often I have wasted days and days of scratching my head until I learned that I had become victim of an old bug.
Klaus wrote:Did you "lockloc" all your objects that get "borked"?
This might be part of the problem. I'm rather sure to have lockLoc-ed anything when I created the first cd, but when I look now all locLocks are gone.
Klaus wrote:Any scripts involved? Honestly? :-D
Only a few ... *blushing*
Klaus wrote:And how "borked" are the objects in fact? Can you post a screenshot somewhere?
How borked? Unbelievable borked :) I should frap it.

I seem to have fallen to an old mistake: Doing too many things at the same time, without knowing too well what I do ...

Stopped this for now, and am trying again. This time with more caution, and regarding your hint about "lock screen". ;-)

Thx a lot for your help! Have a good time!

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Sub-stack hassles with bg grc

Post by Klaus » Sat Jun 22, 2013 3:56 pm

JGonz wrote:... and regarding your hint about "lock screen".
lockloc! :-D

Post Reply