8.12: adda/cstr/signals/signaling in gui systems:
how is the gui related to the signal?
. as a summary of 2012/07/gui-notification-systems
I was thinking gui's should be impl'd with
gui-optimized signals,
rather than the general signal system,
but then I wondered if that idea was
keeping mvc in mind,
so that generally all IPC (interprocess communications)
would be seeing the same windows that a
human can see with the help of a gui agent .
Showing posts with label signals. Show all posts
Showing posts with label signals. Show all posts
2012-11-10
2012-08-18
signals
7.27: adda/cstr/signals:
7.30: intro:
. pyqt signals are a system of inter-object communication;
any object can emit a signal
to convey that some event has occurred;
and, any other object may connect a signal handler
to be launched whenever a particular object
raises a particular signal .
. signals can return any sort of record,
and the corresponding signal handlers
are expected to declare their parameter's type
to be the same type as the signal's returned record .
. pyqt sees signals as launching slots
and then the act of connecting a signal handler
is filling such a slot with a subprogram .
. there can be multiple connections to a slot,
so the slot is often filled with multiple handlers .
7.30: intro:
. pyqt signals are a system of inter-object communication;
any object can emit a signal
to convey that some event has occurred;
and, any other object may connect a signal handler
to be launched whenever a particular object
raises a particular signal .
. signals can return any sort of record,
and the corresponding signal handlers
are expected to declare their parameter's type
to be the same type as the signal's returned record .
. pyqt sees signals as launching slots
and then the act of connecting a signal handler
is filling such a slot with a subprogram .
. there can be multiple connections to a slot,
so the slot is often filled with multiple handlers .
Labels:
adda,
concurrency,
cstr,
ipc,
notifications,
oop,
signals
2012-03-31
signals are another dimension of interfaces
3.5: adda/cstr/signals/another dimension of interfaces:
. pyqt's connector lets an object's method
emit a message to a notification center,
which then relays the signal by launching an instance of
"(on signal do call this list of functions
which can include emitting an object's signal;
use qobject`connect to add to the todo list
of a signal of some object ).
. signals are like gui's mousedown(coords) event,
which means it emits a signal to the eventqueue,
and you can respond to events by connecting the signal
to your subprogram named:
[what I do when a mousedown happens].
this works like a framework class
where it has methods for you to define
so it knows what to do for you .
. they are a new control system
more similar to exceptions than to object functions .
in fact an exception is a special kind of signal
just as a task type is a special kind of datatype .
. I like to think of object communications in human terms
like telephones and mailboxes;
emitting a signal is like publishing a newsletter;
people can subscribe to your newsletter
by naming a mailbox .
. then that address will be just for that newsletter,
and you have one of your staff there (a subprogram)
waiting to respond to what that newsletter says .
. this responder subprogram is called a slot .
. a list of publishings can be seen as a
dimension of a type's interface
except that rather than being a type member's requirement,
it explains what is expected of clients of the type's members;
ie, part of the type's service is
keeping you uptodate with these newsletters .
3.23: adda/cstr/unify exceptions, dialogs, and signals:
. a dialog is like a gui dialog:
the caller provides a callback
and if the callback comes back before a timeout error
then the server continues
else it does a dialog-failed exception .
. the exception works like ada's:
it signals a failure (type, details), and then terminates .
so the block's exception catching part
should look like the signal catcher parts :
they are both interrupt handlers .
. pyqt's connector lets an object's method
emit a message to a notification center,
which then relays the signal by launching an instance of
"(on signal do call this list of functions
which can include emitting an object's signal;
use qobject`connect to add to the todo list
of a signal of some object ).
. signals are like gui's mousedown(coords) event,
which means it emits a signal to the eventqueue,
and you can respond to events by connecting the signal
to your subprogram named:
[what I do when a mousedown happens].
this works like a framework class
where it has methods for you to define
so it knows what to do for you .
. they are a new control system
more similar to exceptions than to object functions .
in fact an exception is a special kind of signal
just as a task type is a special kind of datatype .
. I like to think of object communications in human terms
like telephones and mailboxes;
emitting a signal is like publishing a newsletter;
people can subscribe to your newsletter
by naming a mailbox .
. then that address will be just for that newsletter,
and you have one of your staff there (a subprogram)
waiting to respond to what that newsletter says .
. this responder subprogram is called a slot .
. a list of publishings can be seen as a
dimension of a type's interface
except that rather than being a type member's requirement,
it explains what is expected of clients of the type's members;
ie, part of the type's service is
keeping you uptodate with these newsletters .
3.23: adda/cstr/unify exceptions, dialogs, and signals:
. a dialog is like a gui dialog:
the caller provides a callback
and if the callback comes back before a timeout error
then the server continues
else it does a dialog-failed exception .
. the exception works like ada's:
it signals a failure (type, details), and then terminates .
so the block's exception catching part
should look like the signal catcher parts :
they are both interrupt handlers .
Subscribe to:
Posts (Atom)
