delegates Questions

6

Solved

I have a class and extension Swift file. After adding a delegate that I declared in another file to the class, Xcode shows this error Declaration is only valid at file scope at the extension line...
Chrystal asked 17/2, 2015 at 3:39

8

Solved

By convention classes are often named like nouns, methods like verbs and interfaces like adjectives. What is the common naming convention for a delegate? Or what's a good way to differentia...
Subtonic asked 27/2, 2010 at 3:0

5

Suppose there are two class one in swift and other is in objective-c class in same project. In swift class i declared delegate and i want to set that delegate in objective c class. I have done th...
Purism asked 6/10, 2017 at 6:42

11

Solved

What are the differences between delegates and an events? Don't both hold references to functions that can be executed?
Proudlove asked 26/8, 2008 at 23:6

12

Solved

I have my ViewController class which implements UITextFieldDelegate. I have no auto complete for the funcs such as textFieldShouldBeginEditing. Is this a bug in XCode 6? Here's my class implementat...
Appendage asked 11/6, 2014 at 20:19

5

Solved

I am trying to create Delegate for reading/writing properties of unknown type of class at runtime. I have a generic class Main<T> and a method which looks like this: Delegate.CreateDelegate...
Intoxicant asked 22/3, 2010 at 8:42

3

Solved

When using UIAlertController like this: var alert = UIAlertController(title: "Core Location", message: "Location Services Disabled!", preferredStyle: UIAlertControllerStyle.Alert) alert.addAct...
Lindsylindy asked 17/8, 2014 at 12:56

4

Solved

I am implementing an interface which requires implementations of BeginDoSomething and EndDoSomething methods. However my DoSomething isn't really long-running. For simplicity assume DoSomething on...
Rhizo asked 18/2, 2011 at 3:50

2

Solved

I am attempting to use this.Invoke() from a separate thread to access controls on my form. I am Invoking a delegate pointing to a method with a string[] as an argument. A few lines regarding my de...
Liquidator asked 23/5, 2013 at 23:11

4

Solved

delegate void DelegateTest(); DelegateTest delTest; Whats the difference between calling delTest.Invoke() and delTest()? Both would execute the delegate on the current thread, right?
Permutation asked 2/9, 2009 at 11:14

6

Solved

I am learning pointers in C# and was curious if one can use C++ style function pointers in C#. Yes, I know C# has its own equivalent concept for Function Pointers(called as delegates). But I just w...
Matthus asked 11/4, 2016 at 20:51

12

Solved

In a normal loop you can break out of a loop using break. Can the same be done using an anonymous delegate? Example inputString and result are both declared outside the delegate. blackList.ForEac...
Parlous asked 17/2, 2009 at 14:47

5

Solved

I have a base class that has a bool property which looks like this: public abstract class MyBaseClass { public bool InProgress { get; protected set; } } I am inheriting it another class from it...
Causative asked 23/4, 2014 at 14:16

4

Solved

Just right now I'm using following code to add queued threads. I don't like it. And my colleagues won't either because they don't know C# very well. All I want is of course to queue a method to be ...
Bowerbird asked 2/7, 2013 at 7:33

2

Solved

I am having some problems implementing QuickLook functionality from a table in an NSView. The limited documentation on QuickLook really doesn't help at all. After reading through the Apple Docs (w...
Chrisoula asked 1/10, 2010 at 5:36

4

Solved

Hi there I am trying to change the text that is showing in the delete button when a user swipes a uitableviewcell inside my tableview. I have seen an example in another question thread that says t...
Introductory asked 12/9, 2011 at 22:56

6

Solved

I appreciate that similar questions have been asked before, but I am struggling to invoke the Linq Where method in the following code. I am looking to use reflection to dynamically call this method...
Input asked 20/9, 2009 at 23:4

3

Solved

I want to call these methods: - (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section NS_AVAILABLE_IOS(6_0); - (void)tableView:(UITableView *)...
Moreland asked 15/11, 2012 at 7:11

10

Solved

For my Java game server I send the Action ID of the packet which basically tells the server what the packet is for. I want to map each Action ID (an integer) to a function. Is there a way of doing ...
Dehydrogenase asked 28/12, 2008 at 4:22

1

Solved

I am trying to get a Delegate from a MethodInfo object that has Output Parameters. My code follows: static void Main(string[] args) { MethodInfo m = typeof(Program).GetMethod("MyMethod2&quot...
Enure asked 22/6, 2020 at 13:20

7

Solved

What is the difference between a protocol and a delegate? and, How can we declare variables in a protocol class?
Ongoing asked 25/3, 2011 at 10:48

2

Solved

public MainWindow() { CommandManager.AddExecutedHandler(this, ExecuteHandler); } void ExecuteHandler(object sender, ExecutedRoutedEventArgs e) { } Error 1 Argument 2: cannot convert from ...
Amuse asked 19/3, 2010 at 18:56

14

Solved

Does the Java language have delegate features, similar to how C# has support for delegates?
Euphemia asked 4/9, 2008 at 22:45

5

I was trying to pass around variables between views in Swift, and ran into the rather abstract concept of protocols and delegates. Then I tried storing a reference to the first view in a second v...
Fulgurant asked 25/7, 2014 at 16:37

2

I have a basic question. I'm working on a project with many delegate patterns, and would like reference on the best way about initializing them.. Here's some ideas with a test delegate I made: O...
Spraddle asked 14/9, 2015 at 21:14

© 2022 - 2024 — McMap. All rights reserved.