Maniac wrote: >The concept of always keeping object in a correct state is indeed very >nice but makes some practicle cases really harder. > > I want to share an experience working with Delphi's VCL (library of visual components) where this thing was solved in a very convinient way. The interesting things about VCL is that objects' properties are exposed through a GUI interface and any property can be changed independently. But VCL guarranted that any change a) won't raise exception b) leaves an object in a correct state.
This was achieved by automatically changing other properties of object in some default way to cater to changes made by a user. For example if you have a progress bar with properties Min=0 and Position=0 and then change Min to 10 the Position is also changed to 10 to be not less than Min. However this logic requires custom handling of all such cases. It means that while this approach can work for some vendor library you cannot enforce this behavior automatically on user's objects. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---