guide-me / GuideMe

an interactive story viewer
MIT License
4 stars 8 forks source link

Move java script called functions to guide #21

Closed philormand closed 9 years ago

philormand commented 9 years ago

[*]I believe the following functions should all be part of the guide object. They're all really general purpose functions applicable to the current guide. There's no need to have them in different places. guideSettings.getFormField() guideSettings.getCurrPage() guideSettings.getPrevPage() comonFunctions.canShow() comonFunctions.getFlags() comonFunctions.SetFlags() comonFunctions.UnsetFlags() I'd also like to see consistent capitalization. On comonFunctions.getFlags() the initial g is lower case but on comonFunctions.SetFlags() and UnsetFlags the inital letter is upper case. You mostly use lower case for the initial letter which is my preference. Regardless, it should be consistent.

[*]why not move all the comonFunctions to guide anyway?

[*]Why do we have the guide.getFlags() argument in comonFunctions.canShow(), comonFunctions.SetFlags() and comonFunctions.UnsetFlags()? It seems to me that the program should know what flags are set without me having to use one function to get the flags so I can tell another function what the flags are. It's like me telling you what you already know.

[*]I would like to have comonFunctions.isSet(String flagname) or guide.isSet(); and comonFunctions.isNotSet(String flagname) or guide.isNotSet()

philormand commented 9 years ago

All functions can now be called from guide All functions start with a lowercase letter canShow, setFlags and unsetFlags called from guide don't need to pass the flags in guide.isSet() and guide.isNotSet() implemented (it uses and/or conditions like canShow)