Re: Transforming argument from signal to slot

Alex Russell <[email protected]> Thu, 3 Jun 2004 01:01:38 -0700
Newsgroups gmane.comp.windows.devel.netwindows
Organization netWindows.org
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 02 June 2004 11:39 am, Sebastian Werner wrote:
> Hi!

Hello, welcome to the list!

> I read the signals-and-slots documention already and ask me know if
> it's possible to transform the argument from the signal-function to
> the slot-function. I didn't find anything yet.

It's been something I've looked at on-and-off for a couple of years, 
but haven't actually implemented yet.

> One Example:
>
> I create a select-element
>
> <select name="foo">
>    <option value="hotel">hotel</option>
>    <option value="plane">plane</option>
>    <option value="car">car</option>
> </select>
>
> and I create a Layer which should also be only visible if "car" is
> selected.
>
> Both elements are single objects which don't know anything from
> each other. The select-element has a property "selection" which
> set/get the current selection. The Layer has a property "display",
> which is equal to the so named css-property. My simple thought was
> that I am able to connect the "setSelection" function to the
> "setDisplay" function and transform the value on the way:
>
> selection:
> hotel       => none
> plane       => none
> car         => block
>
> Is something like this possible or planned? Some mapping of values
> or real transformation (math, ...).

This is entirely possible, but I guess I'd want to know a little bit 
more about what kind of calling semantics you'd want for this. I can 
see a situation where you might want to specify a function object to 
transform one (or more) arguments in a sigslot connection, so what 
kinds of situations do you see this being common in?

Regards

- -- 
Alex Russell
[email protected]   BD10 7AFC 87F6 63F9 1691 83FA 9884 3A15 AFC9 61B7
[email protected] F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFAvtrioV0dQ6uSmkYRAqy3AJ9hwLhiKf+cTcUgLgIYfuOA4ma2jwCePjBe
q4wlnUl5Vv6fHaQxXBz3Gn0=
=7RGT
-----END PGP SIGNATURE-----


_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org