Search Results

Search found 3645 results on 146 pages for 'handler'.

Page 5/146 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to add handler in dynamic datatemplate

    - by Phillip Ngan
    I am successfully declaring a data template in a code behind as follows: private static DataTemplate CreateTemplate(string sortMemberPath, HorizontalAlignment horzAlignment) { const string xamlFormat = "<DataTemplate xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" >" + "<StackPanel > " + " <TextBlock Margin=\"2,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"_HALIGNMENT_\" " + " Text=\"hello there\"> " + " </TextBlock> " + "</StackPanel>" + "</DataTemplate>"; return (DataTemplate) XamlReader.Load(xamlReturned); } But now I want to add a size changed handler by changing the line: + "<StackPanel > " to + "<StackPanel SizeChanged="SizeChangedHandler" > " I have the method "SizeChangedHandler" declared in the code behind. This results in a xaml parse error when the control attempts to load at runtime. I suspect that it can't find the handler "SizeChangedHandler". How can I specify this handler so that the xaml parser is happy.

    Read the article

  • Catch not working and how to unset the exception handler

    - by neoneye
    catch is not working because there is installed an exception handler using set_exception_handler() I need "catch" to work, so I guess I need to unset the exception handler somehow. Things such as set_exception_handler(NULL) isn't working. Any ideas how to unset the exception handler? function my_exception_handler($exception) { error_log("caught exception: " . $exception->getMessage() ); } set_exception_handler("my_exception_handler"); // QUESTION: how does on unset it ? //set_exception_handler(NULL); try { throw new Exception('hello world'); error_log("should not happen"); } catch(Exception $e) { error_log("should happen: " . $e->getMessage()); } Actual output: caught exception: hello world Desired output: should happen: hello world

    Read the article

  • stopping android handler loop

    - by venka reddy
    Hi, i am using a class which extends Handler class to update my activity UI. The code is as follows in side main activity, /////////////////////////////// public class RefreshHandler extends Handler { public void handleMessage(Message msg) { Homeform.this.updateUI(); } public void sleep(long delayMillis) { this.removeMessages(0); sendMessageDelayed(obtainMessage(0), delayMillis); } }; private void updateUI(){ Log.v("","== I am inside Update UUI====================="); refresh(); mRedrawHandler.sleep(5000); } /////////////////////////// And i had call this method handleMessage() on the object of RefreshHandler as follows /////////////////////////////////////////// mRedrawHandler = new RefreshHandler(); mRedrawHandler.handleMessage(new Message()); //////////////////////////////////////////////// But here i am facing one problem that is it is running after closing my application also . please solve my problem to stop this handler when close this application. ThanQ.....

    Read the article

  • How to properly siglongjmp out of signal handler?

    - by EpsilonVector
    Suppose I have the following code: In order to implement a context switch I activate ualarm and when it jumps to the handler it setjmp's the current context, and longjmps to the next, expecting to eventually return to the alarm handler and longjmped back into this context (the contexts are cycled through in a Round Robin). For this I need to keep SIGALRM unblocked in between alarm_handlers. I came up with the following code, which doesn't seem to work. What's wrong with it and what is the right way to do this? void alarm_handler(){ if(sigsetjmp(toc->threads[toc->RR_pointer].env, 0)){ ualarm(200, 0); signal(SIGALRM, alarm_handler); return; } get_next_context_number(toc->RR_pointer); //is a macro for (j=0; j<10; j++) printf("ALARM HANDLER\n"); siglongjmp(toc->threads[toc->RR_pointer].env, 1); }

    Read the article

  • htaccess handler

    - by Steve
    Hi Everyone, I have strange problem that need help. It is about rewrite using apache. Here my .htaccess content file: Options +FollowSymLinks ## This is an example .htaccess-file ## To get everything automatically parsed, the following line is needed #set link auto on ##From now on, every RewriteRule gets recognised. RewriteEngine on RewriteRule captcha(\.html){0,1}$ captcha.php [QSA,L] RewriteCond %{SCRIPT_FILENAME} !-s RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f Rewriterule (.*) handler.php ##You can also change the text before the real link by the following line With this rule, I am hoping that all request except there is exists in file or directory will be directed to my custom handler: handler.php. Everyting just fine as expected but this case not: http://../test/form_login/query=%2Ftest%2Findex.php%3Fpage%3Dform& Root url: /test/, form_login is not file or directory index.php is exists in the root. Apache response with : 404 Page Not Found Thanks for any of your help. Regards, Steve

    Read the article

  • Bypassing Javascript form handler

    - by Ben Aston
    We are writing an ASP.NET MVC application. By default, if the client browser has Javascript, the handler for every form on the page is set, by Javascript, to be one that sends the submission down an Ajax "pipe" (progressive enhancement). But, for one form (on a page of several), I'd like this handler to be bypassed/ignored. Is there a simple way to do this? Perhaps by overriding the handler by specifying my own onsubmit event directly in the DOM - or some other method? We use jQuery, so those libraries are available to me.

    Read the article

  • Flex : Adding a click handler on SkinnableDataContainer's items

    - by sebpiq
    Hi, I am new to Flex. What I am looking for here is adding a click handler on all the items created by a SkinnableDataContainer. I tried several things that didn't work, and I have no idea what is the right way to do it. <s:SkinnableDataContainer id="teamList" itemRenderer="TeamSummaryRenderer"> <s:dataProvider> <s:ArrayList> <fx:Object teamName="A super team 1"/> <fx:Object teamName="A super team 2"/> <fx:Object teamName="A super team 3"/> </s:ArrayList> </s:dataProvider> </s:SkinnableDataContainer> Furthermore, I don't want to declare the handler in my custom TeamSummaryRenderer component. I would prefer that the handler code stays at application level. Is there a simple 'Flex-ish' to achieve this ?

    Read the article

  • FLEX: UIComponent Click Handler??

    - by davidemm
    Hello, Thanks for reading. I'm trying to put a label and an image on a UIComponent, side-by-side. I want to use UIComponent for efficiency reasons, and the entire component is more complicated than just a button with an icon. I'm trying to get a click handler on ther entire UIComponent so that when a click happens on either the label or the image, the same [click] event handler is called. If I add a click handler on the root component, it works, but when I introduce space between the label and the image, the space between them becomes un-clickable. I produce the space by using the move(x,y) method for the label and the image with a small gap between the x/y coordinates. Any ideas how to remedy this? Thanks.

    Read the article

  • Ideal way to set global uncaught exception Handler in Android

    - by Samuh
    I want to set a global uncaught exception handler for all the threads in my Android application. So, in my Application subclass I set an implementation of Thread.UncaughtExceptionHandler as default handler for uncaught exceptions. Thread.setDefaultUncaughtExceptionHandler( new DefaultExceptionHandler(this)); In my implementation, I am trying to display an AlertDialog displaying appropriate exception message. However, this doesn't seem to work. Whenever, an exception is thrown for any thread which goes un-handled, I get the stock, OS-default dialog (Sorry!-Application-has-stopped-unexpectedly dialog). What is the correct and ideal way to set a default handler for uncaught exceptions? Thanks.

    Read the article

  • Handler not yet determined error

    - by SourceC
    Hello, I don’t know anything about deploying a website, so I probably made some stupid mistake. Anyways, I opened IIS 7 manager, created new virtual directory ( via Add Application ) and pointed it to physical directory where Visual studio saved my Web project. But when I tried to request an .aspx page, browser reported the following error (I won’t post the whole error, but just the interesting bits): Handler: Not yet determined Config Error: Cannot read configuration file due to insufficient permissions Logon User: Not yet determined A) why is handler not yet determined? As far as I know, IIS7 does have Asp.Net handler registered?! B) Why wouldn’t IIS have sufficient permissions? Does that mean I should give IIS higher privileges? Or does Asp.Net runtime have insufficient permissions? C) Could the error also be due to the fact that perhaps it expected the user to authenticate itself? I’m assuming this due to Logon user not yet being determined? D) And finally, any ideas how to make it work? thanx

    Read the article

  • Fkex : Adding a click handler on SkinnableDataContainer's items

    - by sebpiq
    Hi, I am new to Flex. What I am looking for here is adding a click handler on all the items created by a SkinnableDataContainer. I tried several things that didn't work, and I have no idea what is the right way to do it. <s:SkinnableDataContainer id="teamList" itemRenderer="TeamSummaryRenderer"> <s:dataProvider> <s:ArrayList> <fx:Object teamName="A super team 1"/> <fx:Object teamName="A super team 2"/> <fx:Object teamName="A super team 3"/> </s:ArrayList> </s:dataProvider> </s:SkinnableDataContainer> Furthermore, I don't want to declare the handler in my custom TeamSummaryRenderer component. I would prefer that the handler code stays at application level. Is there a simple 'Flex-ish' to achieve this ?

    Read the article

  • One click handler for multiple elements?

    - by user246114
    Hi, I'm looking to add a click handler to a div. But is there a way to use a single click handler function and share it between multiple divs? Since I may have 100 divs, I don't want to create a click handler for each (they'll all practically do the same thing). The jquery example shows: $("p").click(function () { $(this).foo(); }); can we do something like: $("p").click(myClickHandler); function myClickHandler(source) { source.foo(); } ? Thanks

    Read the article

  • Asp.net 4.0 Handler Mappings Missing in IIS7

    - by Marc
    I have two Windows 2008 R2 Servers running an asp.net 4.0 app. The server that is having problems actually loads asp.net pages just fine, but if there are any ajax calls they don't work. I noticed there are no .net 4.0 specific Handler Mappings in IIS for this server like the other server has. It's literally missing all .net 4.0 mappings (.axd, .soap, .cshtm, .ashx and even .aspx). I've tried running "aspnet_regiis -ir" but that didn't help. Should I reinstall the .net 4.0 framework? Manually add all these missing mappings? Is there something else going on? What I don't want to do is add a ton of handlers to a web.config, they aren't needed on the server that works so it shouldn't be needed on the broken one.

    Read the article

  • Throwing a C++ exception from inside a Linux Signal handler

    - by SoapBox
    As a thought experiment more than anything I am trying to get a C++ exception thrown "from" a linux signal handler for SIGSEGV. (I'm aware this is not a solution to any real world SIGSEGV and should never actually be done, but I thought I would try it out after being asked about it, and now I can't get it out of my head until I figure out how to do it.) Below is the closest I have come, but instead of the signal being caught properly, terminate() is being called as if no try/catch block is available. Anyone know why? Or know a way I can actually get a C++ exception from a signal handler? The code (beware, the self modifying asm limits this to running on x86_64 if you're trying to test it): #include <iostream> #include <stdexcept> #include <signal.h> #include <stdint.h> #include <errno.h> #include <string.h> #include <sys/mman.h> using namespace std; uint64_t oldaddr = 0; void thrower() { cout << "Inside thrower" << endl; throw std::runtime_error("SIGSEGV"); } void segv_handler(int sig, siginfo_t *info, void *pctx) { ucontext_t *context = (ucontext_t *)pctx; cout << "Inside SIGSEGV handler" << endl; oldaddr = context->uc_mcontext.gregs[REG_RIP]; uint32_t pageSize = (uint32_t)sysconf(_SC_PAGESIZE); uint64_t bottomOfOldPage = (oldaddr/pageSize) * pageSize; mprotect((void*)bottomOfOldPage, pageSize*2, PROT_READ|PROT_WRITE|PROT_EXEC); // 48 B8 xx xx xx xx xx xx xx xx = mov rax, xxxx *((uint8_t*)(oldaddr+0)) = 0x48; *((uint8_t*)(oldaddr+1)) = 0xB8; *((int64_t*)(oldaddr+2)) = (int64_t)thrower; // FF E0 = jmp rax *((uint8_t*)(oldaddr+10)) = 0xFF; *((uint8_t*)(oldaddr+11)) = 0xE0; } void func() { try { *(uint32_t*)0x1234 = 123456789; } catch (...) { cout << "caught inside func" << endl; throw; } } int main() { cout << "Top of main" << endl; struct sigaction action, old_action; action.sa_sigaction = segv_handler; sigemptyset(&action.sa_mask); action.sa_flags = SA_SIGINFO | SA_RESTART | SA_NODEFER; if (sigaction(SIGSEGV, &action, &old_action)<0) cerr << "Error setting handler : " << strerror(errno) << endl; try { func(); } catch (std::exception &e) { cout << "Caught : " << e.what() << endl; } cout << "Bottom of main" << endl << endl; } The actual output: Top of main Inside SIGSEGV handler Inside thrower terminate called after throwing an instance of 'std::runtime_error' what(): SIGSEGV Aborted Expected output: Top of main Inside thrower caught inside func Caught : SIGSEGV Bottom of main

    Read the article

  • How can I add an event handler to an event by name?

    - by cyclotis04
    I'm attempting to add an event handler for every control on my form. The form is a simple info box which pops up, and clicking anywhere on it does the same thing (sort of like Outlook's email notifier.) To do this, I've written a recursive method to add a MouseClick handler to each control, as follows: private void AddMouseClickHandler(Control control, MouseEventHandler handler) { control.MouseClick += handler; foreach (Control subControl in control.Controls) AddMouseClickHandler(subControl, handler); } However, if I wanted to add a handler for all of the MouseDown and MouseUp events, I'd have to write two more methods. I'm sure there's a way around this, but I can't find it. I want a method like: private void AddRecursiveHandler(Control control, Event event, EventHandler handler) { control.event += handler; foreach (Control subControl in control.Controls) AddRecursiveHandler(subControl, event, handler); }

    Read the article

  • Handler for change of value using SliderBar in GWT

    - by Lee
    I'm using the SliderBar from the GWT Incubator in one of my current projects. I want to add a handler which fires whenever the value of the slider changes, but I'm not sure which handler I need to add to get this to work, or whether I need to write one of my own. Thanks

    Read the article

  • Can we add a SOAP message handler to a deployed webservice

    - by sachin
    Can we add a SOAP message handler to a deployed webservice, specifically using weblogic server. i am following a tutorial here: http://www.testearly.com/2008/08/14/creating-soap-message-handlers-in-3-simple-steps-part-1/ but is it possible to attach handler at runtime, without using @HandlerChain(file = "LogMessage_handler.xml") annotation?

    Read the article

  • Customizing Mail Message in SSIS Event Handler

    - by Eric Ness
    I want to add an email notification to an SSIS 2005 package event handler. I've added a Send Mail task to the event handler. I'd like to customize the email body to include things like the error description. I've tried including @[System::ErrorDescription] in the MessageSource field, but the mail message doesn't include the value of ErrorDescription only the name of the variable.

    Read the article

  • How to add a MIME handler to Firefox and Internet Explorer from an installer

    - by JustSmith
    I'm looking to create an installer that will add a handler for a MIME type in Firefox and Explorer. The installer I will be using will be either INNO (a.k.a Oh Nooo!) or NSIS. How do Mozilla and Microsoft recommend adding a handler. So far all I have been able to find for Firefox is how to Add/Remove/Augment manually which no matter how simple is something I would like to hide from the user.

    Read the article

  • jQuery Dynamic Button Click Handler

    - by Neb
    I have a code the change the html of a div to make a button. When I make a click handler for the dynamic button, nothing happens $('#signinup').html("<button id=\"login_submit\">Sign In</button>"); And the handler: $('#login_submit').click(function() { alert("Works!"); });

    Read the article

  • Cannot set textbox value in Callback handler in asp.net

    - by user102533
    I am using ASP.NET Callbacks (that implements the ICallbackEventHandler) and in the handler, I try to set a value of the text box: txtName.text = "Test"; but this value is not set. Is this a limitation with callback? It appears I cannot do much in a callback handler other than sending back a string to the client side (ofcourse I can access the Session etc)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >