FROM : Marcel Weiher
DATE : Thu Apr 07 21:03:10 2005
On 7 Apr 2005, at 18:55, Scott Stevenson wrote:
>
> On Apr 7, 2005, at 10:13 AM, Marcel Weiher wrote:
>
>
>> The system would now make sure that these constraints always
>> held: if you changed the end-points, the midpoint would be
>> recalculated, if you changed the mid-point, the end-point(s) would
>> be adjusted. Objects with these constraints could be composed,
>> so multiple constraints (in a hierarchy) were considered to arrive
>> at the final values. The application to keeping UI synchronized
>> with model objects is hopefully obvious. :-)
>>
>
> I think you could make the case that Cocoa Bindings and EOF do the
> same thing, conceptually.
Precisely. Well, sort of...
> Or have I missed your point?
...the point is that Cocoa bindings (and the respective parts of EOF)
represent a 'sort-of-kind-of' and quite limited constraint
satisfaction system (as far as I can tell!), except that it doesn't
actually come out and say that that's what it is. It also doesn't
provide us with any linguistic means of *directly* specifying
constraints, instead exposing us to the mechanics of how one would
interact with a possible *implementation* of such a system.
Interacting with something without the right theoretical framework
(at a minimum: terminology), is quite cumbersome.
> In Panther terms:
> +setKeys:triggerChangeNotificationsForDependentKey:
>
QED. :-) While that method (and the mechanism it represents)
provides me with some of the mechanics I can use to maintain
constraints, it doesn't allow me to simply *state* the constraint.
Why can't I write something like the following:
constraint:
employee.name = myTextField.stringValue;
This now makes sure that these two values are kept in sync. And if I
add another constraint:
constraint:
employee.name = myTextField.stringValue;
employee = tableView.currentRow.dataObject;
the system will make sure that all of these are kept in sync. (These
are only simple equality constraints).
Constraints can also be dynamic, to implement dragging, you say that
an object's coordinates must be the same as the mouse-coordinates
while the mouse-button is pressed etc.
Constraint satisfaction is not exactly something brand new, in fact
the beginnings date back to Sutherland in the late 60ies and ThingLab
was 1979. A lot of strides have been made since then, both in
extending the applications and the constraint solver technology to
support them. (Incidentally, spreadsheets are simply constraint
engines as well...) Virtually all constraint solvers allow multiple
simultaneous constraints (with varying strengths) to be set, with the
solver taking care of finding a solution that will satisfy all
constraints (or moaning when that isn't possible).
Cheers,
Marcel
DATE : Thu Apr 07 21:03:10 2005
On 7 Apr 2005, at 18:55, Scott Stevenson wrote:
>
> On Apr 7, 2005, at 10:13 AM, Marcel Weiher wrote:
>
>
>> The system would now make sure that these constraints always
>> held: if you changed the end-points, the midpoint would be
>> recalculated, if you changed the mid-point, the end-point(s) would
>> be adjusted. Objects with these constraints could be composed,
>> so multiple constraints (in a hierarchy) were considered to arrive
>> at the final values. The application to keeping UI synchronized
>> with model objects is hopefully obvious. :-)
>>
>
> I think you could make the case that Cocoa Bindings and EOF do the
> same thing, conceptually.
Precisely. Well, sort of...
> Or have I missed your point?
...the point is that Cocoa bindings (and the respective parts of EOF)
represent a 'sort-of-kind-of' and quite limited constraint
satisfaction system (as far as I can tell!), except that it doesn't
actually come out and say that that's what it is. It also doesn't
provide us with any linguistic means of *directly* specifying
constraints, instead exposing us to the mechanics of how one would
interact with a possible *implementation* of such a system.
Interacting with something without the right theoretical framework
(at a minimum: terminology), is quite cumbersome.
> In Panther terms:
> +setKeys:triggerChangeNotificationsForDependentKey:
>
QED. :-) While that method (and the mechanism it represents)
provides me with some of the mechanics I can use to maintain
constraints, it doesn't allow me to simply *state* the constraint.
Why can't I write something like the following:
constraint:
employee.name = myTextField.stringValue;
This now makes sure that these two values are kept in sync. And if I
add another constraint:
constraint:
employee.name = myTextField.stringValue;
employee = tableView.currentRow.dataObject;
the system will make sure that all of these are kept in sync. (These
are only simple equality constraints).
Constraints can also be dynamic, to implement dragging, you say that
an object's coordinates must be the same as the mouse-coordinates
while the mouse-button is pressed etc.
Constraint satisfaction is not exactly something brand new, in fact
the beginnings date back to Sutherland in the late 60ies and ThingLab
was 1979. A lot of strides have been made since then, both in
extending the applications and the constraint solver technology to
support them. (Incidentally, spreadsheets are simply constraint
engines as well...) Virtually all constraint solvers allow multiple
simultaneous constraints (with varying strengths) to be set, with the
solver taking care of finding a solution that will satisfy all
constraints (or moaning when that isn't possible).
Cheers,
Marcel
| Related mails | Author | Date |
|---|---|---|
| mmalcolm crawford | Apr 5, 17:33 | |
| Philip Mötteli | Apr 5, 23:49 | |
| Guy English | Apr 6, 00:29 | |
| Scott Stevenson | Apr 6, 01:14 | |
| Dustin Voss | Apr 6, 02:18 | |
| James Duncan David… | Apr 6, 02:27 | |
| Jake Macmullin | Apr 6, 02:31 | |
| John C. Randolph | Apr 6, 02:55 | |
| James Duncan David… | Apr 6, 03:01 | |
| Ondra Cada | Apr 6, 04:04 | |
| Will Mason | Apr 6, 04:48 | |
| Rogelio M.Serrano… | Apr 6, 06:05 | |
| Rogelio M.Serrano… | Apr 6, 06:06 | |
| mmalcolm crawford | Apr 6, 07:46 | |
| Paul Szego | Apr 6, 08:22 | |
| mmalcolm crawford | Apr 6, 09:52 | |
| ?????Andre? | Apr 6, 09:55 | |
| Ondra Cada | Apr 6, 12:21 | |
| oplus | Apr 6, 12:32 | |
| Mont Rothstein | Apr 6, 12:36 | |
| Philip Mötteli | Apr 6, 14:47 | |
| Scott Stevenson | Apr 6, 18:00 | |
| mmalcolm crawford | Apr 6, 18:39 | |
| Nat! | Apr 6, 22:35 | |
| mmalcolm crawford | Apr 6, 23:47 | |
| Timothy Reaves | Apr 7, 00:25 | |
| mmalcolm crawford | Apr 7, 00:50 | |
| Shawn Erickson | Apr 7, 01:05 | |
| James Duncan David… | Apr 7, 01:28 | |
| Todd Blanchard | Apr 7, 06:37 | |
| Todd Blanchard | Apr 7, 06:41 | |
| Scott Stevenson | Apr 7, 06:59 | |
| Philip Mötteli | Apr 7, 08:32 | |
| Marcel Weiher | Apr 7, 11:59 | |
| Charlton Wilbur | Apr 7, 15:11 | |
| Mike Ferris | Apr 7, 16:53 | |
| Marcel Weiher | Apr 7, 16:55 | |
| Marco Scheurer | Apr 7, 17:55 | |
| Marcel Weiher | Apr 7, 19:13 | |
| Scott Stevenson | Apr 7, 19:55 | |
| Marcel Weiher | Apr 7, 21:03 | |
| Mike R. Manzano | Apr 7, 21:21 | |
| Timothy Reaves | Apr 7, 22:03 | |
| Evan DiBiase | Apr 7, 22:28 | |
| Marcel Weiher | Apr 7, 22:35 | |
| mmalcolm crawford | Apr 7, 23:05 | |
| ttempel | Apr 8, 01:50 | |
| Paul Szego | Apr 8, 11:50 | |
| Johnny Deadman | Apr 8, 14:10 | |
| Philippe Mougin | Apr 8, 16:52 | |
| Shawn Erickson | Apr 8, 17:07 | |
| Shawn Erickson | Apr 8, 17:17 | |
| Ralph Scheuer | Apr 8, 17:28 | |
| Ralph Scheuer | Apr 8, 17:32 | |
| John Brownlow | Apr 8, 17:47 | |
| Charlton Wilbur | Apr 8, 18:34 | |
| Scott Stevenson | Apr 8, 18:43 | |
| Ralph Scheuer | Apr 8, 19:03 | |
| Philippe Mougin | Apr 8, 20:37 | |
| Scott Ellsworth | Apr 8, 21:46 | |
| Scott Ellsworth | Apr 8, 21:48 | |
| Evan DiBiase | Apr 8, 22:16 | |
| mmalcolm crawford | Apr 8, 22:30 | |
| mmalcolm crawford | Apr 8, 23:13 | |
| Marcel Weiher | Apr 9, 02:20 | |
| Marcel Weiher | Apr 9, 02:46 | |
| Scott Ellsworth | Apr 9, 09:39 | |
| Marcel Weiher | Apr 9, 09:44 | |
| Byron Ellis | Apr 9, 10:37 | |
| Marcel Weiher | Apr 9, 14:03 | |
| Charlton Wilbur | Apr 9, 16:01 | |
| ?????Andre? | Apr 9, 18:08 | |
| Scott Stevenson | Apr 9, 18:24 | |
| Scott Stevenson | Apr 9, 18:27 | |
| Marcel Weiher | Apr 10, 00:06 | |
| Marcel Weiher | Apr 10, 00:16 | |
| Marcel Weiher | Apr 10, 00:38 | |
| ?????Andre? | Apr 10, 01:03 | |
| Charlton Wilbur | Apr 10, 01:13 | |
| mmalcolm crawford | Apr 10, 01:53 | |
| Scott Stevenson | Apr 10, 01:58 | |
| Todd Blanchard | Apr 10, 08:32 | |
| mmalcolm crawford | Apr 10, 08:52 | |
| mmalcolm crawford | Apr 10, 09:25 | |
| PA | Apr 10, 12:08 | |
| mmalcolm crawford | Apr 30, 10:18 |






Cocoa mail archive

