Lots of substacks for the same type of data

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
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Lots of substacks for the same type of data

Post by jalz » Tue May 29, 2012 11:41 pm

Hey all,
Just want to make sure I'm structuring my database application properly. I've got a main stack called app which has code to connect to the db, I then have a substack called customers which contains a few scripts relating to retrieving data from the customer table and display results in a grid. When I want to edit a customer, I would like a customer edit screen to pop up in the form of a modal dialog, so am I right in assuming I need to create another substack within app called customer modal or can I do this as a card within the customer substack. To activate the customer modal the user will have to be on a card inthe the customer substack.im just think do I need to create a customer delete substack as well if I want this to be modal?

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

Re: Lots of substacks for the same type of data

Post by dunbarx » Wed May 30, 2012 1:18 am

If I read you correctly, the substack will be the place where all data and its changes are made. This is proper since the mainstack, as the executable, cannot save changes. You do not need to have actual substacks, you can also simply use other stacks as long as they are included in the package build. If you do use substacks, they must be moved to their own stack files in the application builder.

I think I have this right.

But to have modal gadgets, these must themselves be stacks. You cannot make one card in a stack "modal". This is a purely stack style. You can, of course, change the style of any stack, but this is not, I think, what you intended.

Craig Newman

Post Reply