App structure
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 4
- Joined: Wed Jul 11, 2012 4:42 pm
App structure
Hi
I have a question that is probably pretty simple, and I hope there is a simple answer. I'm envisioning a project with an open-branching structure, and I'd like to know how to best build it. I'm attaching the plan.
Are the red, green and blue branches substacks? Are they separate stacks that all get added to a stack file?
I've got a pretty good handle on objects, navigation and the scripts, I just don't see the big picture yet.
Thanks for any tips you can give me. Once I 'see' it I can streamline my learning.
Tamara
I have a question that is probably pretty simple, and I hope there is a simple answer. I'm envisioning a project with an open-branching structure, and I'd like to know how to best build it. I'm attaching the plan.
Are the red, green and blue branches substacks? Are they separate stacks that all get added to a stack file?
I've got a pretty good handle on objects, navigation and the scripts, I just don't see the big picture yet.
Thanks for any tips you can give me. Once I 'see' it I can streamline my learning.
Tamara
Re: App structure
Tamara-
Welcome to the forum. One thing that should help your thinking about this is that you can't have substacks of substacks. One level deep only. I don't quite get what you have in mind, but it looks like you're trying to nest more levels than that. Substacks can talk to each other, if that helps.
Welcome to the forum. One thing that should help your thinking about this is that you can't have substacks of substacks. One level deep only. I don't quite get what you have in mind, but it looks like you're trying to nest more levels than that. Substacks can talk to each other, if that helps.
Re: App structure
It would probably be easier to make each of them a card inside one stack. Easier, in that referencing variables between cards does not require a stack reference. And when coding, I find it much easier to jump between cards, than keeping multiple stack windows open. Each card has it's own unique window for objects, And it's own openCard and closeCard messages (events). No matter how many cards you have, it's very easy to jump from one to another.
-
- Posts: 4
- Joined: Wed Jul 11, 2012 4:42 pm
Re: App structure
Thanks for the feedback, but I don't think I've explained my needs correctly. I'll explain it a bit more, referencing my diagram. In my diagram those are all cards, and I can see that doing it in one mainstack is possible, with navigation buttons on each card. However, my background is with software called iShell, and I'm used to structuring things a certain way. For example, if this was an app on gemstones, the second yellow card might contain an alphabetical list. After choosing one from the list, say ruby, you go to the series of red cards. The first red card would be a photo, the second red card a list of properties, and the third card some other relevant info, etc. The vertical connections would allow for flipping through the photos, or properties, etc. So without going back to the alphabetical list, I could swipe up to view the 'emerald' photo (the green series), and again for the sapphire (blue series).
If these are all cards in one stack, the navigation gets a bit messy, doesn't it?
Tamara
If these are all cards in one stack, the navigation gets a bit messy, doesn't it?
Tamara
Re: App structure
That does make things clearer - thanks for the explanation.
You can do this a number of ways. The easiest to think about is maybe having a naming convention and marking cards of a certain class. So you could have all your photo cards named "Photo NNN", where NNN is a number or the name of the gemstone or whatever, and then when you move to a photo card you mark all the cards with "photo" in the name and you can "go to the next marked card" to see the next photo.
But what I would do when faced with this situation is create three groups on the card. The first group would contain the photo, the second would contain the properties, etc.
Then on preopencard hide the groups you don't want to see and show the one you do want to see. You can keep track of which mode you're in so that moving to the next card would show its photo if you're in photo mode, its properties if you're in properties mode, etc.
You can do this a number of ways. The easiest to think about is maybe having a naming convention and marking cards of a certain class. So you could have all your photo cards named "Photo NNN", where NNN is a number or the name of the gemstone or whatever, and then when you move to a photo card you mark all the cards with "photo" in the name and you can "go to the next marked card" to see the next photo.
But what I would do when faced with this situation is create three groups on the card. The first group would contain the photo, the second would contain the properties, etc.
Then on preopencard hide the groups you don't want to see and show the one you do want to see. You can keep track of which mode you're in so that moving to the next card would show its photo if you're in photo mode, its properties if you're in properties mode, etc.
-
- Posts: 4
- Joined: Wed Jul 11, 2012 4:42 pm
Re: App structure
Perfect, thank you. I can see how either of your methods would work.
I still have a lot of learning to do, but I find if I have the big picture explained then the details fall into place a bit better.
Cheers,
Tamara
I still have a lot of learning to do, but I find if I have the big picture explained then the details fall into place a bit better.
Cheers,
Tamara
Re: App structure
Cool. Check back if you run into problems.
BTW - I usually use a tabbed button control for this sort of thing. In the button's script I stick a script like
BTW - I usually use a tabbed button control for this sort of thing. In the button's script I stick a script like
Code: Select all
on menuPick pChosen
hideAllGroups
show group pChosen
-- optionally do whatever setup needs to be done here
switch pChosen
case "photos"
break
case "props"
break
case "misc"
break
default
end switch
end menuPick
on hideAllGroups
hide group "photos"
hide group "props"
hide group "misc"
end hideAllGroups
-
- Posts: 4
- Joined: Wed Jul 11, 2012 4:42 pm
Re: App structure
Great help! I'll probably use this script... but I'm a long way from implementing it. I can see this forum is going to be really handy over the next few weeks!
Tamara
Tamara