Re: Just can't hear enough about Cells?
- From: keke@xxxxxxx (Takehiko Abe)
- Date: Wed, 31 May 2006 22:53:07 +0900
Here is a minimal primer on Cells, just enough for you to
keep up with the next tutorial. That will be a substantial project
in which we develop a CLOS object inspector.
The Inspector project will give you a feel for what it is like to
program with Cells and Cello /after/ you are fluent in the
technology. The intent is not to teach you Cello, rather to
motivate your learning it.
Is the motivation available?
[...]
The Cell programmer writes:
(make-instance 'menu-item
:name :cut
:label "Cut"
:cmd-key +control-x+
:actor #'do-cut
:enabled (c? (when (typep (focus *app*) 'text-edit-widget)
(not (null (selected-range (focus *app*)))))))
looks familiar.
(make-instance 'menu-item
:menu-item-title "Cut"
:command-key '(:control #\x)
:menu-item-action #'do-cut
:update-function
#'(lambda (item)
(let ((w (front-window)))
(if (and w
(multiple-value-bind (b e)
(selection-range w)
(neq b e)))
(menu-item-enable item)
(menu-item-disable item)))))
This schemeworks well because menu-items are hidden most of
the time.
...and now they can forget the menu item exists as they work
on the rest of the application. The menu-item enabled status
will stay current (correct) as the selected-range changes
and as the focus itself changes as the user moves from field
to field.
And we don't need to care --- questions like: Who starts the
update? And how often it is triggered? -- with cells?
Anyways I downloaded cells_2.0 and tried it with MCL5.1.
It loaded fine with a very simple mod.
But I am not sure if it is working.
(test-cells) finished without an error. Does this mean
it is working?
.
- Follow-Ups:
- Re: Just can't hear enough about Cells?
- From: Ken Tilton
- Re: Just can't hear enough about Cells?
- References:
- Just can't hear enough about Cells?
- From: Ken Tilton
- Re: Just can't hear enough about Cells?
- From: Michael Livshin
- Re: Just can't hear enough about Cells?
- From: Ken Tilton
- Re: Just can't hear enough about Cells?
- From: Jacques Chester
- Re: Just can't hear enough about Cells?
- From: Ken Tilton
- Just can't hear enough about Cells?
- Prev by Date: Re: Green threads and Web-application
- Next by Date: Re: Specializing MAKE-INSTANCE
- Previous by thread: Re: Just can't hear enough about Cells?
- Next by thread: Re: Just can't hear enough about Cells?
- Index(es):