Search Results

Search found 2069 results on 83 pages for 'anonymous delegates'.

Page 43/83 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • UI Code Level Patterns?

    - by DTS
    Is there a book or some other online resource that covers common code-level UI patterns (not widgets/components per se) and idioms. I'm looking for a resource that goes into some depth on MVC, event models, delegates, etc. Something in a similar vein to the POSA series would be excellent. I'm looking for something that is as platform-agnostic as possible, but I'm not sure if that even IS possible.

    Read the article

  • Call WCF service host directly

    - by Steven
    I'm hosting a WCF service inside a winform app. I want to monitor when somebody calls the service to a textbox on the form like: 2:23 Method X called params(x, y) 2:24 Method Y called params(z) I am using a service host for WCF and inside my concrete class I have created some delegates and events. I just cant seem to wire the events up because my object is of type ServiceHost not my object. Any help

    Read the article

  • Why .NET does not allow cross-thread operations?

    - by RHaguiuda
    This question is not about what is a cross-thread operation, and how to avoid it, but why internal mechanics of .NET framework does not allow a cross-thread operation. I can`t understand why a SerialPort DataReceived event cannot update a simple text box on my form and why using delegates this is possible?

    Read the article

  • NSTableview not loading

    - by Matt S.
    I have an NSTableView that is inside an NSView. The whole view is being controlled by a class that has a superclass of NSObject. I send some data over to that class from another one, however, the tableview isn't refreshing, even with [myTable reloadData] The table's delegates and all that fancy stuff is connected to that NSObject class.

    Read the article

  • What kind of events should be created for a CRUD application?

    - by Mohit Deshpande
    I have an application that is centered around a database (ORM is LINQ-SQL) that has a table called Assignment. I am using the repository pattern to manipulate the database. My application is basically going to perform CRUD operations. I am new to delegates and events and I am asking you what events I should create (like maybe AssignmentCreating, AssignmentCreated) and what kind of delegate to use (like maybe a custom delegate or just an EventHandler)?

    Read the article

  • Should interfaces define properties?

    - by Otávio Décio
    Interfaces, as defined by MSDN "contain only the signatures of methods, delegates or events." However, since properties are no more than syntactic sugar for a get and set method, they are also allowed in interfaces. My question is - is there any situation where defining properties in an interface is appropriate or should we stick to the scenarios described by MSDN?

    Read the article

  • What "exotic" language feature do you use every day?

    - by fmark
    For most programmers using procedural or object-oriented languages there is a language-feature lowest common denominator: variables, procedures, standard control structures, and classes. However, almost all languages add features on top of this. Recent C# versions have LINQ and delegates. C++ has template metaprogramming. Java has annotations. What features such as these do you use every day?

    Read the article

  • Coolest C# LINQ/Lambdas trick you've ever pulled?

    - by chakrit
    Saw a post about hidden features in C# but not a lot of people have written linq/lambdas example so... I wonder... What's the coolest (as in the most elegant) use of the C# LINQ and/or Lambdas/anonymous delegates you have ever saw/written? Bonus if it has went into production too!

    Read the article

  • Thread Management Object

    - by Gusdor
    I feel rather foolish as this is just a short question. I was reading about a bunch of thread management helper classes in .net, specifically one that aids the storage of threads to help a service manager object automatically invoke delegates onto the subscribing thread. I'm pretty sure it had something to do with creating dispatchers. Totally forgotten the name, can't find it :( Anyone know what I'm talking about?

    Read the article

  • Grading your programming ability?

    - by Farstucker
    I understand this is a subjective question and very likely could be closed, and although there is no right or wrong answer I do believe its a legitimate question. At what point do you no longer consider someone a beginner (ie knowledge of loops, encapsulation, instantiation), an intermediate (design patterns, reflection, delegates, interfaces) or an expert (architecture, multi-threadding). My rational for asking such a question is two-fold, first, when do I stop labeling my questions as beginner and during a job interview how should I categorize myself?

    Read the article

  • Callbacks in C#

    - by n0vic3c0d3r
    I started coding in C# and have never had the opportunity to use callbacks though I have used delegates for event wiring. What is the real application of callbacks. I would be grateful if you could give some link that explains about callbacks in a straight forward way without C++ prerequisites.

    Read the article

  • Problem while disabling scrolling of UITableview

    - by Sreelal
    Hi, I am facing a problem while disabling the scrolling of table view.When i disabled the scrolling then the cells are not responding to user clicks,even delegates( like - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath) are not firing .Still dont know how to resolve looking for a solution Thanks in advance....

    Read the article

  • NSContextManagedObject - Problem Accessing it

    - by Jacob
    I have tab bar navigation application and The problem is that in my root controller I am able to set its NSContextManagedObject to the app delegates...However when I try to do the same on the other controller the application freezes... This only happens in the ViewDidLoad but thats where I need to set it so I can fetch the data

    Read the article

  • Writing a function for UIAlertView?

    - by worchyld
    I'm sick of writing basic UIAlertView's, ie: UIAlertView *alert = [[UIAlertView alloc] initWith...]] //etc Instead of doing this, is it possible to put all this in a "helper" function, where I can return the buttonIndex, or whatever an alert usually returns? For a simple helper function I guess you could feed parameters for the title, message, I'm not sure whether you can pass delegates in a parameter though, or bundle info. In pseudo-code, it could be like this: someValueOrObject = Print_Alert(Title="", Message="", Delegate="", Bundle="") // etc Any help on this would be great. Thanks

    Read the article

  • Dealing with &rest-parameters in common lisp

    - by Patrick
    I want define a functions that accepts &rest - parameters and delegates them to another function. (html "blah" "foo" baz) = "blahfoobaz" I did not find a better way than this one: (defun html (&rest values) (concatenate 'string "" (reduce #'(lambda(a b) (concatenate 'string a b)) values :initial-value "") "")) But this looks somewhat glumbsy to me, since line 4 does no more than concatenating the &rest parameter "values". I tried (concatenate 'string "" (values-list values) "") but this does not seem to work (SBCL). Could someone give me an advice? Kind regards

    Read the article

  • iPhone - extending a class delegate

    - by Digital Robot
    OK, I know how to create a class extension, using something like that: on .h @interface UIButton (myExtensionName) // my extended methods @end and then on .m @implementation UIButton (myExtensionName) // my implementations @end But how do I declare the extended delegates I may create? If this was a normal class I would do @protocol myExtensionName <NSObject> // my delegate declarations @end but how do I do that on a class extension? thanks

    Read the article

  • How to infer the type of a derived class in base class?

    - by enzi
    I want to create a method that allows me to change arbitrary properties of classes that derive from my base class, the result should look like this: SetPropertyValue("size.height", 50); – where size is a property of my derived class and height is a property of size. I'm almost done with my implementation but there's one final obstacle that I want to solve before moving on, to describe this I will first have to explain my implementation a bit: Properties that can be modified are decorated with an attribute There's a method in my base class that searches for all derived classes and their decorated properties For each property I generate a "property modifier", a class that contains 2 delegates: one to set and one to get the value of the property. Property Modifiers are stored in a dictionary, with the name of the property as key In my base class, there is another dictionary that contains all property-modifier-dictionaries, with the Type of the respective class as key. What the SetPropertyValue method does is this: Get the correct property-modifier-dictionary, using the concrete type of the derived class (<- yet to solve) Get the property modifier of the property to change (e.g. of the property size) Use the get or set delegate to modify the property's value Some example code to clarify further: private static Dictionary<RuntimeTypeHandle, object> EditableTypes; //property-modifier-dictionary protected void SetPropertyValue<T>(EditablePropertyMap<T> map, string property, object value) { var property = map[property]; // get the property modifier property.Set((T)this, value); // use the set delegate (encapsulated in a method) } In the above code, T is the Type of the actual (derived) class. I need this type for the get/set delegates. The problem is how to get the EditablePropertyMap<T> when I don't know what T is. My current (ugly) solution is to pass the map in an overriden virtual method in the derived class: public override void SetPropertyValue(string property, object value) { base.SetPropertyValue((EditablePropertyMap<ExampleType>)EditableTypes[typeof(ExampleType)], property, value); } What this does is: get the correct dictionary containing the property modifiers of this class using the class's type, cast it to the appropiate type and pass it to the SetPropertyValue method. I want to get rid of the SetPropertyValue method in my derived class (since there are a lot of derived classes), but don't know yet how to accomplish that. I cannot just make a virtual GetEditablePropertyMap<T> method because I cannot infer a concrete type for T then. I also cannot acces my dictionary directly with a type and retrieve an EditablePropertyMap<T> from it because I cannot cast to it from object in the base class, since again I do not know T. I found some neat tricks to infere types (e.g. by adding a dummy T parameter), but cannot apply them to my specific problem. I'd highly appreciate any suggestions you may have for me.

    Read the article

  • When to retain a "delegate"

    - by Jose
    I know that in Objective-C you should never retain your delegates because it may cause a retain-cycle, however, how do you know the difference between a delegate and a non-delegate object ? Can't it be said that just sending a message to any object is delegating work to that object ?

    Read the article

  • PHP ORM's, multiple tables and efficiency

    - by sunwukung
    Let's say I have a data mapper function that aggregates multiple tables and generates an object instance from that data. The mapper has a typical save() method which delegates to update/insert. When the mapper executes save - ideally it isolates object fields that have been modified, thus preventing the code from blanket bombing the database. How would you go about this?

    Read the article

  • how to enter text into uitextfield

    - by adnan
    I have implemented the delegates for UITextField and also method for these text field. Below are the methods: - (void)textFieldDidBeginEditing:(UITextField *)textField { [textField resignFirstResponder]; } - (BOOL)textFieldShouldReturn:(UITextField *)aTextField { [aTextField resignFirstResponder]; return YES; } My problem is that when I want to enter text into UITextField its delegate does not allow me to enter the text into textfields. Kindly tell me how i can enter the data into textfields

    Read the article

  • Can I reverse the order of a multicast delegate event?

    - by Neil Barnwell
    When you subscribe to an event in .NET, the subscription is added to a multicast delegate. When the event is fired, the delegates are called in the order they were subscribed. I'd like to override the subscription somehow, so that the subscriptions are actually fired in the reverse order. Can this be done, and how? I think something like this might be what I need?: public event MyReversedEvent { add { /* magic! */ } remove { /* magic! */ } }

    Read the article

  • .net - invoke methods from classes from a certain namespace via reflection

    - by Kristian Hildebrandt
    SPL and PHP allows you to create objects on the fly from classes, that fulfill certain conditions, such as implementing certain interfaces and stuff like that. However, I would like to do something similar in c# and automatically create objects from all classes in a namespace and invoke a particular method from those classes that implement a certain interface. My experience developing desktop apps is very limited. I am not quite sure if I should use delegates to archive this or if reflection is really the way to go.

    Read the article

  • Setting up an independent delegate?

    - by fuzzygoat
    Its common for the dataSource and delegate to be the same object, its also common for this object to be the viewController. In all the info/tutorials that I have seen online delegates are always setup as above. If I wanted to create my own class instead can anyone give me any pointers as to how I might do that. Where does that object get instantiated, how do you connect the dataSource and delegate items etc. I am using UITableView to test this.

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >