Search Results

Search found 10379 results on 416 pages for 'handle'.

Page 13/416 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • GWT: What is the way to handle Click on GWT FlowPanel

    - by shaman.sir
    May be a dumb question, but GWT FlowPanel (raw div element) does not provides something to handle a mouseclick/mousemovement on it. Overriding onBrowserEvent do not works either. If setting onclick event using native JavaScript (need to specify positive height before, 'div' have a height of 0 if not specified), then catching these events is working properly. Is there a way to do it without using JSNI?

    Read the article

  • Finding a handle that persists when relaunching parent

    - by cidtek
    I need to interact with 3'rd party applications by knowing the handle of certain text fields, but the hWnd always changes when that window is recreated. Is there any method that would allow me to identify a window and repeatedly be able to access that window (even after it is closed and then reopened) without having the user manually identify the window? I need the user to be able to identify a window with the usual click, drag and release method but only have to do it once and not every time the target window is recreated.

    Read the article

  • How does IE8 handle xml header.

    - by markovuksanovic
    I was wondering where I can find some information how IE8 actually handles xml header... for example how is handling <?xml version="1.0" encoding="utf-8"?> different to <?xml version="1.0"?>. One other questions would be how FF handles those header. How is that different to IE8. I am almost 100% sure that they handle them differently but am still doing some research. /Marko

    Read the article

  • How to handle null response for json object

    - by user1494754
    I get a JSON response as { "edges": [], "nodes": [] } how to check if the objects has null values and handle the case?? JSONObject jobj = new JSONObject(line); JSONArray jArray = jobj.getJSONArray("edges"); if(jArray.length()!=0) { for(int i=0;i<jArray.length();i++){ JSONObject json_data = jArray.getJSONObject(i); x.add((float) json_data.getInt("x")); y.add((float) json_data.getInt("y")); end This retrurns me : org.json.JSONException: end of input at character 0 of

    Read the article

  • how to handle multiple NSUrlResponses in iphone

    - by MaheshBabu
    hi folks, i am getting data from .net web services. I am sending two NSURlrequests to the same url, But i need to save those responses separately. for that my code is -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { if (theConnection_LOD ) { [webData_LOD appendData:data]; } if (theConnection_photo) { [webData_photo appendData:data]; } } But it does n't work how can i handle these responses. can any one pls help me. Thank u in advance.

    Read the article

  • How to handle asynchronous socket receiving in C++?

    - by Overv
    I'm currently using a thread to handle Connect and Send calls asynchronously. This is all working fine, but now I want to make receiving asynchronous too. How should I receive data without pausing the whole queue while waiting for data? The only solution I can think of right now is a second thread.

    Read the article

  • Handle events in SPWebPartManager

    - by Ashok
    How do i handle events such as "WebPartMoving" and "WebPartMoved" in a page conataining webparts. The webpart manager tag is added to the master page. So i added the handler to code behind: m.WebPartMoving += new System.Web.UI.WebControls.WebParts.WebPartMovingEventHandler(m_WebPartMoved); but it's not working...what could be the reason?

    Read the article

  • How to handle UIPickerView with two data sources?

    - by devb0yax
    Hi, is it possible to handle two data sources in the UIPickerView? I have here a segmented control that would control the display of the picker view. So, for example, when first segment is clicked, the picker will display person's name. Then, when second segment is clicked, picker will display place's name. Thanks

    Read the article

  • How to gracefully handle the SIGKILL signal in Java

    - by Begui
    How do you handle clean up when the program receives a kill signal? For instance, there is an application I connect to that wants any third party app (my app) to send a finish command. What is the best say to send that finish command when my app has been destroyed with a kill -9?

    Read the article

  • Need help with BOOST_FOREACH/compiler bug

    - by Jacek Lawrynowicz
    I know that boost or compiler should be last to blame, but I can't see another explanation here. I'm using msvc 2008 SP1 and boost 1.43. In the following code snippet execution never leaves third BOOST_FOREACH loop typedef Graph<unsigned, unsigned>::VertexIterator Iter; Graph<unsigned, unsigned> g; g.createVertex(0x66); // works fine Iter it = g.getVertices().first, end = g.getVertices().second; for(; it != end; ++it) ; // fine std::pair<Iter, Iter> p = g.getVertices(); BOOST_FOREACH(unsigned handle, p) ; // fine unsigned vertex_count = 0; BOOST_FOREACH(unsigned handle, g.getVertices()) vertex_count++; // oops, infinite loop vertex_count = 0; BOOST_FOREACH(unsigned handle, g.getVertices()) vertex_count++; vertex_count = 0; BOOST_FOREACH(unsigned handle, g.getVertices()) vertex_count++; // ... last block repeated 7 times Iterator code: class Iterator : public boost::iterator_facade<Iterator, unsigned const, boost::bidirectional_traversal_tag> { public: Iterator() : list(NULL), handle(INVALID_ELEMENT_HANDLE) {} explicit Iterator(const VectorElementsList &list, unsigned handle = INVALID_ELEMENT_HANDLE) : list(&list), handle(handle) {} friend std::ostream& operator<<(std::ostream &s, const Iterator &it) { s << "[list: " << it.list <<", handle: " << it.handle << "]"; return s; } private: friend class boost::iterator_core_access; void increment() { handle = list->getNext(handle); } void decrement() { handle = list->getPrev(handle); } unsigned const& dereference() const { return handle; } bool equal(Iterator const& other) const { return handle == other.handle && list == other.list; } const VectorElementsList<T> *list; unsigned handle; }; Some ASM fun: vertex_count = 0; BOOST_FOREACH(unsigned handle, g.getVertices()) // initialization 013E1369 mov edi,dword ptr [___defaultmatherr+8 (13E5034h)] // end iterator handle: 0xFFFFFFFF 013E136F mov ebp,dword ptr [esp+0ACh] // begin iterator handle: 0x0 013E1376 lea esi,[esp+0A8h] // begin iterator list pointer 013E137D mov ebx,esi 013E137F nop // forever loop begin 013E1380 cmp ebp,edi 013E1382 jne main+238h (13E1388h) 013E1384 cmp ebx,esi 013E1386 je main+244h (13E1394h) 013E1388 lea eax,[esp+18h] 013E138C push eax // here iterator is incremented in ram 013E138D call boost::iterator_facade<detail::VectorElementsList<Graph<unsigned int,unsigned int>::VertexWrapper>::Iterator,unsigned int const ,boost::bidirectional_traversal_tag,unsigned int const &,int>::operator++ (13E18E0h) 013E1392 jmp main+230h (13E1380h) vertex_count++; // forever loop end It's easy to see that iterator handle is cached in EBP and it never gets incremented despite of a call to iterator operator++() function. I've replaced Itarator implmentation with one deriving from std::iterator and the issue persisted, so this is not iterator_facade fault. This problem exists only on msvc 2008 SP1 x86 and amd64 release builds. Debug builds on msvc 2008 and debug/release builds on msvc 2010 and gcc 4.4 (linux) works fine. Furthermore the BOOST_FOREACH block must be repeaded exacly 10 times. If it's repeaded 9 times, it's all OK. I guess that due to BOOST_FOREACH use of template trickery (const auto_any), compiler assumes that iterator handle is constant and never reads its real value again. I would be very happy to hear that my code is wrong, correct it and move on with BOOST_FOREACH, which I'm very found of (as opposed to BOOST_FOREVER :). May be related to: http://stackoverflow.com/questions/1275852/why-does-boost-foreach-not-work-sometimes-with-c-strings

    Read the article

  • Event handle in drop-down menu.

    - by QLiu
    Hello fellows, I am trying to develop a dynamic drop down menu by a customized widget style The custom widget has two main features: Read user's location cookies variable to set the proper contact phone number in the CP pages When users select on the drop down menu, it triggers onChange event, it re-select the contact phone number based on users' selections, but it won't reset the location cookies. My widgets conatins two files: Controller.php: Simply one, it uses to handle get cookies variables class serial extends Widget { function __construct() { parent::__construct(); } function generateWidgetInformation() { $this->info['notes'] = "Serial Number search Box"; } function getData() { //Get cookies code will go here, and pass to view.php $this->data['locale'] = 'gb';// for test purpose now } } view.php is about Presentation layer contains HTML, which get the data from my controller <div style="border: 1px solid black; display: block;" id="<?=$this->instanceID;?>"></div> <script>locale2contact('<?=$this->data['locale']?>', '<?=$this->instanceID;?>');</script> And then the Javascript function, call locale2contact var element_id =''; //Define Global Variables, //Receive the cookies locale, and instance id from view.php function locale2contact(locale, instance_id) { var details = ''; this.element_id=instance_id; //assing the instance id into global variable // alert(instance_id); //Check whether we got the instance id from view files if (locale == 'gb') details = 'UK Contact Details<br>' + build_dropdown(locale); else if (locale == 'fr') details = 'French Contact Details<br>'+build_dropdown(locale); else if (locale == 'be') details = 'Belgian Contact Details<br>'+ build_dropdown(locale); else details = 'Unknown Contact Detail'; writeContactInfo(details); } //Build the drop down menu with pre-selected option by using cookies. function build_dropdown(locale) { var dropdown = '<select onChange=changeContactInfo(this.options[selectedIndex].text)>'; dropdown += '<option' + (locale == 'gb' ? ' selected' : '') + '>UK</option>'; dropdown += '<option' + (locale == 'be' ? ' selected' : '') + '>Belgium</option>'; dropdown += '</select>'; return dropdown; } // Not smart way in here, once the people select the drop down box, it reselect the drop down menu and reset the contact info function changeContactInfo(selected) { var details =''; //alert(this.element_id); //alert(locale); if (selected == 'UK') details = 'UK Contact Details<br>' + build_dropdown2(selected); else if (selected == 'fr') details = 'French Contact Details<br>'+ build_dropdown2(selected); else if (selected == 'Belgium') details = 'Belgian Contact Details<br>'+ build_dropdown2(selected); else details = 'Unknown Contact Detail'; writeContactInfo(details); } //Build the drop down menu function build_dropdown2(selected) { var dropdown = '<select onChange=changeContactInfo(this.options[selectedIndex].text)>'; dropdown += '<option' + (selected == 'UK' ? ' selected' : '') + '>UK</option>'; dropdown += '<option' + (selected == 'Belgium' ? ' selected' : '') + '>Belgium</option>'; dropdown += '</select>'; return dropdown; } //Back to view function writeContactInfo(details) { document.getElementById(this.element_id).innerHTML = details; //update the instance field in view } Javascript function is not efficient. As you see, I got two similar duplicate functions to handle events. Users go to the page, the widget read the cookies variable to display contact info (locale2contact)and preselect the drop-down menu (function build_dropdown) If users select the drop down menu, the displya contact info change (function changeContactInfo), and then I need to rebuild the drop down menu with user previously selection (function build_dropdown2). I am looking for best practices for adding this functionality to RightNow widget. Thank you. I really do not like the way i am doing now. It works; but the code looks bad.

    Read the article

  • Django - How best to handle ValidationErrors after form.save(commit=False)

    - by orokusaki
    This is a fragment of my code from a view: if form.is_valid(): instance = form.save(commit=False) try: instance.account = request.account instance.full_clean() except ValidationError, e: # Do something with the errors here... I don't know what the best thing to do here is, but I certainly don't want to do it 180 times. This is an utter mess. Who would want to handle validation errors manually in every view. If you're not modifying the instance after save(commit=False), you don't have to worry about this, but what about in my case where every model has a foreign key to account which is set behind the scenes and hidden from the user? Any help is really appreciated.

    Read the article

  • Handle Union of List in C# with duplicates

    - by user320587
    Hi, I am trying to understand how to handle union or merge of two lists that can have duplicates. For example, List1 has { A, B, C} and List2 has { B, C, D }. I tried to use the Union operation and got a new list with values (A, B, C, D}. However, I need the B & C values from the second list, not first one. Is there a way to specify the union method, which duplicate value to use. The code I am using now is var newList = List1.Union<Object>(List2).ToList(); Thanks for any help. Javid

    Read the article

  • how to handle iframes/frames dom in the iphone uiwebview

    - by user217428
    in (void) webViewDidFinishLoad: (UIWebView*)webView I inject some javascript to handle the iframes. e.g. stringByEvaluatingJavaScriptFromString: @"try { var document = window.document.getElementsByTagName('iframe')[0].contentWindow.document.getElementsByTagName('frame'); } catch (e) { alert (e.message); }" It tells me the iframes document is undefined. Actually I have tried to print all the properties of contentWindow of iframe, but it's totally empty. I know the webViewDidFinishLoad may be called several times for each frame load. But I can never get the iframe document. I thought there should be at least once all the iframes are ready. Could someone please tell me how to get the iframe document to process the dom in the uiwebview? Thanks

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >