R – Default variables with multiple developers

actionscript-3collaborationflash

This may be a weird question, but I'm wondering if there's any way to efficiently (perhaps using namespaces?) have different default variables in a class per developer in an actionscript project. I ask because we're currently working on a series of Flash games: 24 in total. Each is loaded by a shell container. The shell receives a flash var for which game to load. In our development environment (Flash/FlashDevelop), there are no flashvars, so a constant in the AS defines which game to load when there's no flashvar:

/** Game to load during debugging if the game param is not set via flashvars. */
public static const DEFAULT_GAME:String = "gameName";

So each developer changes this to the game they are working on. However, when commiting changes to the repository (svn), the developer would have to change this back or undo changes, and each dev has to change this to their game when someone else changes it.

Wondering if there's a way to specify default params similar to Flashvars in the Flash IDE or a user-specific file so that the code can remain untouched with hacky debug vars. I know in Flex you can set the flashvars in the html template, and then each developer could have their own publish folder and svn:ignore that. Perhaps just have each developer create a non-commited XML file that defines their user params? I donno, any ideas?!

Best Answer

Developer-specific config files tend to work.

Have a "default" configuration in the repository with .default or .sample or something appended to the filename, and when a developer checks it out for the first time, they copy that file, remove the extension, and customize it as much as they want without affecting anyone else.

Is there a better way? Probably. But I haven't found it.

Related Topic