Search Results

Search found 28345 results on 1134 pages for 'custom event'.

Page 106/1134 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • How to send Event signal through Processes - C

    - by Jamie Keeling
    Hello all! I have an application consisting of two windows, one communicates to the other and sends it a struct constaining two integers (In this case two rolls of a dice). I will be using events for the following circumstances: Process a sends data to process b, process b displays data Process a closes, in turn closing process b Process b closes a, in turn closing process a I have noticed that if the second process is constantly waiting for the first process to send data then the program will be just sat waiting, which is where the idea of implementing threads on each process occurred and I have started to implement this already. The problem i'm having is that I don't exactly have a lot of experience with threads and events so I'm not sure of the best way to actually implement what I want to do. I'm trying to work out how the other process will know of the event being fired so it can do the tasks it needs to do, I don't understand how one process that is separate from another can tell what the states the events are in especially as it needs to act as soon as the event has changed state. Thanks for any help Edit: I can only use the Create/Set/Open methods for events, sorry for not mentioning it earlier.

    Read the article

  • duplicate rows in join table with has_many => through and accepts_nested_attributes_for

    - by shalako
    An event has many artists, and an artist has many events. The join of an artist and an event is called a performance. I want to add artists to an event. This works except that I'm getting duplicate entries into my join table when creating a new event. This causes problems elsewhere. event.rb has_many :performances, :dependent => :destroy has_many :artists, :through => :performances accepts_nested_attributes_for :artists, :reject_if => proc {|a| a['name'].blank?} accepts_nested_attributes_for :performances, :reject_if => proc { |a| a['artist_id'].blank? }, :allow_destroy => true artist.rb has_many :performances, :dependent => :destroy has_many :artists, :through => :performances performance.rb belongs_to :artist belongs_to :event events_controller.rb def new @event = Event.new @event.artists.build respond_to do |format| format.html # new.html.erb format.xml { render :xml => @event } end end def create @event = Event.new(params[:event]) respond_to do |format| if @event.save flash[:notice] = 'Event was successfully created.' format.html { redirect_to(admin_events_url) } format.xml { render :xml => @event, :status => :created, :location => @event } else format.html { render :action => "new" } format.xml { render :xml => @event.errors, :status => :unprocessable_entity } end end end output Performance Create (0.2ms) INSERT INTO `performances` (`event_id`, `artist_id`) VALUES(7, 19) Performance Create (0.1ms) INSERT INTO `performances` (`event_id`, `artist_id`) VALUES(7, 19)

    Read the article

  • Custom Data Formatters broken in xcode 3.2.2

    - by krunk
    I've noticed with Xcode 3.2.2 that all the custom data formatters are no longer working. Some searching around the mailing lists and google confirms others are having the same issue. A) Anyone else seen this B) Got a work around or an example custom data formatter plugin that still works in 3.2.2 that I can look to for hints on how to fix the ones I have?

    Read the article

  • SharePoint 2010 custom search from Layouts page

    - by Faiz
    Hi, I am querying SharePoint 2010 search using FullTextSqlQuery. The query returns results as long as i run it from the webpart. However, for some reason, i need to run the same query from a custom aspx page deployed under layouts. The query returns a wcf exception. Has anyone tried running custom queries from pages deployed to layouts folder under 14 hive? Thanks, Faiz

    Read the article

  • Resize issue to fit dynamically with any browser size

    - by Qpixo
    I'm trying to make full flash site dynamically resize in any browser size. If the browser gets smaller than the site MC should constrain to fit in the browser. (EX: 1440x900) What I have right now works like 98% of the time, but when I switch to a bigger screen size, it screws up and makes the site tiny from left to right (menu, logo, etc.) (Ex:1680x1050) Does anyone know how to fix that issue?? positionScenesOnStage(); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; stage.addEventListener(Event.RESIZE, handleObjectsOnStage); private function handleObjectsOnStage(event:Event):void { positionScenesOnStage(); } private function positionScenesOnStage():void { backgroundMC = new bgMC(); backgroundMC.x = 0; backgroundMC.y = 0; backgroundMC.width = stage.stageWidth; backgroundMC.height = stage.stageHeight; addChild(backgroundMC); logo_mc = new LogoMC(); logo_mc.x = stage.stageWidth - 1420; logo_mc.y = stage.stageHeight - 700; addChild(logo_mc); menuContainer = new MenuContainerMC(); menuContainer.x = stage.stageWidth - 400; menuContainer.y = stage.stageHeight - 680; addChild(menuContainer); }

    Read the article

  • Abstract mapping with custom JiBX marshaller

    - by aweigold
    I have created a custom JiBX marshaller and verified it works. It works by doing something like the following: <binding xmlns:tns="http://foobar.com/foo" direction="output"> <namespace uri="http://foobar.com/foo" default="elements"/> <mapping class="java.util.HashMap" marshaller="com.foobar.Marshaller1"/> <mapping name="context" class="com.foobar.Context"> <structure field="configuration"/> </mapping> </binding> However I need to create multiple marshallers for different HashMaps. So I tried to reference it with abstract mapping like this: <binding xmlns:tns="http://foobar.com/foo" direction="output"> <namespace uri="http://foobar.com/foo" default="elements"/> <mapping abstract="true" type-name="configuration" class="java.util.HashMap" marshaller="com.foobar.Marshaller1"/> <mapping abstract="true" type-name="overrides" class="java.util.HashMap" marshaller="com.foobar.Marshaller2"/> <mapping name="context" class="com.foobar.Context"> <structure map-as="configuration" field="configuration"/> <structure map-as="overrides" field="overrides"/> </mapping> </binding> However when doing so, when I attempt to build the binding, I receive the following: Error during code generation for file "E:\project\src\main\jibx\foo.jibx" - this may be due to an error in your binding or classpath, or to an error in the JiBX code My guess is that either I'm missing something I need to implement to enable my custom marshaller for abstract mapping, or custom marshallers do not support abstract mapping. I have found the IAbstractMarshaller interface in the JiBX API (http://jibx.sourceforge.net/api/org/jibx/runtime/IAbstractMarshaller.html), however the documentation seems unclear to me on if this is what I need to implement, as well as how it works if so. I have not been able to find an implementation of this interface to work off of as an example. My question is, how do you do abstract mapping with custom marshallers (if it's possible)? If it is done via the IAbstractMarshaller interface, how does it work and/or how should I implement it?

    Read the article

  • Suppressing .net's updatepanel submit event handler

    - by wheresrhys
    I'm performing some custom js validation on my forms, triggered by submitting the form $("form").submit(function (e) { var validates = true; // validation code goes in here if (!validates) { e.preventDefault(); e.stopImmediatePropagation(); return false; } }) None of the lines I've included to stop the submit event prevent the .NET control posting back. Is there some way (using js or setting a property in the updatepanel control) of stopping post back?

    Read the article

  • SharePoint Navigation Custom Link Security Trimming

    - by ifunky
    Hi, We've got our navigation setup so that subsites show in the global navigation but we have a requirement to also put custom links to external sites which is straight forward. The tricky part is that some of the custom links need security trimming which you don't get when you add your own links to the navigation. Just wondering if anyone has got some ideas on how to work around this? Thanks Dan

    Read the article

  • Adding an existing site column to a custom list

    - by Graeme
    I think I'm going mad - this seemed like an easy thing to do but I can't find any info on it at all. I have created a Custom List and added 4 columns to it. Created By and Modified By are already in the list but hidden from the view. I want to add a Date Modified column (which is a built in field) to this Custom List. How do I do this programmatically?

    Read the article

  • Javascript tr click event with newly created rows

    - by yalechen
    I am very new to web development. I am currently using tablesorter jquery plugin to create a dynamic table, where the user can add and delete rows. I am having trouble with changing the background color of newly created rows upon clicking. It works fine with rows that are hard coded in html. Here is the relevant code: $(document).ready( function() { $('table.tablesorter td').click( function (event) { $(this).parent('tr').toggleClass('rowclick'); $(this).parent('tr').siblings().removeClass('rowclick'); }); } ) rowclick is a css class here: table.tablesorter tbody tr.rowclick td { background-color: #8dbdd8; } I have tried adding the following to my javascript function that adds a new row: var createClickHandler = function(newrow) { return function(event) { //alert(newrow.cells[0].childNodes[0].data); newrow.toggleClass('rowclick'); newrow.siblings().removeClass('rowclick'); }; } row.onclick = createClickHandler(row); The alert correctly displays the text in the first column of the row when I click the new row. However, my new rows do not respond to the css class. Anyone have any ideas? Thanks in advance.

    Read the article

  • Dojo Widget need event when everything is "ready"

    - by ArneRie
    Hi, i have an custom widget in dojo. My Problem is to check some kind of access rules wich are passed to the widget. if check the rules after the widget is fully loaded everything works fine. But i have to remove some text and buttons before it is displayed. I've tryted the startup, and postcreate hook (-: is there something like "aftercreate" ?

    Read the article

  • TextArea component is null on applicationComplete event

    - by Alan G.
    I have a weird issue (weird because it is specific to one component) with applicationComplete in a fairly simple application. All the UI components are declared in MXML. I can access them all in applicationComplete, but not a spark.components.TextArea component, named taStatus here; it is null in the handler. MXML looks sort of like this (there are lots of other components, but nothing special) <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="710" minHeight="640" applicationComplete="onApplicationComplete(event)" width="710" height="640"> <mx:TabNavigator left="15" right="15" top="15" bottom="340" paddingTop="0"> <s:NavigatorContent label="General" width="100%" height="100%"> <s:Label x="93" y="71" text="Label" id="lblTest"/> </s:NavigatorContent> <s:NavigatorContent label="Status" width="100%" height="100%"> <s:TextArea id="taStatus" width="100%" height="100%" text="Startup." editable="false"/> </s:NavigatorContent> </mx:TabNavigator> <fx:Script source="main.as" /> </s:Application> Here is the handler in main.as protected function onApplicationComplete(event: FlexEvent) : void { lblTest.text = 'abc789'; // OK taStatus.text = 'abc789'; // Fail } TypeError: Error #1009: Cannot access a property or method of a null object reference. So taStatus is null... What is so special about this TextArea?

    Read the article

  • Javascript onclick() event bubbling - working or not?

    - by user1071914
    I have a table in which the table row tag is decorated with an onclick() handler. If the row is clicked anywhere, it will load another page. In one of the elements on the row, is an anchor tag which also leads to another page. The desired behavior is that if they click on the link, "delete.html" is loaded. If they click anywhere else in the row, "edit.html" is loaded. The problem is that sometimes (according to users) both the link and the onclick() are fired at once, leading to a problem in the back end code. They swear they are not double-clicking. I don't know enough about Javascript event bubbling, handling and whatever to even know where to start with this bizarre problem, so I'm asking for help. Here's a fragment of the rendered page, showing the row with the embedded link and associated script tag. Any suggestions are welcomed: <tr id="tableRow_3339_0" class="odd"> <td class="l"></td> <td>PENDING</td> <td>Yabba Dabba Doo</td> <td>Fred Flintstone</td> <td> <a href="/delete.html?requestId=3339"> <div class="deleteButtonIcon"></div> </a> </td> <td class="r"></td> </tr> <script type="text/javascript">document.getElementById("tableRow_3339_0").onclick = function(event) { window.location = '//edit.html?requestId=3339'; };</script>

    Read the article

  • Can I delay the keyup event for jquery?

    - by Paul
    I'm using the rottentomatoes movie API in conjunction with twitter's typeahead plugin using bootstrap 2.0. I've been able to integerate the API but the issue I'm having is that after every keyup event the API gets called. This is all fine and dandy but I would rather make the call after a small pause allowing the user to type in several characters first. Here is my current code that calls the API after a keyup event: var autocomplete = $('#searchinput').typeahead() .on('keyup', function(ev){ ev.stopPropagation(); ev.preventDefault(); //filter out up/down, tab, enter, and escape keys if( $.inArray(ev.keyCode,[40,38,9,13,27]) === -1 ){ var self = $(this); //set typeahead source to empty self.data('typeahead').source = []; //active used so we aren't triggering duplicate keyup events if( !self.data('active') && self.val().length > 0){ self.data('active', true); //Do data request. Insert your own API logic here. $.getJSON("http://api.rottentomatoes.com/api/public/v1.0/movies.json?callback=?&apikey=MY_API_KEY&page_limit=5",{ q: encodeURI($(this).val()) }, function(data) { //set this to true when your callback executes self.data('active',true); //Filter out your own parameters. Populate them into an array, since this is what typeahead's source requires var arr = [], i=0; var movies = data.movies; $.each(movies, function(index, movie) { arr[i] = movie.title i++; }); //set your results into the typehead's source self.data('typeahead').source = arr; //trigger keyup on the typeahead to make it search self.trigger('keyup'); //All done, set to false to prepare for the next remote query. self.data('active', false); }); } } }); Is it possible to set a small delay and avoid calling the API after every keyup?

    Read the article

  • Jquery toggle event is messing with checkbox value

    - by John McCollum
    Hi all, I'm using Jquery's toggle event to do some stuff when a user clicks a checkbox, like this: $('input#myId').toggle( function(){ //do stuff }, function(){ //do other stuff } ); The problem is that the checkbox isn't being ticked when I click on the checkbox. (All the stuff I've put into the toggle event is working properly.) I've tried the following: $('input#myId').attr('checked', 'checked'); and $(this).attr('checked', 'checked'); and even simply return true; But nothing is working. Can anyone tell me where I'm going wrong? Edit - thanks to all who replied. Dreas' answer very nearly worked for me, except for the part that checked the attribute. This works perfectly (although it's a bit hacky) $('input#myInput').change(function () { if(!$(this).hasClass("checked")) { //do stuff if the checkbox isn't checked $(this).addClass("checked"); return; } //do stuff if the checkbox isn't checked $(this).removeClass('checked'); }); Thanks again to all who replied.

    Read the article

  • Custom action getting published multiple times on user's timeline for same object

    - by serpent403
    I just noticed that when I publish an action on the user's timeline for the same object multiple times, using facebook's 'built-in' action type (eg: 'read' an article), i get an error response, something like "action is already associated to the user on this object". But when i try to do the same for a custom action that i created(eg: 'agreed' with an article), I don't get any error message, instead the actions gets published multiple times. I want my custom action to behave just like facebook's default action-type.

    Read the article

  • OnConnect event not firing when using TClientSocket inside a TThread on non-blocking mode

    - by mathematician1975
    I am trying to make use of Borlands TClientSocket component in non-blocking mode inside a multithreaded C++ Windows application. I am creating multiple threads (classes derived from TThread), each of which creates its own TClientSocket object. I then assign member functions of the thread class to act as event handlers for the OnConnect, OnDisconnect and OnSocketError events of the socket. The problem I am having here is that whenever I call the TClientSocket::Open() function from within the TThread::Execute() function, the OnConnect event never fires. However, When I call the Open() function from the VCL thread prior to the TThread::Execute() function getting called, all of the events fire and I can use the thread-socket combination as I would like. Now I have not read anything in documentation that says that TClientSocket should not be used in non-blocking mode when used inside a thread, but it appears to me that there is perhaps something wrong conceptually in the way I am trying to use this class. Borland documentation is quite poor on the subject and these components have now been deprecated so reliable information is hard to come by. Despite being deprecated I have to use them as there is no alternative in the Builder 6 package I have. Can anyone please advise me if there is a right/wrong way to use TThread and a non-blocking TClientSocket in combination. I have never had problems using it as part of the VCL thread and never had problems using TServerSocket before and I really cannot understand why some events are not firing.

    Read the article

  • How to Detect an Event Coming from the Firefox History Dropdown Box

    - by banterCZ
    How to detect an event coming from the Firefox history dropdown box? I need to distinguish between the enter key simply pressed on input field or on item from his native history dropdown box. The reason is that I would like to call custom submit button (not first one, which is default) on the enter key pressed on any input field. But right now, the enter key pressed on history dropdown box unfortunately call submit as well.

    Read the article

  • NHibernate - using custom sql query for a column

    - by stacker
    Is there anyway to use custom sql with NHibernate? I want to use custom sql for a specific column. select id, viewsCount, commentsCount, 0.2 * viewsCount / (select top 1 viewsCount from articles where isActive = 1 order by viewsCount DESC) as priorityViews, 0.8 * commentsCount / (select top 1 commentsCount from articles where isActive = 1 order by commentsCount DESC) as priorityComments, round(0.2 * viewsCount / (select top 1 viewsCount from articles where isActive = 1 order by viewsCount DESC) + 0.8 * commentsCount / (select top 1 commentsCount from articles where isActive = 1 order by commentsCount DESC), 1) as priority from articles

    Read the article

  • jquery event listening, non-standard events

    - by Stacey
    I'm attempting to build a way for my selectors to 'listen' to 'global' events that are beyond the typical 'click' 'change' 'submit' etc. I've explored the various 'eventmanagers' that I could find, and they're all still designed for forms. Is there any way to do something like this for non-standard (i.e. custom) events? The goal is to have selectors subscribe to an event, and then be able to trigger it in one place and it will raise it for everything subscribed to it.

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >