navigator bar keeps disapearing of new cards after few minutes

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Tue Mar 23, 2021 6:10 am

Problem : The nav bar disapear from 2 new added cards after few minutes...
LC 9.6.1 / Linux Zorin (Ubuntu branch)
Steps :
- Drag and Drop of a new Navigation Bar on the first card of the app : MainPage.
- A second cards exist with no Nav Bar on it.
- Adding 2 new empty cards...
- Cards 3 and ,4 now display the same Nav Bar as on Main card.
Clicks works allowing to navigate between Cards 1, 3 and 4.
Nav Bar color is modified, and changes are reflected on all page.

- A Change is brought on the Main page to the width of the Nav Bar.
- nav bar now displays on full width of Main page:)
Nav bar disapeared from Cards 3 and 4.
- changing the size (back)to a smaller visible width on mainpage...
*** Somehow, "set as a background" is not anymore activated..
- reactivating "set as a backgound" anew...()?!!
no change in display.
option is activated but NB does not display anymore on cards 3 and 4.
Nav bar is permanently lost on Cards 3 and 4 ! :oops: :oops:

after 2 other trials:
- deleting the existing Nav Bar,
- deleting cards 3 and 4
- droping a new NB on MainPage,
- recreating 2 new cards 3 and 4...
same results happen, NB is lost again after few manipulations.
:cry:

Anywork arround welcomed ...App dev can't go any further now. :!: :|
Last edited by liveme on Tue Mar 23, 2021 8:47 am, edited 2 times in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: navigator bar keeps disapearing of new cards after few minutes

Post by richmond62 » Tue Mar 23, 2021 7:59 am

Why do I think you are going about installing the navBar on individual cards in an odd way?

Personally I'd set up a single card with the navBar the way I want it and then clone that card
as many times as I needed.

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Tue Mar 23, 2021 8:35 am

I'm just activating the Nav Bar as a default background.
Docs say, doing so will activate the Nav Bar on all new Cards.
which is what happened. preexisting... Card n2 did not "receive" the Nav Bar.
while newly created Card 3 and 4, instantly received a clone ..and working...Nav Bar, whithout me doing anything else than activating the "set as a background" option.

Now if this is not the right way to have a Nav Bar being displayed on any new card...I am not aware of another method !
(beside manualy copying and pasting it on, each card, which I dont think is the correct way to have it set up)

:roll:


Image
editing :


Image

any proper way more than welcome ! :idea: :?: :idea:


Ps:I'm not against the idea of cloning my 1rst (Mainpage) card to "create more cards"...
though, if that is not a bug I guess the Docs should advise doing so...or that creating new cards does not always (or at all) work as a reliable method for a stable NB display.. :oops: :idea:
Attachments
add new card nav bar.png
bug nav bar.png


jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: navigator bar keeps disapearing of new cards after few minutes

Post by jacque » Tue Mar 23, 2021 6:05 pm

Don't clone the card or paste in a copy of the navbar, you're apt to get duplicate individual copies. Instead, you need to use the navbar as a shared background group.

Is the navbar in a group? If not, select it and group it. Set the group to act as a background. New cards will display the group. You can place the group on cards that already exist by choosing "place group" in the Objects menu.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Tue Mar 23, 2021 9:15 pm

Hi Jaque,

Thanks for the tips - as for the Group aspect.
I am grabing the "nav bar" component from the Tool Menu, then droping it straight on the 1rst Card background:
I have the understanding that this component is in itself a group.
I have not created anygroup of anything so far in my stack.
- should I need to create a group X of something before, and droping the Nav Bar on top of this Group X :?:
If so...No I havent designed a group for this very purpose.
If this is what is required for the Nav Bar to display correctly on all other Cards, please confirm me this again.

The only time I deal with Group features is in the Group/ungroup menu in order to activate the "set the Nav Bar as a background"/Shared.
Other than that, I havent added any group on top of the Card background prior to dragging the new Nav Bar...
:arrow:

Thanks
bbb nav bar.png

bwmilby
Posts: 462
Joined: Wed Jun 07, 2017 5:37 am
Contact:

Re: navigator bar keeps disapearing of new cards after few minutes

Post by bwmilby » Tue Mar 23, 2021 10:59 pm

As Jacque said, the nav bar widget needs to be in a group and the group must be set as either shared or background. Then you can place that group on additional cards. This is the best way (in my opinion) to use this widget on multiple cards.

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Tue Mar 23, 2021 11:26 pm

Ok, that must have been the problem then...
I'll try that - hope I can create that "group" the right way, never done that before...
thanks for your time ppl !
:wink:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: navigator bar keeps disapearing of new cards after few minutes

Post by jacque » Tue Mar 23, 2021 11:36 pm

I have the understanding that this component is in itself a group.
Not exactly. The navbar is a widget which is a self-contained, single object. To share the widget on other cards, it must be in a LC group. You can create a group that contains only the widget: select the widget with the edit tool and choose "Group Selected" from the Object menu.

Now the group will show in the Object/Place Group menu if the group does not already exist on a card. And if the group does exist on the current card, it will be included on a new card when you create one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Thu Mar 25, 2021 7:48 am

Thanks again Jaque, the NavBar Group seems to be sticking good now.
So, at what level should one places its na Bar icons Action script so that it works correctly :
- In Nav Abr Widget Edit ?
- or in Nav Bar Group Edit ?
*I've placed most others sript at the Stack Edit level.
:|
Nav bar group.png
Nav bar group.png (7.62 KiB) Viewed 2930 times
:wink: (happy coder face) lol

bwmilby
Posts: 462
Joined: Wed Jun 07, 2017 5:37 am
Contact:

Re: navigator bar keeps disapearing of new cards after few minutes

Post by bwmilby » Thu Mar 25, 2021 1:32 pm

You can place the script in the object or the containing group and it will be available to each card that has the group. You could also use a behavior on either one too but unless you are using a script only stack for the behavior it would not gain you anything here. Stack level would work but then you would need to be careful about sub stacks. Card is the only one that does not really make sense (due to the fact you would need to copy it to each card script which defeats the purpose).

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Thu Mar 25, 2021 6:41 pm

Thanks Brian...
Stack level would work but then you would need to be careful about sub stacks
hmm.. I dont think I had heard about "sub stacks" before today 8)
Thanks for all those details !

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

Re: navigator bar keeps disapearing of new cards after few minutes

Post by dunbarx » Fri Mar 26, 2021 1:48 pm

Hi.

A subStack is just a stack, but it is a "child" of a mainStack.

Try it. Make a new stack, name it, save it, and then from the "File" menu, select "New subStack of ...". This new stack will belong to the stack file of the mainStack. You can find it if you ask for "the subStacks" of your mainStack. There are a suite of properties in this arena, in that, for example, you can change its "mainStack".

If you are making a standalone, all the subStacks of a single mainStack will be included in the stack file of that mainStack.

Craig

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm

Re: navigator bar keeps disapearing of new cards after few minutes

Post by liveme » Sat Mar 27, 2021 7:16 am

Cool,
So , do you use sub-stack to have more room for extra code most of all ?

Post Reply