From e066a12dee09a04f9f12a8263276abaad72991b0 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 5 Jun 2007 03:48:15 +0000 Subject: [PATCH] Actually, let's make that take a prefix argument, and only return properties that begin with that prefix. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@309 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/EZGameControl.as | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/as/com/threerings/ezgame/EZGameControl.as b/src/as/com/threerings/ezgame/EZGameControl.as index d1c44d89..4729c291 100644 --- a/src/as/com/threerings/ezgame/EZGameControl.as +++ b/src/as/com/threerings/ezgame/EZGameControl.as @@ -266,13 +266,15 @@ public class EZGameControl extends BaseControl } /** - * Get the names of all currently-set properties. + * Get the names of all currently-set properties that begin with the specified prefix. */ - public function getProperyNames () :Array + public function getProperyNames (prefix :String = "") :Array { var props :Array = []; for (var s :String in _gameData) { - props.push(s); + if (s.lastIndexOf(prefix, 0) == 0) { + props.push(s); + } } return props; }