Hi,
it seems there are no delegates to properties. Is there a convenient way to do the following?
Assert.Throws<InvalidOperationException>(
delegate
{
// Current is a property as we all know
nullNodeList.GetEnumerator().Current;
});
...
Hello,
i've got still problems with delegating something like a UIScrollView.
For example, i've got 2 Scrollviews (Scrollview1 and Scrollview2)and i want to use the method
- (void)scrollViewDidScroll:(UIScrollView *)scrollView1
To interact to both Scrollviews like:
if (scrollView1 == scrollView2) {
NSLog(@"similar");}
First,...
I have a class that implements an Interface with some methods.
I also have method with an Action parameter where I pass the Interface method.
Is it possible to get the type of the owner that has the method?
EDIT
This is the wrapper:
private void Wrapper (params Action[] actions)
{
var action = actions.FirstOrDefault();
var type...
Hi.
Im currently trying to get my first WPF Usercontrol to work. It consists of some UI elements and a ViewModel, holding the data and doing the work. It has a List of items as input, and another List of items as output. I need a certain task in my ViewModel to be done, when the list bound to the input changes. But i can't find a way to ...
I'm using Remoting to perform some IPC communication, and have the following question:
When I invoke delegates to gather data server-side, it is possible to have an event fired on the client when an IAsyncResult is gathered?
The following code is in VC++, but .net code is .net code.
GetFileTextDelegate ^svd = gcnew GetFileTextDelega...
With multi-tasking in iOS4, the home button puts the app into background and when it comes back into foreground I want the View Controller to 'refresh' (and hence viewWillAppear to be called). I put this in the app delegate thought this should work but nothing happens
- (void)applicationDidFinishLaunching:(UIApplication *)application {...
I must be doing something wrong obviously.
My delegate doesn't get called when I set the frame of a view.
Frame version NOT working
-(void)someMethod {
CAAnimation *anim = [CABasicAnimation animation];
[anim setDelegate:self];
[[currentViewController view] setAnimations:[NSDictionary dictionaryWithObject:anim forKey:@"frame...
Hi there!
I have an NSMutableArray countHistory defined and am trying to pass it to the next view controller:
Updated Code:
NSLog(@"Debug One");
HistoryTableViewController *controller;
NSLog(@"Debug Two");
controller = [[HistoryTableViewController alloc] initWithNibName:@"HistoryTableViewController" bundle:nil];
NSLog(@"Debug Three");...
I have a table view, which populates data from the web. To add information to this list I have a configuration screen presented modally. When data is added successfully the configuration screen is dismissed, I would like the data in the table view to automatically reload from the web to reflect the newly added data.
What is the best w...
I have a Cocoa application which works fine except it will not invoke applicationDidFinishLauching on my app delegate. applicationWillFinishLauching does work though.
In IB I have set the delegate from "Application" (and also File's owner) to my "XXX App Delegate" object. All other application specific methods are called correctly weird...
Dose method -application:didFinishLaunchingWithOptions: run in ios 2.0?
-application:didFinishLaunchingWithOptions: is a delegate method in ios3.0 and later, Will it be wrong in ios 2.0?
...
I'm trying to make a class to handle invoking methods on a remote server using my own means. To make it easier on the client caller, I'm writing a generic class that accepts an interface so that the compiler will know the number of arguments and the return type of the method.
public class Service<TInterface>
{
public TResult Invoke<...
I may just be passing data between views completely wrong here, so I am open to completely changing how I pass my data back and forth.
My app delegate creates the NSManagedObjectContext and passes that to my main menu using a UINavigationController which makes it the root view:
MainMenuViewController *mainMenuViewController = [[MainMen...
I would have expected delegates generated from expression trees to achieve roughly the same performance as hard-coded, static, equivalent anonymous methods. However, it seems that dynamically generated delegates are noticeably slower...
Here's a simple test program to illustrate the case. It just accesses 3 properties of an object 10000...
Can somebody explain me how exactly does the delegate work in iphone sdk.....???
A simple example how to use the delegate and what are the advantages of using delegate.
...
Hi Guys,
I want to know how do I go about removing individual delegates from the invocation list of the parent delegate.
<DelegateName>.RemoveAll();
Now I can just remove all and that will work just to get the idea in motion and see if works which it should but then any delegates removed will need adding again at RunTime!!!
so: ...
...
I'm working on an app that uses .net remoting for IPC.
When my client app starts up, it uses the following code to connect to the server:
chnl = gcnew HttpChannel();
ChannelServices::RegisterChannel(chnl, false);
IPCObjectInstance = (BaseRemoteObject)Activator.GetObject(
typeof(BaseRemoteObject),
"http://localhost...
Hi,
I came across a code which was using BeginInvoke to update label text in a certain way, which I found strange and I can't understand why would somebody do that.
If I want to use threading to allow good user experience, I would create a thread and update the labels in the new thread using Thread.Start nethod. Why would I use the b...
I'm currently using BeginInvoke(with ASyncCallback) to handle my Client\Server communications with remoting. Here is my current setup:
...
//Main
Remoter.StationDelegate svd = new Remoter.StationDelegate(IPCObjectInstance, &Remoter.GetStationInformation);
AsyncCallback callback = new AsyncCallback(this, &CentralControlClient.Sta...
I have 2 classes whose object should act as "partners". The first one is my Thing class, whose instances should act as Tree::TreeNodes of the gem RubyTree.
Basically, this delegation can be implemented using Forwardable:
class Thing < NoClassInheritancePlease
extend Forwardable
def initialize(title = "node")
@node = Tree::Tree...