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
3 answers

Issues in setting UIButton title in its click event

I'm trying to change the title of a button when the user press on it with the following code: - (IBAction) hideKB: (UIButton *) sender { sender.titleLabel.text = @"↓"; } But when I click the app crashes and I can't understand why. Removing the…
Francesco
  • 1,047
  • 11
  • 26
2
votes
1 answer

Absolute timestamps from the sender report (SR) for RTSP video stream

I get video streams from ip cameras using rtsp in python and want to get absolute timestamp for each frame in the sender reports. If I read a stream the camtime obviously starts from zero: ret, image_np = cap.read() camtime =…
Alex
  • 21
  • 1
  • 3
2
votes
3 answers

Get Safe sender list in Outlook 2007 C# Add in

I have created an Outlook 2007 add-in in C#.NET 4.0. I want to read the safe sender list in my C# code. if (oBoxItem is Outlook.MailItem) { Outlook.MailItem miEmail = (Outlook.MailItem)oBoxItem; …
Balran Chavan
  • 155
  • 2
  • 12
2
votes
1 answer

How to call a specific UIButton by tag other than the sender?

In a simple memory game I have a struct that defines the two cards that are tapped and returns in mutating functions the integers firstFlippedCard and secondFlippedCard. If these do not match by another property, I want both cards to 'flip back'. I…
2
votes
3 answers

EventHandlers and the sender

So in my program i created a struct with a button and a number value... like this struct box { public int numberValue; public Button button; } I then made a 2D array of this struct box[,] boxes = new box[20, 20]; Now what i…
Nick
  • 21
  • 1
2
votes
2 answers

Sending email from Android app

I am trying to a develop an android app that sends email using JavaMail. I have tried the code bellow as console application and it works, but when I use in as an android app from the emulator it throws exception with no message. I have modified…
user709807
  • 21
  • 1
2
votes
1 answer

Why can I not add to the authorised email senders list under app engine settings

My domain name is hosted by app engine and configured under: App Engine -> Settings -> Custom domains So why can I not add an email address to the authorised senders list: App Engine -> Settings -> Email senders -> Authorised senders When I try to…
Steve Neal
  • 756
  • 3
  • 8
  • 16
2
votes
1 answer

Swift sender UIButton change text

I have a follow/unfollow button and am accessing it by "sender". I am changing the text when the user taps it to follow or unfollow another user. Problem is that when it should show "unfollow" it is showing the default text used in storyboard. The…
Lukas Bimba
  • 817
  • 14
  • 35
2
votes
0 answers

Timer Object value is not passing through sender in an instance

This Application sends data (through a dictionary) two following instances to other views from the sender. Home Page TableviewCell to each particular view according to each state Ex- IF state 1 - AppointmentView 2 - OnthewayView 3 - TimerView 4 -…
Fido
  • 218
  • 1
  • 17
2
votes
0 answers

File download code is not giving error but still file does not download

I am downloading uploaded files. Below is my code
2
votes
1 answer

Telegram bot: Restrict sender list

I'm using a Telegram bot for downloading images sent to it automatically. The images are shown in a presentation immediately after download, so I need to make sure that only group members should be allowed to send to the bot. How can I do this?
Bigera
  • 25
  • 2
2
votes
1 answer

How to addTarget to UIButton without sender

I have a function... func MyFunc (_ sender: AnyObject) { let n = sender.tag! //do stuff with 'n' } which I connect when creating my NewButton... NewButton.addTarget(self, action: #selector(Main.MyFunc(_:)), for: .touchUpInside) I'd like to…
Chameleon
  • 1,608
  • 3
  • 21
  • 39
2
votes
3 answers

In Swift 3.0, how to check what button was pressed

I understand that the following will return the title of a button that was pressed. let myString = sender.title(for: .normal)! But I would really like to understand why this works. I could not find it in Apple documentation for UIButton. I read in…
P.Angle
  • 21
  • 1
  • 4
2
votes
1 answer

Error: "Cannot assign to immutable expression of type 'Bool'"?

How do I fix this? I'm a new coder. Thank you I get the follow error: "Cannot assign to immutable expression of type 'Bool'" When I try to set the "isSelected" to false and true @IBAction func onFilter(_ sender: Any) { if ((sender as…
koz
  • 195
  • 1
  • 13
2
votes
3 answers

Pass data with prepareForSegue

Im trying to pass data from viewController 1 to viewController2, I have 2 buttons and 1 segue(therefore there is one segue identifier) for those 2 buttons, each button when pressed should show: 1 label to show the title and 1 textView to show a…
Chino Pan
  • 1,658
  • 2
  • 9
  • 9