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
-1
votes
1 answer

Boost UDP multicast sender not using correct port

I am following Boost UDP multicast sender tutorial here . I modify it to as follow: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include…
CaTx
  • 1,421
  • 4
  • 21
  • 42
-1
votes
1 answer

c# managing messageboxes on form closing

I've a parent form with a child form, called by its parent by clicking on a button. private void button3_Click(object sender, EventArgs e) { if (Application.OpenForms.OfType().Count() < 1 ) { Form2 form2 = new…
Luke
  • 503
  • 2
  • 7
  • 17
-1
votes
2 answers

SWIFT: "removeAtIndex" don't work with (sender:UIButton)

@IBOutlet var items: [UIButton] @IBAction func itemsHidden(sender: UIButton) { sender.hidden = true items.removeAtIndex(sender) } Hello. For example, i have array of items. The code has the error: "Cannot invoke 'removeAtIndex' with an…
Spartak
  • 41
  • 6
-1
votes
2 answers

Swift - arc4random() could not find an overload for '%' that accepts the supplied arguments

I have a UISlider to give a range of a radius of search (for 5 - x miles, max x=100 miles), and I want to be able to get a random radius distance within this range. @IBAction func sliderMoved(sender: UISlider){ //gives a range (minimum range 5…
Nick Nagy
  • 61
  • 4
-1
votes
1 answer

Pictureboxes not becoming visible

Sorry, but I have another problem. In my code I can now get it to randomly assign pictures to pictureboxes but unfortunately I cannot get any of the pictureboxes to become visible, upon clicking them, this event should happen: private void…
-1
votes
1 answer

Visual Basic sender not coming back as control

I have a windows application with 2 forms. frmMain has a button (btnEditAgent) on it that opens frmEditAgent: Public Sub btnEditAgent_Click(sender As Object, e As EventArgs) Handles btnEditAgent.Click frmAgentEdit.ShowDialog() End Sub Then on…
Katp00p
  • 93
  • 12
-1
votes
1 answer

The name 'btn2' does not exist in the current context

Below i put some part of the code the problem is btn2.tag. it says " The name 'btn2' does not exist in the current context " how can i fix the issue? what is(are) the way(s)? public Main() { InitializeComponent(); // bla…
modest and cute girl
  • 785
  • 4
  • 13
  • 24
-2
votes
1 answer

how to call a method directly instead of button action

I want to call the method below directly at application didFinishLaunchingWithOptions. Currently this action is triggered with a button. How can i call this without the button? - (IBAction)toggleVertical:(id)sender { [splitController…
KevinC
  • 79
  • 2
  • 8
-2
votes
1 answer

How to identify the sender of an event

I have a to-do software application in which I dynamically create each to-do task. I have a checkmark image on each task that when clicked, calls a MouseLeftButtonDown event. It works perfectly fine, but I need to identify which task I clicked on.…
Ben
  • 1
  • 2
-2
votes
1 answer

How do you call the 'sender' of a UIButton in another function?

I want to call the 'sender' of the pressed button in a new function. I have created a generic function to perform standard operations within my calculator app. I then want to call this function for each type of operator that I have an IBAction…
-2
votes
1 answer

cannot assign to value 'colorTouched' is a 'let' constant

beginner of swift, follow the book and get the error "" here is the code: @IBAction func buttonTouched(sender : UIButton) { var buttonTag : Int = sender.tag if let colorTouched = ButtonColor(rawValue: buttonTag) { if currentPlayer…
o1xhack
  • 87
  • 9
-3
votes
1 answer

Email sender- recipient code error

Hi I have my project in 4 days and I got code from http://www.youtube.com/watch?feature=player_embedded&v=mGDnQchFZJg#! , I could really use help, thanks in advance. jet it gives me an error in foreach loop Error 1 The name 's' does not exist…
Martin Markovic
  • 99
  • 2
  • 2
  • 8
-3
votes
3 answers

Setting the email correctly in a contact form

Considering that my experience with PHP is limited, I used a contact form generator that works almost as I want it. The form, and all of its variables function properly, however upon receiving the email, it adds my own domain as the senders email. I…
Henrik Petterson
  • 6,862
  • 20
  • 71
  • 155
1 2 3
21
22