Questions tagged [sender]

sender is the conventional name of an input parameter to an event handler in some object-oriented languages and their frameworks, for example Objective-C and Cocoa, or C# and .NET.

See:

Event Handling in Cocoa

Events (C# Programming Guide)

328 questions
2
votes
1 answer

Prepare for Segue in Swift with Sender

I am trying to pass a UIColor to another viewController via a "show" segue so that the color of the background can match that of the color button that was selected. I have this bit of code that prints the buttons sender tag but it is not performing…
Trenton Tyler
  • 534
  • 1
  • 7
  • 20
2
votes
2 answers

How do I use the sender argument to figure out what UIImageView was selected?

I have eight UIImageViews that I want to fade if the UITapGestureRecognizer that is associated with it is activated. I have the all recognizers hooked up to this IBAction: - (IBAction)disableDie:(id)sender { NSLog(@"%@", sender); …
Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
2
votes
1 answer

Error: Cannot change background color of button

When I click a button I have a panel of buttons that pops up that has the name of a color on the button. When I click that color the code below should change two of my buttons to the color chosen, but right now I select it, it prints the…
Andy Lebowitz
  • 1,471
  • 2
  • 16
  • 23
2
votes
0 answers

Chromecast duplicate connection when one sender connects to custom receiver

I've recently started encountering an issue where 2 sender connection events are firing every time only 1 sender connects to my custom receiver. I'm getting the following error in the receiver debug console. cast_receiver.js:37 [ 2.456s]…
2
votes
0 answers

Error inflating class android.support.v7.app.MediaRouteButton with Android Studio

I'm having some issues with an Android-Chromecast sender app. I'm using Android Studio (with Proguard enabled for debug), I imported the required libraries in Gradle compile 'com.android.support:appcompat-v7:22.+' compile…
Alberto Méndez
  • 1,044
  • 14
  • 31
2
votes
1 answer

Finding original sender of QT forwarded signal

My Setup: I have one class that only emits signals called class Conn. All of my QObject classes (A, B, and C) exist in isolation and I don't want them to know about each other at all. However, if class A wants to send some information outside of…
John-Luke Laue
  • 3,736
  • 3
  • 32
  • 60
2
votes
1 answer

modify attributes of sender in swift

How can attributes be modified from the sender in swift? For example, if I have a multiple buttons that are connected to the same event handler, how can I modify the attributes of the button (say, the title) that was pressed? @IBOutlet weak var…
barrt051
  • 242
  • 3
  • 13
2
votes
0 answers

Chromecast API doesn't accuratelly detect when device is connected/disconnected

I have a problem when i am trying to use my chromecast device. Currently I have an app for Android , one for iOS and these 2 apps from…
zeroblitz36
  • 171
  • 1
  • 7
2
votes
2 answers

send object in click button in mkMapView ios

In My Mapview i have sum annotation the annontion have a button who sent me to another view for more detail on this annotation My code is myAnnotation *myAnn = (myAnnotation *)annotation; UIButton *discloseButton = [UIButton buttonWithType:…
Ti Amo Laky
  • 755
  • 2
  • 8
  • 21
2
votes
2 answers

How to find the emitter Spinbox from a valueChanged Signal?

I have several Spinboxes and I want them to change the background color, if the value is changed. With this connect command: self.doubleSpinBox_1.valueChanged.connect(self.color) My first try was: def color(self): send = self.sender() …
Hubschr
  • 1,285
  • 6
  • 18
  • 35
2
votes
2 answers

Expected identifer or ')' Objective C

(IBAction)textFieldDoneEditing:(id)sender{//Expected identifer or ')' [sender resignFirstResponder]; } What's wrong? It's an example from "Beginning iOS 6 Development"
Frank
  • 497
  • 1
  • 6
  • 11
2
votes
1 answer

InfoPath 2010 - Email - How to send FROM a specified email account

I have an infopath form that generates and email. I'd like to know if it's possible to change the "From" field of the email to send from a generic shared mailbox instead of the message coming from my personal account. Is this possible to do WITHOUT…
2
votes
1 answer

PySide QtCore.Slot decorator does not work with self.sender() inside a method

I came across this weirdness in using PySide Slot decorator. If I decorate my method using QtCore.Slot and if I try to access self.sender() inside the method, I get None. If I remove the QtCore.Slot() decorator. I get the sender properly. Here is a…
foresightyj
  • 2,006
  • 2
  • 26
  • 40
2
votes
2 answers

sending/receiving file UDP in python

I've made this sending / receiving scripts but i corrupted file ! i have no idea why I'm getting this issue ! sender.py #!/usr/bin/env python from socket import * import sys s = socket(AF_INET,SOCK_DGRAM) host =sys.argv[1] port = 9999 buf…
Hamoudaq
  • 1,490
  • 4
  • 23
  • 42
2
votes
2 answers

how to tell which panel fired the click event

i have an array of panel controls that are placed in various place programatically in my form. Below you can see that as I loop through and increase I, all the panels are registered with the same event handler. This is fine with me, but I cant find…
FrostyFire
  • 3,212
  • 3
  • 29
  • 53