Screens Environment is a multi-platform component based middleware research project designed to connect technologies together and provide better user experiences for the future of computing http://sourceforge.net/projects/screensos/
Tuesday, June 06, 2006
Update - Thanks to my wife
Last night while realy trying to figure out some deep problem in Screens design, my wife offered help and in 10 minutes we had a solution which was simple, not hard to implement (its already implemented) and sounded great!
The problem was that although properties are objects, because they are stored in a side hierarchy (that is member objects are on a different hierarchy then property objects), I did not want the API's to have expose if they are storing thier objects as members or properties which currently they had to. The reason they had to was because when default objects were created, they would be created as members or properties and have to be moved appropriately.
The fix was that all objects are created as members and are moved to be either members, properties or any other side hierarchies I have in the future. Another fix was that I made StoreObjectAdd/StorePropertyAdd move the object to the location (instead of adding it) if the previous location of the object is the default.
This allows the following code to work very nicely:
UIWindowSetBackColor(Window, UIColorNew(255, 0, 255));
Where it sets the back color property of a window to the specified color.
What happens here is that the color object is put in the default location and when the window function adds it as a property, it actually moves the color from the default location to be owned by the window itself. If the color had already been moved to another location, the window would not gain ownership over the color. Great!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment