Page 1 of 1
stack structure
Posted: Thu May 31, 2012 9:37 pm
by yarran
> The application I want to develop somewhat mirrors a school in its structure.
> There are faculty subjects within the school BUT there are year levels within the
> subjects. I want to be able to move within the (year)levels as well as within
> the subject and between year levels.
>
> I presume that I can do this by moving from named card to named card. But how do
I
> implement this structure?
>
> Also, what is the best way to allow this movement?
>
> Can I implement the 'subjects' and/or 'levels' as substacks of the
mainstack('the
> school'). Or do the resources for each level or subject become a substack?
Re: stack structure
Posted: Fri Jun 01, 2012 2:41 pm
by dunbarx
I am not really sure what you are building, but it sounds like moving from dedicated cards within a single stack is best and simplest. Each card can be custom configured to hold whatever content you require.
As to the best way to navigate, again, what exactly are you trying to do? Choose among several options from a list and then go? If it is only the mechanics, as opposed to the structure, then this is very simple. But write back with more details.
Craig Newman
Re: stack structure
Posted: Sat Jun 02, 2012 1:26 pm
by jmburnod
hi yarran,
You can use names of cards, controls and external files to create a systematic navigation.
For example you have:
•Two global variables gDisciplin = "biology" and gCurLevel = 1
•One folder "biology" with two files "biology_1.txt" and "biology_2.txt". This list define the content of flds, images, player etc…
•Two card "biology_1" and "biology_2"
Code: Select all
global gDisciplin,gCurLevel
--Use concatenation of global variables to get the name of the dedicated card
on OpenWishcard
put gDisciplin &"_"& gCurLevel into myWishcard
open cd myWishcard
end OpenWishcard
on preopencard
put the short name of this cd &".txt" into tName
importLesson tName
end preopencard
-- Import the file about the current card
on importLesson pName
-- define a path
-- import the file from the path and organise data into the card
end importLesson
-- Setting global gDisciplin
on setDisciplin pName
put pName into gDisciplin
end setDisciplin
-- Setting global gCurLevel
on setCurLevel pLevel
put pLevel into gCurLevel
end setCurLevel
Best regards
Jean-Marc
Re: stack structure
Posted: Mon Jun 04, 2012 7:46 am
by yarran
Craig,
Thanks for the feedback. I want to develop levels of complexity (like Russian dolls or an onion - peeling off layers into deeper ideas). I think the navigation will be easy enough with the livecode naming system. I am more concerned with how I structure this idea. There are many 'onions' in my model.
Re: stack structure
Posted: Mon Jun 04, 2012 7:48 am
by yarran
Jean-Marc,
Thank you for your idea and the code!! It is good. I will have to give it some thought to see how closely it matches what I want to do.