passing object names to slot implementation
Berndt Josef Wulf
wulf at dingo.ping.net.au
Mon Jul 29 00:39:01 UTC 2002
G'day,
I'm writing an application (HAM Radio Controller) containing +60 buttons
for which I implemented one slot common to all of them -
slotButtonClick().
The problem now is to identify which button was calling the slot
function, an easy task in Delphi. Is there a mechanism that allows an
identification of the sender object (e.g. the name of the
object/button)?
Once the sender is know, a simple `switch' statement is all that is
needed in implementing the respond code, reducing overall code size.
Any help is very much appreciated.
cheerio Berndt
--
Name : Berndt Josef Wulf | +++ With BSD on Packet Radio +++
E-Mail : wulf at ping.net.au | tfkiss, tnt, dpbox, wampes
ICQ : 18196098 | VK5ABN, Nairne, South Australia
URL : http://www.ping.net.au/~wulf | MBOX : vk5abn at vk5abn.#lmr.#sa.au.oc
Sysinfo : DEC AXPpci33+, NetBSD-1.5 | BBS : vk5abn.#lmr.#sa.aus.oc
More information about the KDevelop-devel
mailing list