I've seen several Scala questions recently (e.g. here, here, and here) that called for the use of proxies, and it's come up more than once in my own work. The Scala library has a number of proxy traits (14, if I counted correctly).
Proxy classes/traits usually contain lots of boilerplate:
class FooProxy(val self: Foo) extends Foo {
...
I want to use a tableview as a picker. For example, when selecting a ringtone for a contact a tableview of ring tones appears.
What is the ideal way to accomplish this? It seems like this would be very common.
Thanks for your time.
...
Having problem understanding Delegate error. Error says expression expected, How do I fix? Thanks for any help.
Here is the offending line (#259)....
mylist.ForEach(Delegate Function(P As linkItem) As System.Char[] )
Here is the entire code.
<script language="VB" runat="server">
Function sectionTitle(ByRef f As String)
...
Is there any way to get a delegate to run on a specific thread?
Say I have:
CustomDelegate del = someObject.someFunction;
Thread dedicatedThread = ThreadList[x];
Can I have a consistent background long running thread and invoke my own delegates on it whenever I need it. It has to be the same thread each time.
[Edit]
The reason why...
Hi
I'm getting a warning when I set the delegate for UIImagePickerController. It's because UIImagePickerController and its parent UINavigationController both have delegates that can be used. The code works fine but just wondering how to handle delegates and inheritance properly and lose the warning.
So basically I've created my own MyI...
Hi All,
I am new to c#. I am trying to declare a delegate function which takes 2 generics inputs.
I am having problems compile it. can anyone tell me what is the problem here.
delegate int ippcFuncPtr<in T1, in T2>(T1 param, T2 returnval);
static int ippcServerRegisterProcedure(int handle,
string procedureName, ippcFuncPtr<in T1,...
Okay, I understand how to work delegation in a modal view to send a message to the parentviewcontroller but what if I wanted to do that with 2 views that dont have that parent-child relationship?
I have a navigation controller that flips over a modal view and then that modal view pushes a new view controller. How do I let that pushed vi...
This is my first question on SO, so if it seems beyond dumb, please take it easy on me. I have a page with a list of pictures with links for deletion underneath them and with possibility to add more pictures. After each one of this events (that does a #user_gallery load like below, I have to click twice the delete link for it to work. W...
I'm attempting to re-organize my application's namespace hierarchy, so I'm using a System.Runtime.Serialization.SerializationBinder sub-class to attempt to handle the renaming. (Most of my renamed classes are correctly deserialized into their new namespaces without problems.)
The problem I have is that one of my serialized classes (whi...
From Silverlight 4, it's pretty easy to start Word and let the user do something:
dynamic word = System.Runtime.InteropServices.Automation.CreateObject("Word.Application");
word.Visible = true;
word.Documents.Open("test.doc");
MS Word exposes a Quit event[1]. I'd like to handle this event, but for the life of me I can't figure out how...
This is is returning a boolean based on whether or not there are some matching IDs.
from t in getAll
select new Result
{
...
bool DetailsAvailable =
(db.SaveTrackings.Where(s => s.BundleID == t.bundleID
&& s.UserID == t.userID)
.Count() > 0) ? true : f...
I have a function Run(string, string[]) which I want to run on a separate thread, so I am using a delegate and BeginInvoke:
private Func<string, string[], Stack<StackItem>> runner;
public MainPage()
{
runner = Run;
}
private void btnStep_Click(object sender, RoutedEventArgs e)
{
// snip
runner.BeginInvoke(tbCode.Text, GetA...
Edit: Problem is solved by updating.
Resharper is really annoying me and marking code that is 100% correct as wrong, it keeps wanting me to change an Action to an Action<T1,T2...Tn> when this obviously incorrect. It flashes everytime I type something so is really distracting. Is there a way to disable resharper totally inbetween two c...
How can I create a new file containing just it's own delegate so that I can make an ASIHTTPRequest with its own asynchronous ending, and something easy enough where I just need to set [request setDelegate:self]; to something like [request setDelegate:AlternateDelegate]; and just add an include at the begining of the document to reference...
public delegate void ExecuteCallback();
class Executioner
{
private ExecuteCallback _doExecute;
public void AddMultiple()
{
// Add a delegate to MethodA
// This will work even if _doExecute is currently null
_doExecute += new Execute( MethodA );
// Add a delegate to MethodB also
_doExecute += new Execute( Meth...
Hey!
Is there a UITableView delegate-action that runs when the tableView is being scrolled?
This is probably really easy, but I can't find it.
Thank you :)
...
Im not sure how to convert C# code with delegate into Visual basic code, can you help me?
List<XmlUser> matchingUsers = this.Store.Users.FindAll(delegate(XmlUser user)
{
return user.Email.Equals(emailToMatch,
StringComparison.OrdinalIgnoreCase);
}
);
...
Hi all,
Long time lurker, first time poster.
I'm making a ServerConnection module to make it a whole lot modular and easier but am having trouble getting the delegate called. I've seen a few more questions like this but none of the answers fixed my problem.
ServerConnection is set up as a protocol. So a ServerConnection object is cre...
I wonder if I can do assignment using TResult<in T, out TResult>
I can retrieve the value of the property of a class instance with that delegate as below:
class Program
{
class MyClass
{
public int MyProperty { get; set; }
}
static void Main(string[] args)
{
Func<MyClass, int> orderKeySelector = o =>...
Hi.
I have a bunch of connection related methods that I need to execute before the table is actually being populated (before any of the delegate methods for a UITableView are called). The connection methods will add objects in a NSMutableArray that will later be used to populate the table view.
Is there a way to tell the iPhone to wait...