From: Joe E. <jo...@em...> - 2006-03-11 11:46:15
|
Rib Rdb wrote: > What do you mean "allow setting of the sysex data" > Well, we kinda need some way for the actual sysex data to be put into (and retrieved from) a patch object, no? Right now, I think it's done in the actual implementations (for example, Patch.Patch(byte[] sysex) ), but it's not required by the interface itself. To move forward, we either need a way to get/set the sysex of a patch *or* we need a way for IPatch implementations to put the patch data in the set of properties they return. >> Also, unless you like PropertyHolder, I'd prefer something a little >> different. Maybe PropertySet or ValueSet. Or maybe you can suggest >> something that you think sounds like what it does? >> > How about importProperties( PropertyMap props )? > One thing that dawned on me today was "We probably shouldn't use the word 'Properties', because Java already has a standard class called that, and this would confuse people because they'd think that our "Properties" had something to do with the standard Java "Properties". However, just now, I realized... we *could* just use the plain Java Properties class, since it just is a String-to-String mapping. The thought I had was that I could extend Properties to something called, say, PatchProperties which would have the following additional functionality: 1 - An exception or ErrMsg would be generated any time an existing property name was set (to catch cases where subclasses accidentally used a property name that was used by the superclass) 2 - There'd be a set of convenience methods like getInt(String propertyName), getBoolean(String propertyName), setInt(String propertyName, int value), etc. In this case, importProperties( PatchProperties props) and exportProperties( PatchProperties props) would be entirely appropriate. - Joe |