Search Results

Search found 1192 results on 48 pages for 'listener'.

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

  • Disabling JavaScript Listener with Greasemonkey

    - by RHPT
    There is a Greasemonkey script that removes the tracking identifiers from Yahoo! News stories (http://userscripts.org/scripts/show/3642). However, Yahoo! implemented listeners that adds the tracking link back when you click on a news story link. How could I disable the onclick listener so that the link tracking is not added back?

    Read the article

  • Where is the action listener registered?

    - by Summer_More_More_Tea
    Hi there: I come across this problem when referring a piece of javascript code: <a href="javascript:void(0);"><!-- other html elements --></a> It want to register a mouse click event listener on this anchor, but I cannot find which function is registered. What's more, what does the code href="javascript:void(0);" mean? Thanks in advance!

    Read the article

  • javascript error listener

    - by John Doe
    hi all i try using window.attachEvent (or addEventListener) to capture js errors my callback function gets only one event parameter my question is: how do i get line number and source file of the error from this event? the alternative usage window.onerror=callback; works but an event listener has other benefits thus im giving it a try

    Read the article

  • call JavaScript function within Google Maps Listener

    - by Queueball
    Ok, simple question but is it possible to call an external javascript function within a google maps listener? GEvent.addListener(map,"click", function(overlay, latlng) { testfunction(latlng); }); testfunction doesn't run, so is there a particular way i need to go about this? I'm new to google maps and javascript.

    Read the article

  • what EVENT LISTENER should i use for my android app

    - by Mithraa
    In my app, when one particular image button is clicked and held, i must be able to calculate the time for which the image button was held pressed. Can any one help me by giving some simple guidance or sample code. i am really stuck up here. Is there any specific event listener for this particular requirement.

    Read the article

  • Pressed Listener for a View

    - by michael
    Hi, In android, is there such a thing for listening if a View is pressed? In background drawable, i can set assert depends on the view is pressed or not. Is it possible for me to add a Listener for a View when I pressed it? Thank you.

    Read the article

  • NHibernate save / update event listeners: listening for child object saves

    - by James Allen
    I have an Area object which has many SubArea children: public class Area { ... public virtual IList<SubArea> SubAreas { get; set; } } he children are mapped as a uni-directional non-inverse relationship: public class AreaMapping : ClassMap<Area> { public AreaMapping() { HasMany(x => x. SubAreas).Not.Inverse().Cascade.AllDeleteOrphan(); } } The Area is my aggregate root. When I save an area (e.g. Session.Save(area) ), the area gets saved and the child SubAreas automatically cascaded. I want to add a save or update event listener to catch whenever my areas and/or subareas are persisted. Say for example I have an area, which has 5 SubAreas. If I hook into SaveEventListeners: Configuration.EventListeners.SaveEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is only fired once only for area (SubAreas are ignored). I want the 5 SubAreas to be caught aswell in the event listener. If I hook into SaveOrUpdateEventListeners instead: Configuration.EventListeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is not fired at all. Strangely, if I hook into SaveEventListeners and SaveOrUpdateEventListeners: Configuration.EventListeners.SaveEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; Configuration.EventListeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[] { mylistener }; When I save the area, Mylistener is fired 11 times: once for the area, and twice for each SubArea! (I think because NHIbernate is INSERTing the SubArea and then UPDATING with the area foreign key). Does anyone know what I'm doing wrong here, and how I can get the listener to fire once for each area and subarea?

    Read the article

  • Implement JNI listener.

    - by G B
    I have the following code in a c++ "listener class" (more or less), which calls some function of a Java object. I suspect there's a memory leak: JNIEnv *env = NULL; vm_->AttachCurrentThread(&env, NULL); const jclass cls = env->FindClass(...); const jmethodID meth = env->GetMethodID(...); const jobject obj = env->NewObject(cls, meth, ...); [ more code ] env->DeleteLocalRef(obj); My question is: should I also release the local reference of cls and meth? JNI Documentation isn't very clear about it.

    Read the article

  • Adding WPF Text Writer Trace Listener in an Outlook Add In using wpf window/control

    - by Deepak N
    I'm working on a outlook 2003 AddIn using VSTO SE.We have few customized windows developed in WPF. It looks there are few client machines have problem with WPF rendering due to which there could be an exception due to addin is getting disabled. I added a outlook.exe.config and added trace listeners for wpf Trace sources. I set it up according this link. The console trace listener is working fine for me. But I'm not able get the TextWriterTraceListener working with config <add name="textListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Trace.log" /> I tried giving absolute path for trace log file as "C:\Trace.log".The TextWriterTraceListener worked for a dummy wpf app with the same config. Am I missing anything here.

    Read the article

  • AS3: Weak Listener References Not Appropriate During Initialization?

    - by TheDarkIn1978
    as i currently understand, if an event listener is added to an object with useWeakReference set to true, then it is eligible for garbage collection and will be removed if and when the garbage collection does a sweep. public function myCustomSpriteClass() //constructor { this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener, false, 0, true); this.addEventListener(MouseEvent.MOUSE_UP, mouseUpListener, false, 0, true); } in this case, is it not appropriate to initialize an object with weak references event listeners, incase the garbage collector does activate a sweep removing the objects event listeners since they were added during initialization of the object? in this case, would it only be appropriate to create a type of deallocate() method which removes the event listeners before the object is nullified?

    Read the article

  • Too many open files error in Glassfish3 while using https listener

    - by a1ex07
    I have a problem running webservice that requires https connection(Glassfish3). After running for a while, it eventually crashes. Log file show "Failed to load keystore type JKS with path ....config/keystore.jks due to ...config/keystore.jks (Too many open files)". lsof shows that a number of open files are constantly increasing (among others, I noticed that there are many files with type 'sock' and undefined protocol that never get closed). I tried changing the limit of open files, but it resulted in a longer time before crashing... I blamed the webservice, but everything works fine if the application doesn't require confidential protocol. Did I miss anything in http listener configuration ? Or it is rather an application error? Thanks in advance

    Read the article

  • Add a listener inside or outside get method

    - by James P.
    I'm learning Swing and have composed an interface using a series of get methods to add components. Is it a good practise to add a Listener inside a get method as follows? I'd like to make things as decoupled as possible. private JButton getConnectButton() { if (connectButton == null) { connectButton = new JButton(); connectButton.setText("Connect"); connectButton.setSize(new Dimension(81, 16)); connectButton.setLocation(new Point(410, 5)); connectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // actionPerformed code goes here } }); } return connectButton; }

    Read the article

  • Eclipse progress view stop button listener

    - by Joe Teght
    Hi! I develop an eclipse plugin, and I created an progress view which indicates where the work runs. Everything works correctly, but I have a question. When I made this view an stop button appeared on it. But I haven't found any listener to control this. But the best should be that if there is an pause button within the view insted of the stop button. Please give me some idea! Thanks!

    Read the article

  • .NET C# MouseEnter listener on a Control WITH Scrollbar

    - by Run CMD
    As long as the mouse is over a specific control, we show some form. When the mouse leaves the control, we hide the control after a small timeout. This is standard hover behavior. However, when a control (for example a Treeview) has a scrollbar, and the mouse is ON or OVER the scrollbar, the events don't fire ... If we could get a reference to the scrollbar control, this would solve our problem, as we would add the same listener events to the scrollbar. However, the scrollbar isn't accessible as far as I know ... How can we solve this problem ?

    Read the article

  • AS3 Add Event Listener in For Each

    - by Vinzcent
    Hi, I would like to add an eventlistener to all the elements I create in a for each loop. But apperently the eventlistener only works with the latest created element. How do I add an Event Listener to every element created in the for each loop? This is my code: for each(var showCase:ShowCaseItem in _bllShowCase.arrShowCase) { var listItem:ListItemShowCase = new ListItemShowCase(showCase); listItem.y = yPos; listItem.addEventListener("ITEMDELETED", refreshShowCaseItems); this.addChild(listItem); yPos += 20; } I hope you understand my question. Thanks, Vincent

    Read the article

  • Click Listener not invoked within ListFragment

    - by membersound
    I'm extending a SherlockListFragment, but it should not matter as my question seems to be more general related to Fragments. Now, I implement a simple click listener for my list, but it does not get called. public class MyListFragment extends SherlockListFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.list, container, false); v.setOnClickListener(new OnClickListener() { public void onClick(View view) { Log.i("debug", "single click"); } }); return v; } } Is anything wrong with this? //Solution: listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Log.i("debug", "single click"); } });

    Read the article

  • jQuery click listener on <object> in IE failing

    - by Steve Meisner
    $("#listView object.modal").click(function(){ // Get the ID of the clicked link: var link = $(this).closest("h2").attr("title"); var id = $(this).closest("div").attr("id"); showDialog(link, id); return false; }); This fires a modal (jQuery UI). It it working in FF, Chrome/Safari but not in IE 7/8. Is there something I'm missing here? Big Picture: We're using a swf to render custom type and there is a link in the rendered (flash) content. We're hoping to catch the link action in the jQuery listener so we don't have to extend our swf have an optional param to return false on link click. We thought we got around it, until IE testing commenced... Let me know if any more info is needed. Thanks!

    Read the article

  • How to disable EditText box in Android when using LongClick Listener

    - by user1443051
    I have EditText box which has focusable and focusableontouch enabled and all the rest are disabled in XML. The problem I am facing is that on longclick on this text box the selectAll and select pop up comes up - I would like to disable it and at the same time use the OnlongClick Funtion too.. So I tried android:longClickable="false" on XML and set the text box using LongClick listener in java Something like this: edEmailId.setOnLongClickListener(myOnLongClickListener); Didn't work I am still getting selectALL popup window. Is LongClickable in XML and SetOnlongClicklistener the same? If so how do I disable the popup? Awaiting your response! Thanks!

    Read the article

  • NHibernate listener/event to replace object before insert/update

    - by vIceBerg
    Hi! I have a Company class which have a collection of Address. Here's my Address class:(written top of my head): public class Address { public string Civic; public string Street; public City City; } This is the City class: public class City { public int Id; public string Name; public string SearchableName{ get { //code } } } Address is persisted in his own table and have a reference to the city's ID. City are also persisted in is own table. The City's SearchableName is used to prevent some mistakes in the city the user type. For example, if the city name is "Montréal", the searchable name will be "montreal". If the city name is "St. John", the searchable name will be "stjohn", etc. It's used mainly to to search and to prevent having multiple cities with a typo in it. When I save an address, I want an listener/event to check if the city is already in the database. If so, cancel the insert and replace the user's city with the database one. I would like the same behavior with updates. I tried this: public bool OnPreInsert(PreInsertEvent @event) { City entity = (@event.Entity as City); if (entity != null) { if (entity.Id == 0) { var city = (from c in @event.Session.Linq<City>() where c.SearchableName == entity.SearchableName select c).SingleOrDefault(); if (city != null) { //don't know what to do here return true; } } } return false; } But if there's already a City in the database, I don't know what to do. @event.Entity is readonly, if I set @event.Entity.Id, I get an "null identifier" exception. I tried to trap insert/update on Address and on Company, but the City if the first one to get inserted (it's logic...) Any thoughts? Thanks

    Read the article

  • Action listener for JButton array

    - by user530809
    Let's say I have a program with 2D array of buttons, and when you click one of them it turns red. I didn't want to declare every single button seperately so I just created JButton[][] array for them. The problem is that I don't know how to use action listener on any of the buttons in the array so it would change the color of this particular button, and none of related questions is relevant to this. I tried to use "for" but it doesn't help: package appli; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MainW extends JFrame implements ActionListener { public MainW(){ setSize(640,480); setTitle("title"); setLayout(null); JButton[][] btnz = new JButton[5][5]; for(Integer i=0;i<5;i++) { for(Integer j=0;j<5;j++) { btnz[i][j]= new JButton(""); btnz[i][j].setBackground(Color.WHITE); btnz[i][j].setBounds(10+20*i,10+20*j,20,20); add(btnz[i][j]); btnz[i][j].addActionListener(this); } } setDefaultCloseOperation(EXIT_ON_CLOSE); setVisible(true); } public void actionPerformed(ActionEvent e){ for(Integer i=0;i<5;i++) { for(Integer j=0;j<5;j++) { if (e.getSource()==btnz[i][j]); { btnz[i][j].setBackground(Color.RED); } } } } }

    Read the article

  • User "oracle" unable to start or stop listeners

    - by user12620111
    Recently ran into a problem where user "oracle" was unable to start or stop listeners: oracle$ srvctl stop listener PRCR-1065 : Failed to stop resource ora.LISTENER.lsnr CRS-0245:  User doesn't have enough privilege to perform the operation CRS-0245:  User doesn't have enough privilege to perform the operation PRCR-1065 : Failed to stop resource ora.LISTENER_IB.lsnr CRS-0245:  User doesn't have enough privilege to perform the operation CRS-0245:  User doesn't have enough privilege to perform the operation The system is currently "fixed":oracle$ srvctl start listeneroracle$ srvctl status listenerListener LISTENER is enabledListener LISTENER is running on node(s): etc9cn02,etc9cn01Listener LISTENER_IB is enabledListener LISTENER_IB is running on node(s): etc9cn02,etc9cn01oracle$ srvctl stop listeneroracle$ srvctl status listenerListener LISTENER is enabledListener LISTENER is not runningListener LISTENER_IB is enabledListener LISTENER_IB is not runningoracle$ srvctl start listenerHow it was "fixed":Before:# crsctl status resource ora.LISTENER.lsnr -p | grep ACL=ACL=owner:root:rwx,pgrp:root:r-x,other::r--# crsctl status resource ora.LISTENER_IB.lsnr -p | grep ACL=ACL=owner:root:rwx,pgrp:root:r-x,other::r--"Fix":# crsctl setperm resource ora.LISTENER.lsnr -o oracle# crsctl setperm resource ora.LISTENER.lsnr -g oinstall# crsctl setperm resource ora.LISTENER_IB.lsnr -g oinstall# crsctl setperm resource ora.LISTENER_IB.lsnr -o oracleAfter:# crsctl status resource ora.LISTENER.lsnr -p | grep ACL=ACL=owner:oracle:rwx,pgrp:oinstall:r-x,other::r--# crsctl status resource ora.LISTENER_IB.lsnr -p | grep ACL=ACL=owner:oracle:rwx,pgrp:oinstall:r-x,other::r--I may never know how the system got into this state.

    Read the article

  • error with redirect using listener JSF 2.0

    - by Ray
    I have a index.xhtml page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <f:view> <ui:insert name="metadata" /> <f:event type="preRenderView" listener="#{item.show}" /> <h:body></h:body> </f:view> </html> And in bean class with scope session this method public void show() throws IOException, DAOException { ExternalContext externalContext = FacesContext.getCurrentInstance() .getExternalContext(); //smth String rootPath = externalContext.getRealPath("/"); String realPath = rootPath + "pages\\template\\body\\list.xhtml"; externalContext.redirect(realPath); } i think that I should redirect to next page but I have "browser can't show page" and list.xhtml (if I do this page as welcome-page I haven't error, it means that error connected with redirect) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:body> <ui:composition template="/pages/layouts/mainLayout.xhtml"> <ui:define name="content"> <h:form></h:form></ui:define></ui:composition> </h:body> </html> in consol i didn't have any error. in web.xml <welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> What can be the reason this problem?

    Read the article

  • MooTools event listener disappears after element.innerHTML is changed

    - by acoder
    Hi everyone, I am trying to achieve this task using MooTools. Description: I attached an event listener to "myButton" link. A click on this link initiates an AJAX request and updates "myDiv" content based on the response text. During this request a POST variable is being sent to "button.php", but it's not used at the moment.. (i wish to use it later) OK, as a result, "myDiv" gets exactly the same link with the same ID (myButton) + a random number, so that we could see that each click generates a new number. The problem: After the first click on "myButton", "myDiv" updates correctly, showing a random number. When I click "myButton" for the second time (this time in newly updated div), the div does not refresh anymore. Please note that I need "myButton" to be inside "myDiv", and "myDiv" must be updated (refreshed) after each click without having to refresh the entire page. Can somebody show me how to achieve this task based on this simplified code example? index.html <html> <head> <script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script> <script> window.addEvent('domready', function() { $('myButton').addEvent('click', function(e) { e.stop(); var myRequest = new Request({ method: 'post', url: 'button.php', data: { action : 'test' }, onRequest: function() { $('myDiv').innerHTML = '<img src="images/loading.gif" />'; }, onComplete: function(response) { $('myDiv').innerHTML = response; } }); myRequest.send(); $('myButton').removeEvent('click'); }); }); </script> </head> <body> <div id="myDiv"> <a id="myButton" href="#">Button</a> </div> </body> </html> button.php <a id="myButton" href="#">Button</a> clicked <?php echo rand(1,100); ?>

    Read the article

  • How do I implement a listener pattern over RMI using Spring?

    - by predhme
    So here is a generalized version of our application desgin: @Controller public class MyController { @Autowired private MyServiceInterface myServiceInterface; @RequestMapping("/myURL") public @ResponseBody String doSomething() { MyListenerInterface listener = new MyListenerInterfaceImpl(); myServiceInterface.doThenCallListener(listener); // do post stuff } } public interface MyListenerInterface { public void callA(); public void callB(); } public class MyListenerInterfaceImpl implements MyListenerInterface { // ... omitted for clarity } public interface MyServiceInterface { public void doThenCallListener(MyListenerInterface listener); } public class MyServiceImpl { public void doThenCallListener(MyListenerInterface listener) { // do stuff listener.callA(); } } Basically I have a controller that is being called via AJAX in which I am looking to return a response as a string. However, I need to make a call to the backend (MyServiceInterface). That guy is exposed through RMI by using Spring (man that was easy). But the service method as described requires a listener to be registered for invokation completion purposes. So what I assume I need to achieve is transparently to the backend make it so that when the listener methods are called, really the call is going over RMI. I would have thought Spring would have a simple way to wrap a POJO (not a service singleton) with RMI calls. I looked through their documentation but they had nothing besides exposing services via RMI. Could someone point me in the right direction?

    Read the article

  • starting oracle 10g on ubuntu, Listener failed to start.

    - by tsegay
    I have installed oracle 10g on a ubuntu 10.x, This is my first time installation. After installing I tried to start it with the command below. tsegay@server-name:/u01/app/oracle/product/10.2.0/db_1/bin$ lsnrctl LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-DEC-2010 22:46:51 Copyright (c) 1991, 2005, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> start Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) TNS-12555: TNS:permission denied TNS-12560: TNS:protocol adapter error TNS-00525: Insufficient privilege for operation Linux Error: 1: Operation not permitted Listener failed to start. See the error message(s) above... my listener.ora file looks like this: # listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = acct-vmserver)(PORT = 1521)) ) ) I can guess the problem is with permission issue, But i dont know where I have to do the change on permission. Any help is appreciated ...

    Read the article

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