Search Results

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

Page 99/1134 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • jQuery dont see onclick event on link inside infowindow in google maps v3

    - by Charles
    i have such problem that jQuery onclick event dont see click on link inside google map in infowindow. Thats how my infowindow link looks like: <a href="http://example.com/#ui-accordion-accordion-header-7" class="pull-right move-to-acc" id="itemH">See Details</a> Under map i have acordion list with detailed information about point so im trying to catch click on that link : jQuery("#itemH").click(function(event){ alert("qq"); }); When i click on marker infowindow open and i click on link but alert dont show up - im just moved to div #ui-accordion-accordion-header-7 What im doing wrong ? Thx for help

    Read the article

  • Objective C - Custom Getter with inheritance

    - by anhdat
    Recently I have worked with Core Data. When I want to set a default value for some fields, I came up with this problem: So I made a simple represent: We have 2 class Parent and Child, in which Child inherit from Parent. // Parent.h @interface Parent : NSObject @property (strong, nonatomic) NSString *lastName; // Child.h @interface Child : Parent In Parent class, I made a custom getter to set a default value when nothing is set: // Parent.h - (NSString *)lastName { if (_lastName) { return _lastName; } else { return @"Parent Default Name"; } } But I cannot make a custom default value for the field "name" which Child inherits from its Parent. // Child.h @implementation Child - (NSString *)lastname { if (super.lastName) { return super.lastName; } else { return @"Child Default Name"; } } Apparently, this method is never called. So my question here is: How can I set a custom getter for the field the Child class inherits from Parent without define an overriding property?

    Read the article

  • How to decide between a method or event?

    - by Wil
    I read something ages ago I think by Jon Skeet (which I can't find now) saying that in IL, all events get converted to methods... it was before I understood C# and did not understand it all, but if that is (or even if it isn't) the gist of it.... In a purely hypothetical situation, I was wondering if someone could explain or point me to a resource that says when to use an event over a method? Basically, If I want to have a big red/green status picture which is linked to a Bool field, and I wanted to change it based on the value of the bool, should I: a) Have a method called Changepicture which is linked to the field and changes the state of the bool and the picture. b) Have a get/set part to the field and stick an event in the set part. c) Have a get/set part to the field and stick a method in the set part. d) Other?

    Read the article

  • Event(s) for opening the workbook AND worksheets

    - by KeyMs92
    I'm looking for an elegant solution to trigger an event for opening the workbook as well as opening different worksheets. I don't need seperate operations for each worksheet: they all trigger the same method. I know I can use the events Workbook_Activate / Workbook_Open and Workbook_SheetActivate at the same time but I don't know if this is 'the official way' to do it. Perhaps there's a way to do this with one event. I was also wondering if it is relevant in this matter where I put the code. I now have all the code inside "ThisWorkbook" and not in a "Module"...

    Read the article

  • JButtons don't imediatly change on mouse event

    - by out_sider
    I'm using the java swing library to develop a board game called DAO. The problem is that after the human player makes its move, by clicking on the JButton with the piece image that he wants to play, I call the computer AI routine but inside the mouse event function. By doing this only when the function returns, the computer ends its turn, do the JButtons refresh their Images (setIcon comes in). I'd like to know how can I force the JButtons to change their image at the moment they are clicked and not only when the mouse event function ends (as I need to handle data inside it). I've tried all of this myButtons[i][j].setIcon(xIcon); myButtons[i][j].revalidate(); myButtons[i][j].repaint(); myButtons[i][j].validate(); None worked. Thx in advance

    Read the article

  • How To Draw line on touch event ?

    - by AJPatel
    Hey i m beginner of objective C Please Help me i make following code but not work..... -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch view] == self.view) { CGPoint location = [touch locationInView:self.view]; loc1 = location; CGContextMoveToPoint(context, location.x, location.y); NSLog(@"x:%d y:%d At Touch Begain", loc1.x, loc1.y); } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch view] == self.view) { CGPoint location = [touch locationInView:self.view]; CGContextMoveToPoint(context, loc1.x, loc1.y); NSLog(@"x:%d y:%d At Touch Move", loc1.x, loc1.y); CGContextAddLineToPoint(context, location.x, location.y); NSLog(@"x:%d y:%d", location.x, location.y); } }

    Read the article

  • Having an issue wit mouseup event

    - by user3680715
    Hello everyone I have this code working fine but I want the script to stop on the mouse up event. Here is an example of what I have now. How can I stop the script on mouse up event so that it looks like it only shows the coordinates when dragging over the image. Thank you! http://jsfiddle.net/Hc7x4/20/ $(document).ready(function () { $("#map-catcher").mousedown(function (e) { $("#map-catcher").mousemove(function (e) { $("#coord").text("x:"+e.offsetX+", y:"+e.offsetY); return; }); $("#map-catcher").mouseup(function (e) { return; }); }); });

    Read the article

  • Programmatically adding event handler to array of radio buttons

    - by gSaenz
    Trying to add event handlers to radio buttons that are created on user input, looking at this and this as examples. However I get an error that answerOptions is not an event. Create the radio buttons Private answerOptions(n) As RadioButton ... Private Sub showQuestion(n As Integer) For i = 0 To answerOptions.Length - 1 answerOptions(i) = New RadioButton AddHandler answerOptions, AddressOf Me.Radios_Click With answerOptions(i) ' --------- SET TEXT, LOCATION ETC. End With Me.Controls.Add(answerOptions(i)) Next End Sub Planning on then handling events with Private Sub Radios_Click(sender As Object, e As EventArgs) Handles answerOptions.checked End Sub I want things to happen when the radios are checked. Don't want to use checkboxes as I want to limit one selection at a time.

    Read the article

  • How to use LoadingRowGroup in SilverLight DataGrid

    - by nandrew
    Hello, I want to use LoadingRowGroup event in SilverLight DataGrid to display a group summary. I have an event: void dataGrid1_LoadingRowGroup(object sender, DataGridRowGroupHeaderEventArgs e) { // e.RowGroupHeader } but I don't know how to use e.RowGroupHeader to set group header value. Maybe I should use e.RowGroupHeader.Template, but I don't know how to set a template by code.

    Read the article

  • How to track Google Analytics Events in Server Side asp.net?

    - by Raj
    Hello, Is there a way to track Google Analytics Events from Server Side in ASP.NET, the requirement is the the Event should be tracked on button click after some functionalities are executed on Serverside. ? OnClientClick of button, we cannot fulfill this requirement completely as some time serverside functionalities can fail but the event will get tracked in Google? Please help me in this regard. Appreciate expert answers. Thanks in Advance, Raj

    Read the article

  • Add objects to association in OnPreInsert, OnPreUpdate

    - by Dmitriy Nagirnyak
    Hi, I have an event listener (for Audit Logs) which needs to append audit log entries to the association of the object: public Company : IAuditable { // Other stuff removed for bravety IAuditLog IAuditable.CreateEntry() { var entry = new CompanyAudit(); this.auditLogs.Add(entry); return entry; } public virtual IEnumerable<CompanyAudit> AuditLogs { get { return this.auditLogs } } } The AuditLogs collection is mapped with cascading: public class CompanyMap : ClassMap<Company> { public CompanyMap() { // Id and others removed fro bravety HasMany(x => x.AuditLogs).AsSet() .LazyLoad() .Access.ReadOnlyPropertyThroughCamelCaseField() .Cascade.All(); } } And the listener just asks the auditable object to create log entries so it can update them: internal class AuditEventListener : IPreInsertEventListener, IPreUpdateEventListener { public bool OnPreUpdate(PreUpdateEvent ev) { var audit = ev.Entity as IAuditable; if (audit == null) return false; Log(audit); return false; } public bool OnPreInsert(PreInsertEvent ev) { var audit = ev.Entity as IAuditable; if (audit == null) return false; Log(audit); return false; } private static void LogProperty(IAuditable auditable) { var entry = auditable.CreateAuditEntry(); entry.CreatedAt = DateTime.Now; entry.Who = GetCurrentUser(); // Might potentially execute a query. // Also other information is set for entry here } } The problem with it though is that it throws TransientObjectException when commiting the transaction: NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: CompanyAudit, Entity: CompanyAudit at NHibernate.Engine.ForeignKeys.GetEntityIdentifierIfNotUnsaved(String entityName, Object entity, ISessionImplementor session) at NHibernate.Type.EntityType.GetIdentifier(Object value, ISessionImplementor session) at NHibernate.Type.ManyToOneType.NullSafeSet(IDbCommand st, Object value, Int32 index, Boolean[] settable, ISessionImplementor session) at NHibernate.Persister.Collection.AbstractCollectionPersister.WriteElement(IDbCommand st, Object elt, Int32 i, ISessionImplementor session) at NHibernate.Persister.Collection.AbstractCollectionPersister.PerformInsert(Object ownerId, IPersistentCollection collection, IExpectation expectation, Object entry, Int32 index, Boolean useBatch, Boolean callable, ISessionImplementor session) at NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session) at NHibernate.Action.CollectionRecreateAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) at NHibernate.Engine.ActionQueue.ExecuteActions() at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) at NHibernate.Impl.SessionImpl.Flush() at NHibernate.Transaction.AdoTransaction.Commit() As the cascading is set to All I expected NH to handle this. I also tried to modify the collection using state but pretty much the same happens. So the question is what is the last chance to modify object's associations before it gets saved? Thanks, Dmitriy.

    Read the article

  • How to add objects to association in OnPreInsert, OnPreUpdate

    - by Dmitriy Nagirnyak
    Hi, I have an event listener (for Audit Logs) which needs to append audit log entries to the association of the object: public Company : IAuditable { // Other stuff removed for bravety IAuditLog IAuditable.CreateEntry() { var entry = new CompanyAudit(); this.auditLogs.Add(entry); return entry; } public virtual IEnumerable<CompanyAudit> AuditLogs { get { return this.auditLogs } } } The AuditLogs collection is mapped with cascading: public class CompanyMap : ClassMap<Company> { public CompanyMap() { // Id and others removed fro bravety HasMany(x => x.AuditLogs).AsSet() .LazyLoad() .Access.ReadOnlyPropertyThroughCamelCaseField() .Cascade.All(); } } And the listener just asks the auditable object to create log entries so it can update them: internal class AuditEventListener : IPreInsertEventListener, IPreUpdateEventListener { public bool OnPreUpdate(PreUpdateEvent ev) { var audit = ev.Entity as IAuditable; if (audit == null) return false; Log(audit); return false; } public bool OnPreInsert(PreInsertEvent ev) { var audit = ev.Entity as IAuditable; if (audit == null) return false; Log(audit); return false; } private static void LogProperty(IAuditable auditable) { var entry = auditable.CreateAuditEntry(); entry.CreatedAt = DateTime.Now; entry.Who = GetCurrentUser(); // Might potentially execute a query. // Also other information is set for entry here } } The problem with it though is that it throws TransientObjectException when commiting the transaction: NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: PropConnect.Model.UserAuditLog, Entity: PropConnect.Model.UserAuditLog at NHibernate.Engine.ForeignKeys.GetEntityIdentifierIfNotUnsaved(String entityName, Object entity, ISessionImplementor session) at NHibernate.Type.EntityType.GetIdentifier(Object value, ISessionImplementor session) at NHibernate.Type.ManyToOneType.NullSafeSet(IDbCommand st, Object value, Int32 index, Boolean[] settable, ISessionImplementor session) at NHibernate.Persister.Collection.AbstractCollectionPersister.WriteElement(IDbCommand st, Object elt, Int32 i, ISessionImplementor session) at NHibernate.Persister.Collection.AbstractCollectionPersister.PerformInsert(Object ownerId, IPersistentCollection collection, IExpectation expectation, Object entry, Int32 index, Boolean useBatch, Boolean callable, ISessionImplementor session) at NHibernate.Persister.Collection.AbstractCollectionPersister.Recreate(IPersistentCollection collection, Object id, ISessionImplementor session) at NHibernate.Action.CollectionRecreateAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) at NHibernate.Engine.ActionQueue.ExecuteActions() at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) at NHibernate.Impl.SessionImpl.Flush() at NHibernate.Transaction.AdoTransaction.Commit() As the cascading is set to All I expected NH to handle this. I also tried to modify the collection using state but pretty much the same happens. So the question is what is the last chance to modify object's associations before it gets saved? Thanks, Dmitriy.

    Read the article

  • ASP.NET- forcing child/container events to fire before parent onload?

    - by Hans Gruber
    I'm working on a questionnaire type application in which questions are stored in a database. Therefore, I create my controls dynamically on every Page.OnLoad. This works like a charm and ViewState is persisted between postbacks because I ensure that my dynamic controls always have the same generated Control.ID. In addition to the user control that dynamically populates the questions, my questionnaire page also contains a 'Status' section (also encapsulated by a user control) which represents the status of the questionnaire (choices are 'Complete', 'Started' or 'In Progress'). If the user changes the status of questionnaire (i.e. from 'In Progress' to 'Complete'), I need to postback to the server because the contents of the dynamic portion of the questionnaire depend on the selected status. Some questions are always present regardless of status, and yet others may not be present at all for the selected status. The point is, when the status changes, I have to postback to the page and render the right set of questions. Additionally, I need to preserve any user entered values for those questions which are 'always available'. However, due to the page life cycle in ASP.NET, the 'Status' user control's OnLoad, which contains the correct status needed to load the right questions from the DB, doesn't get executed until after the 'dynamic questions' user control has already been populated (with the wrong/stale values). To get around this, I raise an event from my 'Status' user control to the main page to indicate that the Status has changed. The main page then raises an event on the 'dynamic questions' user control. Since by the time this event bubbles up, the 'dynamic questions' user control has already loaded the 'wrong' questions from the DB, it first calls Controls.Clear. It then happily uses the new status to query the database for the 'correct' questions and does a Control.Add() on each. FYI, Control.IDs are consistent across postbacks. This solution works...sorta. The correct set of questions for the selected status do get rendered; however ViewState is getting lost for those 'always available' questions. I'm guessing this is because the 'dynamic questions' user control calls Controls.Clear when responding to the status changed event. This must somehow kill the association between ViewState and my dynamic controls, even though the Control.ID are consistent. This seems like such a common requirement, I'm virtually certain there is a better, cleaner and less error prone approach to accomplish this. In case its not plain obvious, I haven't been able to grok the ASP.NET page life-cycle despite working with it for the last year. Any help is much appreciated!

    Read the article

  • onscroll for div

    - by The Machine
    Does a div element not have , an onscroll event handler ? The behaviour on my page, doesn't seem to indicate the div onscroll eventHandler is recognized. <div id='bd' onscroll='alert('Scroll Called');'></div>. Also, Do div scroll events roll up to window scroll events, as per DOM event bubbling ?

    Read the article

  • Determine Mouse Button Switch State

    - by VoiDeD
    Hello, I'm trying to determine the host operating system's settings regarding mouse button switch state to properly handle a context menu event. I want to determine whether or not the operating system my application is running on has switched the left and right mouse buttons, and handle the mouse click event accordingly. What would be the best way to determine that in C#? Thanks!

    Read the article

  • Creating a custom ubuntu ISO

    - by ajstack
    Hi, I want to create a custom ubuntu ISO (This ISO will contain all the packages with the latest updates released till date). Something along the lines of Take the pristine ubuntu ISO Download the updates from some ubuntu update repositories Re-create the ISO? How should I go about this?

    Read the article

  • How to setup custom subdomain with Posterous blog

    - by Tahir Akram
    Hi; I want to setup my custom subdomain with my posterous blog: tahirakram.posterous.com. I am confused over setting up A record and CNAME. Do I need to set A record and CNAME both to run my posterous to this URL: blog.tahirakram.com? So far I set up CNAME Name: blog.tahirakram.com Value: posterous.com Should I set A recrod name value too? (if yes, as following) Host Name: blog.tahirakram.com Destination IPv4 Address: 67.207.139.81 Instruction given by posterous

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >