"Behave like a background" doesn't work

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

Kem
Posts: 2
Joined: Sat Oct 29, 2011 4:00 pm

"Behave like a background" doesn't work

Post by Kem » Sat Oct 29, 2011 4:35 pm

Hi everyone!

I created a new stack, added two buttons (prev, next) to navigate, grouped the buttons and selected "shared group" and "behave like a background". If I choose "New Card" from the object menu, I get a completely blank card without my buttons. After returning to the first card and checking the properties, "behave like a background" is deactivated. What went wrong?

I am using LiveCode 4.6.4 on Mac OS Lion.

Kem
Constantly trying not to ruin it all.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: "Behave like a background" doesn't work

Post by sturgis » Sat Oct 29, 2011 5:02 pm

Just tried this, also on 4.6.4 looks like a bug to me.

If I set the backgroundbehavior using the inspector it doesn't stick.

However, setting it with the message box works.

So for now, if you select the group then

set the backgroundbehavior of the selobj to true you should be good to go.

Kem
Posts: 2
Joined: Sat Oct 29, 2011 4:00 pm

Re: "Behave like a background" doesn't work

Post by Kem » Sat Oct 29, 2011 6:45 pm

Yes, that works! Thanks a lot.
Constantly trying not to ruin it all.

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: "Behave like a background" doesn't work

Post by Mag » Mon Sep 09, 2013 10:18 pm

The same here, it works only when set with the message box.

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

Re: "Behave like a background" doesn't work

Post by dunbarx » Tue Sep 10, 2013 3:43 am

Never seen this. Is it a v4.6 thing (I went through that version), or a Lion thing?

Craig Newman

garmeister
Posts: 29
Joined: Sat Apr 10, 2021 6:56 pm

Re: "Behave like a background" doesn't work

Post by garmeister » Tue May 11, 2021 10:02 pm

Hate to trudge up a post from years ago, but I'm running into the same issue in the year 2021. I have a very simple stack with three cards, the first card contains two buttons that are grouped. In my case, the "Behave like a background" remains checked but the grouped buttons are not applied to the subsequent cards. I applied the following code as suggested in the messageBox just to see if that would have any effect:

Code: Select all

set the backgroundbehavior of the selobj to true
Again the "Behave like a background" already remains checked, so the above code has no effect, unlike the previous user whereby the button was unchecked. Running the latest version LiveCode Indy 9.6.2 RC6 on Mac OS Big Sur 11.3.1.

Any suggestions?

- Gary
Gary E Chike DMD
"Experience is what you get when you don't get what you want"

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

Re: "Behave like a background" doesn't work

Post by dunbarx » Tue May 11, 2021 10:33 pm

Hi.

Could be a problem if the background group is not on a card FROM WHICH you create a new card. in other words, if you have such a group on card 1 of a stack of three cards, and create a new card from card 3, the group on card 1 will not place itself on the new card 4. This works everywhere. You may have many cards, with backGround groups here and there, but creating new cards must "begin" from a card with a group on it.

Is this clear?

You always have the "place" command to do it by hand, or by script.

Craig

garmeister
Posts: 29
Joined: Sat Apr 10, 2021 6:56 pm

Re: "Behave like a background" doesn't work

Post by garmeister » Tue May 11, 2021 11:46 pm

Thanks for your input Craig. I was following a beginner's tutorial, so the project is very simple with only 1 stack, 3 cards, 1 group, 2 buttons. Not a whole lot going on. The behavior appears reproducible when starting afresh. I'll try it on my Windows Desktop. Of course, I could do it 'manually' by using Object > Place Group. :|
Attachments
Screen Shot 2021-05-11 at 6.22.01 PM.png
Gary E Chike DMD
"Experience is what you get when you don't get what you want"

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: "Behave like a background" doesn't work

Post by sturgis » Wed May 12, 2021 12:18 am

Do you create the first card, put the controls on the card, group the controls, set the background behavior property, and then create the 2 other cards?

Or do you create 3 cards, place controls on 1 card, group them, set the background behavior property..

IF the first is what you're doing, it should work, and when you create cards 2 and 3, the group should be automatically placed on them. If this isn't happening, something else is up.

If however, your order of operations matches the 2nd sequence, then it won't retroactively place groups on already existing cards and you'll have to use "place" them there. (this is what Dunbar was getting at. The order in which you do things, at least in this case, matters) Its possible the tutorial might need some clarification, or if you're doing the sequence in the correct order and its not working, we might need to dig more and figure out why.

garmeister
Posts: 29
Joined: Sat Apr 10, 2021 6:56 pm

Re: "Behave like a background" doesn't work

Post by garmeister » Wed May 12, 2021 2:01 am

Hey Sturgis (and Dunbar),

That did the trick ... I had to go through the motions a few times to get the order down. But I got it finally! Thanks!

Gary
Gary E Chike DMD
"Experience is what you get when you don't get what you want"

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

Re: "Behave like a background" doesn't work

Post by dunbarx » Wed May 12, 2021 2:47 am

Glad to hear it.

This is explicitly intended behavior. Otherwise, imagine if you will a stack with bg groups sprinkled here and there. Nobody would want a new card, however and wherever created, to all of a sudden contain all those diverse groups, likely cluttering up the place.

But you can indeed have those groups sprinkled around, and if you go to a card that contains one, and make a new card FROM THERE, the group will clone itself onto that new card, which will appear right after the "base" card. This can be done throughout, and wherever.

Craig

stam
Posts: 2990
Joined: Sun Jun 04, 2006 9:39 pm

Re: "Behave like a background" doesn't work

Post by stam » Wed May 12, 2021 8:48 pm

dunbarx wrote:
Wed May 12, 2021 2:47 am
This is explicitly intended behavior. Otherwise, imagine if you will a stack with bg groups sprinkled here and there. Nobody would want a new card, however and wherever created, to all of a sudden contain all those diverse groups, likely cluttering up the place.

But you can indeed have those groups sprinkled around, and if you go to a card that contains one, and make a new card FROM THERE, the group will clone itself onto that new card, which will appear right after the "base" card. This can be done throughout, and wherever.
Interesting take on how to set up different backgrounds; i wonder why they didn't go the way of established UIs and workflows instead. I'm thinking of presentation software; you can define layouts and each layout would have a dedicated background; the you just choose which layout you want for your slide. This is pretty similar but less explicit, giving all newcomers (myself included at the time) a headache ;)

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

Re: "Behave like a background" doesn't work

Post by FourthWorld » Wed May 12, 2021 10:13 pm

stam wrote:
Wed May 12, 2021 8:48 pm
wonder why they didn't go the way of established UIs and workflows instead. I'm thinking of presentation software; you can define layouts and each layout would have a dedicated background; the you just choose which layout you want for your slide. This is pretty similar but less explicit, giving all newcomers (myself included at the time) a headache ;)
Seems very similar to me, just more flexible since a dev tool needs to be able to do things far beyond what a slide show does.

With a slideshow, you define the background, then make the slides. You can modify the contents of the background, and they will appear on all slides, because the background is always present.

With LiveCode, you create a background group, then make cards. You can modify the contents of the group, and the will appear on all cards, because the background group is already present.

Unlike a slide show, with LC you can have any number of groups, and control which cards they're shared across, or not shared at all. That level of flexibility may not be needed in a slide show, but is essential for the vast range of things LC is used to make.

All that flexibility comes at one low cost: if you forgot to make a shared group before you started building out cards, you'll have to place it. You can do it from the Message Box if you like, and the IDE provides "Place Group" menu in the "Objects" menu where you can just select by name.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

stam
Posts: 2990
Joined: Sun Jun 04, 2006 9:39 pm

Re: "Behave like a background" doesn't work

Post by stam » Thu May 13, 2021 7:14 pm

FourthWorld wrote:
Wed May 12, 2021 10:13 pm
stam wrote:
Wed May 12, 2021 8:48 pm
wonder why they didn't go the way of established UIs and workflows instead. I'm thinking of presentation software; you can define layouts and each layout would have a dedicated background; the you just choose which layout you want for your slide. This is pretty similar but less explicit, giving all newcomers (myself included at the time) a headache ;)
Seems very similar to me, just more flexible since a dev tool needs to be able to do things far beyond what a slide show does.

With a slideshow, you define the background, then make the slides. You can modify the contents of the background, and they will appear on all slides, because the background is always present.

With LiveCode, you create a background group, then make cards. You can modify the contents of the group, and the will appear on all cards, because the background group is already present.

Unlike a slide show, with LC you can have any number of groups, and control which cards they're shared across, or not shared at all. That level of flexibility may not be needed in a slide show, but is essential for the vast range of things LC is used to make.

All that flexibility comes at one low cost: if you forgot to make a shared group before you started building out cards, you'll have to place it. You can do it from the Message Box if you like, and the IDE provides "Place Group" menu in the "Objects" menu where you can just select by name.
Not sure flexibility is any different; the point is was making though is accessibility to new users.
In presentation apps (and i'm specifically referring to mainstream apps like Keynote and to a lesser extent Powerpoint), you start out with a default selection of layouts which you can modify or add to - but it's clear you can choose a layout and you get a visual list of layout options. And you can have templates that include different default layouts (not hard to see how this could be used for RAD). You can copy/paste any 'group' to the background of that layout, and modifying this will change all slides with the same background. So functionality is pretty much the same as LC, except LC doesn't offer any default layouts.

However in LC it's not really that obvious to newcomers how you would make a group a background and how to add to cards. Of course, once you know it's not difficult at all - but i'm guessing this is a topic that has been asked and answered more than a few times over the years, because there are no visual cues in the IDE to make it relatable to people coming from elsewhere.

Don't get me wrong - i think it's a great feature and I do use it; just that better accessibility to newcomers (and established users!) would be helpful. And I think it would be easier to pick a layout from a visual list of thumbnails rather than having to go to the card with the layout and create new from there, or placing the group on a card... Or that's just me anyway...

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

Re: "Behave like a background" doesn't work

Post by FourthWorld » Thu May 13, 2021 9:47 pm

stam wrote:
Thu May 13, 2021 7:14 pm
Not sure flexibility is any different; the point is was making though is accessibility to new users.
Depends on the expectations of the new user.

I don't know many people who pick up a software development toolkit and learn an entire scripting language when all they need is a slide show. Plenty of great free slide show apps out there that are purpose-built for that specific task.

I happen to make my own slide shows in LiveCode, and have used them speaking at more than two dozen conferences. But I don't know anyone else who does that. Indeed, the only reason I did it was as an exercise in exploring some ideas for that sort of authoring which may be useful in other things down the road. And it was fun. But it was admittedly far more work to write a slide show tool from scratch than to just use any of the well-made ones freely available.

That said, LiveCode is closer to matching expectations end-users might have about entirely different tools like slide shows than most other software development toolkits. That says a lot for its well-integrated GUI object model. It's close enough, in fact, that we're having this discussion here, a discussion that is plausible and interesting in our LiveCode world but would make no sense at all in the XCode forums or pretty much any venue for general-purpose software development tooling.
In presentation apps (and i'm specifically referring to mainstream apps like Keynote and to a lesser extent Powerpoint)...
While LiveCode can be used to make presentation tools, it isn't itself a presentation tool. Different categories of software have different feature priorities. A word processor is not a spreadsheet. A doily is not a pterodactyl. XCode, Xamarin, Visual Studio, LiveCode, and all the rest are used to build all sorts of things, but are not themselves the same as any one of the things programmers use them to build. Indeed, that transformation of raw materials into a specific end-user application is the work of a software developer.
However in LC it's not really that obvious to newcomers how you would make a group a background and how to add to cards.
Understandable, since not many people choose a software development toolkit to make slide shows.

But if you want to make a slide show tool, or a courseware builder (similar but with assessment modules and LMS integration), or corporate training materials, or interactive product information systems, or medical training systems, or a wide range of other screen-to-screen multimedia authoring systems, LiveCode will make the work far more productive than anything else I've even read about.

And that's not just conjecture; in my decades in this business I've built everything I just listed, in LiveCode, after extensive evaluation of alternatives. I'm even using LC to help support the translation of another medical tutorial for web deployment this month. It's a flexible and useful toolkit.

Indeed, multimedia authoring is an area where LC can shine most brightly: not as a multimedia authoring environment, but as a toolkit for building bespoke multimedia authoring environments.

General-purpose authoring tools can provide templates. A bespoke authoring tool can provide the exact templates an author needs, with specialized features no general-purpose toolkit can provide as gracefully.

Need a shortcut for laying out multiple resuscitation protocol diagrams which reflect the different terminologies and practices between US and UK medical standards? I wrote that years ago. Good luck finding that feature in PowerPoint. :)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”