Search Results

Search found 10381 results on 416 pages for 'delegate and events'.

Page 72/416 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Spaces and backslashes in Visual Studio build events

    - by gencha
    I have an application that is supposed to aid my project in terms of pre- and post-build event handling. I'm using ndesk.options for command line argument parsing. Which gave me weird results when my project path contains spaces. I thought this was the fault of ndesk.options but I guess my own application is to blame. I call my application as a post-built event like so: build.exe --in="$(ProjectDir)" --out="c:\out\" A simple foreach over args[] displays the following: --in=c:\my project" --out=c:\out" What happened is that the last " in each parameter was treated as if it was escaped. Thus the trailing backslash was removed. And the whole thing is treated as a single argument. Now I thought I was being smart by simply escaping the first " as well, like so: build.exe --in=\"$(ProjectDir)" --out=\"c:\out\" In that case the resulting args[] look like this: --path="c:\my project" --out="c:\out" The trailing backslash in the parameters is still swallowed and the first parameter is now split up. Passing this args[] to ndesk.options will then yield wrong results. How should the right command line look so that the correct elements end up in the correct args[] slots? Alternatively, how is one supposed to parse command line arguments like these with or without ndesk.options? Any suggestion is welcome. Thanks in advance

    Read the article

  • Silverlight Control Disable/Remove Events

    - by Dave
    I have a scenario where a control has an event wired up in XAML, say a Button.Click. Somewhere else in my code, a security check is applied which mean I need to disable said event, but I do not have access to the normal -= syntax to remove it. How else can I remove or disable this event? Thanks, Dave

    Read the article

  • Android SDK - Animation prevents further events on View like OnClick()

    - by Ron
    I have an ImageView which is animated via startAnimation() to slide it into the screen. It is visible and enabled in the XML. When I add a Handler for a delay or an onClick event, nothing happens. When I remove the startAnimation() everything works fine. Except the animation of course. Heres my code: balloon.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { view.setVisibility(View.GONE); } }); Animation dropDown = AnimationUtils.loadAnimation(context, R.anim.balloon_slide_down); dropDown.setStartOffset(1500); balloon.startAnimation(dropDown); Any ideas why that is? I'm quite frustrated by now... Thanks, Ron

    Read the article

  • Flex remoting and progress events?

    - by Cambiata
    Is there a way to monitor the loading progress (percent progress bar style) when using Flex remoting? I'm trying out Flash Builder 4 with it's new data services features, but I can't find any pgrogress event stuff somewhere. This article by Robert Taylor http://www.roboncode.com/articles/144 indicates that it might not be possible...

    Read the article

  • Getting Custom NSCell with NSButtonCell instance to handle mouse click/mouse events

    - by sidha
    OK I'm really stumped on this one. I want to make a checkbox with a NSTextFieldCell combined together. It's important that the checkbox goes ON if the mouse hits the box, NOT the text. I've accomplished this, more or less, but the issue is receiving the mouse event because I click one checkbox in a row, but ALL of them turn to NSOnState. I will show what I've done and my various failed attempts in order to get this to work. So this is how I've done it so far: header: @interface MyCheckboxCellToo : NSTextFieldCell { NSButtonCell *_checkboxCell; } implementation: - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView { NSPoint point = [controlView convertPoint:[event locationInWindow] fromView:nil]; NSLog(@"%@", NSStringFromPoint(point)); NSRect checkFrame; NSDivideRect(cellFrame, &checkFrame, &cellFrame, cellFrame.size.height/*3 + [[_checkboxCell image] size].width*/, NSMinXEdge); if (NSMouseInRect(point, checkFrame, [controlView isFlipped])) { // the checkbox, or the small region around it, was hit. so let's flip the state NSCellStateValue checkState = ([_checkboxCell state] == NSOnState) ? NSOffState:NSOnState; [self setState:checkState]; [_checkboxCell setState:checkState]; [controlView setNeedsDisplay:YES]; return NSCellHitTrackableArea; } return [super hitTestForEvent:event inRect:cellFrame ofView:controlView]; } I know I probably shouldn't be doing: [self setState:checkState]; [_checkboxCell setState:checkState]; [controlView setNeedsDisplay:YES]; in there... because the result is that EVERY checkbox in every goes to NSOnState. Is this because cells are re-used? How come the ImageAndTextCell can have different images in the same tableview? How do I handle the mouse event? I have tried: - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp { NSLog(@"%s %@", _cmd, theEvent); return [_checkboxCell trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:untilMouseUp]; // return YES; // return [super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:untilMouseUp]; } - (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView { NSLog(@"%s %@", _cmd, NSStringFromPoint(startPoint)); return [super startTrackingAt:startPoint inView:controlView]; } - (BOOL)continueTracking:(NSPoint)lastPoint at:(NSPoint)currentPoint inView:(NSView *)controlView { NSLog(@"%s %@", _cmd, NSStringFromPoint(currentPoint)); return [super continueTracking:lastPoint at:currentPoint inView:controlView]; } - (void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint inView:(NSView *)controlView mouseIsUp:(BOOL)flag { NSLog(@"%s %d %@", _cmd, flag, NSStringFromPoint(stopPoint)); } trackMouse: ... DOES gets called but startTrackingAt:..., continueTracking:..., and stopTracking:.... DO NOT get called when I click on the checkbox "hit area" in trackMouse:... I have tried return [_checkboxCell trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:untilMouseUp]; and return [super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:untilMouseUp]; and neither seems to result in the mouse event being handled by the checkbox. How do I get that single checkbox to go NSOnState? I know I'm pretty close but after a lot of doc reading and google searching I haven't been successful at solving this. suggestions and comments welcome.. OK here is a bit more to show creation and destruction of the object.. - (id)init { if ((self = [super init])) { _checkboxCell = [[NSButtonCell alloc] init]; [_checkboxCell setButtonType:NSSwitchButton]; [_checkboxCell setTitle:@""]; [_checkboxCell setTarget:self]; [_checkboxCell setImagePosition:NSImageLeft]; [_checkboxCell setControlSize:NSRegularControlSize]; } return self; } - copyWithZone:(NSZone *)zone { MyCheckboxCellToo *cell = (MyCheckboxCellToo *)[super copyWithZone:zone]; cell->_checkboxCell = [_checkboxCell copyWithZone:zone]; return cell; } - (void)dealloc { [_checkboxCell release]; [super dealloc]; }

    Read the article

  • DataGridView CheckBox events

    - by Kevin
    I'm making a DataGridView with a series of Checkboxes in it with the same labels horizontally and vertically. Any labels that are the same, the checkboxes will be inactive, and I only want one of the two "checks" for each combination to be valid. The following screenshot shows what I have: Anything that's checked on the lower half, I want UN-checked on the upper. So if [quux, spam] (or [7, 8] for zero-based co-ordinates) is checked, I want [spam, quux] ([8, 7]) un-checked. What I have so far is the following: dgvSysGrid.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; dgvSysGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; string[] allsysNames = { "heya", "there", "lots", "of", "names", "foo", "bar", "quux", "spam", "eggs", "bacon" }; // Add a column for each entry, and a row for each entry, and mark the "diagonals" as readonly for (int i = 0; i < allsysNames.Length; i++) { dgvSysGrid.Columns.Add(new DataGridViewCheckBoxColumn(false)); dgvSysGrid.Columns[i].HeaderText = allsysNames[i]; dgvSysGrid.Rows.Add(); dgvSysGrid.Rows[i].HeaderCell.Value = allsysNames[i]; // Mark all of the "diagonals" as unable to change DataGridViewCell curDiagonal = dgvSysGrid[i, i]; curDiagonal.ReadOnly = true; curDiagonal.Style.BackColor = Color.Black; curDiagonal.Style.ForeColor = Color.Black; } // Hook up the event handler so that we can change the "corresponding" checkboxes as needed //dgvSysGrid.CurrentCellDirtyStateChanged += new EventHandler(dgvSysGrid_CurrentCellDirtyStateChanged); dgvSysGrid.CellValueChanged += new DataGridViewCellEventHandler(dgvSysGrid_CellValueChanged); } void dgvSysGrid_CellValueChanged(object sender, DataGridViewCellEventArgs e) { Point cur = new Point(e.ColumnIndex, e.RowIndex); // Change the diagonal checkbox to the opposite state DataGridViewCheckBoxCell curCell = (DataGridViewCheckBoxCell)dgvSysGrid[cur.X, cur.Y]; DataGridViewCheckBoxCell diagCell = (DataGridViewCheckBoxCell)dgvSysGrid[cur.Y, cur.X]; if ((bool)(curCell.Value) == true) { diagCell.Value = false; } else { diagCell.Value = true; } } /// <summary> /// Change the corresponding checkbox to the opposite state of the current one /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void dgvSysGrid_CurrentCellDirtyStateChanged(object sender, EventArgs e) { Point cur = dgvSysGrid.CurrentCellAddress; // Change the diagonal checkbox to the opposite state DataGridViewCheckBoxCell curCell = (DataGridViewCheckBoxCell)dgvSysGrid[cur.X, cur.Y]; DataGridViewCheckBoxCell diagCell = (DataGridViewCheckBoxCell)dgvSysGrid[cur.Y, cur.X]; if ((bool)(curCell.Value) == true) { diagCell.Value = false; } else { diagCell.Value = true; } } The problem comes is that the cell value changed always seems to be "one behind" where you actually click if I use the CellValueChanged event, and I'm not sure how to get the current cell if I'm in the "dirty" state as curCell comes in as a null (suggesting the current cell address is wrong somehow, but I didn't try and get that value out) meaning that path isn't working at all. Basically, how do I get the "right" address with the right boolean value so that my flipping algorithm will work?

    Read the article

  • Does UIWebView support javascript-based double-click events?

    - by Eric
    As usual, I'm trying to do something the easiest way possible, in this case implement a double-tap handler on a UIWebView like so: <div id="foo" ondblclick="clickHandler(this);" ... > It works fine in Safari and Firefox, and I know the code containing clickHandler is loading on the iPhone thanks to a now-annoying alert stmt at the end of loading. If I change ondblclick to onclick it works on both the device and the simulator. From reading similar queries it would seem that I need to intercept the taps in ... and then run my JavaScript code with the stringByEvaluatingJavaScriptFromString method, but then how do I know the JS id of the target? I no like that, would rather write a pure HTML/DOM/JS solution. Or since my app is about 80% web content, should I be using phonegap instead?

    Read the article

  • .NET/C#: How to remove/minimize code clutter while 'triggering' Events

    - by eibhrum
    Hi, I just wanna find out if there's a way I could minimize code clutter in my application. I have written code/s similar to this: private void btnNext_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnNext.Opacity = 1; } private void btnNext_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnNext.Opacity = 0.5; } private void btnShowAll_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnShowAll.Opacity = 1; } private void btnShowAll_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnShowAll.Opacity = 0.5; } private void btnPrev_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnPrev.Opacity = 1; } private void btnPrev_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnPrev.Opacity = 0.5; } private void btnSearch_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnSearch.Opacity = 1; } private void btnSearch_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnSearch.Opacity = 0.5; } private void btnSearchStore_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnSearchStore.Opacity = 1; } private void btnSearchStore_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnSearchStore.Opacity = 0.5; } private void btnCloseSearch_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnCloseSearch.Opacity = 1; } private void btnCloseSearch_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnCloseSearch.Opacity = 0.5; } private void btnHome_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnHome.Opacity = 1; } private void btnHome_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnHome.Opacity = 0.5; } and so on and so forth... Do I need to create a 'function' that will run initially? Or do I have to create another class just so I can 'organize' them? Any suggestions?

    Read the article

  • Receiving DB update events in .NET from SQLite

    - by Dan Tao
    I've recently discovered the awesomeness of SQLite, specifically the .NET wrapper for SQLite at http://sqlite.phxsoftware.com/. Now, suppose I'm developing software that will be running on multiple machines on the same network. Nothing crazy, probably only 5 or 6 machines. And each of these instances of the software will be accessing an SQLite database stored in a file in a shared directory (is this a bad idea? If so, tell me!). Is there a way for each instance of the app to be notifiied if one instance updates the database file? One obvious way would be to use the FileSystemWatcher class, read the entire database into a DataSet, and then ... you know ... enumerate through the entire thing to see what's new ... but yeah, that seems pretty idiotic, actually. Is there such a thing as a provider of SQLite updates? Does this even make sense as a question? I'm also pretty much a newbie when it comes to ADO.NET, so I might be approaching the problem from the entirely wrong angle.

    Read the article

  • wxPython: Sending a signal to several widgets

    - by cool-RR
    I am not even sure how to ask this question. I want something that is like the wxPython event system, but a bit different. I'll try to explain. When there is a certain change in my program (a "tree change", never mind what that is,) I want to send a signal to all the widgets in my program, notifying them that a "tree change" has occurred, and they should change their display in response. How do I do this? It sounds a little bit like wxPython events, but not really, since events don't spread to all widgets, as far as I know. What would be a good way to do this?

    Read the article

  • Actionscript 2.0 mx.managers.CreatePopUp dialog triggers onRollOver for events underneath it

    - by user317112
    All, On the main stage I have a button that is highlighted on rollover. I am using mx.managers.CreatePopUp to create a dialog box that pops up and takes user information. When the dialog box appears above the button, mousing over the dialog box triggers the highlight for the button beneath it. Can you provide some suggestions as to what the issue might be caused by? (I am fairly new to Flash so any suggestions would be helpful. Just looking for things to experiment with to get the correct behavior.) Other info that might be helpful: I've noticed that when I create a modal version of the dialog box, this behavior does not occur. Dismissing the modal dialog disables the entire stage. Fixing this issue would also solve my problem, but I've been unsuccessful thus far. Thanks in advance.

    Read the article

  • raising custom events to allow web user controls to intercommunicate

    - by HeoQue
    Hey , I have 2 web user controls, both inherit the same base class which extends UserControl. I want to raise an event on one and the other should be aware of it. both are on the same page however the 2nd control never handles the custom event i raised on the 1st one ! any ideas ? please just point to an implementation of possible (BTW, i'm googling it since morning but no luck !)

    Read the article

  • Uibutton events

    - by Raju
    //My Button code --------------------------------------------------------------------------------------------------- UIButton *ticketButtonObj=[[ticketButton alloc]initWithFrame:CGRectMake(0.0f, 115.0f, 500.0f, 40.0f) ; int col=10; [ticketButtonObj addTarget:self action:@selector(ShowNumber:) forControlEvents:UIControlEventTouchUpInside]; [self.window addSubview:ticketButtonObj]; -(void) ShowNumber:(id)sender{ // here i want to get the Value of Col } in the above code when i pressed the button.. i want print the value of col variable in ShowNumber method .. how it is ? pls Help me ... thanks and regards... by raju

    Read the article

  • Problem with StandardOutput stream in async mode.

    - by JF
    Hi everyone. I have a program that launches command line processes in async mode, using BeginOutputReadLine. My problem is that the .Exited event is triggered when there is still some .OutputDataReceived events being triggered. What I do in my .Exited event must happen only once all my .OutputDataReceived events are done, or I'll be missing some output. I looked in the Process class to see if anything could be useful to me, as to wait for the stream to be empty, but all I find is for sync mode only. Can any of you help? Thanx.

    Read the article

  • How does rolling back an application level transaction interact with SqlDataAdapter events in ADO.NE

    - by ilasno
    When utilizing the RowUpdated event in the SqlAdapter class, i'm assuming that it is raised directly following the return of the database interaction that executes the update. If that update is part of an application level transaction (utilizing the SqlTransaction class) which is then rolled back, does this affect or interact at all with the RowUpdated event? Or is the RowUpdated event not raised until after the transaction is committed (this seems unlikely, but i couldn't find documentation)? If RowUpdated has already been raised, and then the transaction is rolled back, any good ideas on how to adjust something that may have been done in RowUpdated that should then, also be rolled back?

    Read the article

  • onclick event from XML Nodes

    - by user256007
    My Documents are a mixture of XML and HTML Tags. where HTML tags are pulled from xhtml namespace and mine are from various namspaces. I wanna take user interaction events from XML Nodes of my Document. I First tried <do:landingTime xhtml:onclick="fnc">20:48:29.45</do:landingTime> with no Luck. But <xhtml:span onclick="fnc"> works. So is there any solution/tricks/hacks/backdoor to take events from my xml Nodes.

    Read the article

  • accessing associations within GORM Events

    - by Don
    Hi, My Grails app has a User class and a Role class. The User class has an authorities property which holds the roles assigned to that user, e.g. class User { static hasMany = [authorities: Role] // This method is called automatically after a user is inserted def afterInsert() { this.authorities.size() } } If I create a user and assign them a role, a NullPointerException is thrown from the GORM event method afterInsert(), because authorities is null. If I comment out afterInsert() the user is saved correctly along with the assigned role. Is there some reason why I can't access associations from GORM event methods. Is is possible that this event is fired after the User row is inserted, but before the row is added to the User-Role join table? Thanks, Don

    Read the article

  • Accessing and binding events to an ASP.NET Grid view using Jquery

    - by Sayem Ahmed
    I have an ASP page which displays a text box when it loads. It takes an input number, send it to the server through post back, and then displays some record in a grid view. After a number is input into the box, the server fetches some data from a database and add records to the grid view. It also contains a link column, whose URL is set to "#", so that the page isn't redirected when it is clicked. Now I want to bind a jquery "click" event to that link. How can I do that ? I have tried that to do myself but failed, because it is not available when the DOM is loaded (since it only contains rows when a number is input through the box), and is being modified through ASP.NET Ajax post back.

    Read the article

  • CustomValidatation control that fire on multiple control events

    - by George
    I am trying to create a UserControl that is a composite control for entering Dates. It involves 2 drop down controls (one for month and one for day) and a text box for year. It also has a CustomValidation control that I would like the user of the UserControl to be able to set the ClientValidationFunction property and have it triggered whenever the value in any of the 3 date part controls changes. To hook up each of the 3 controls to the validation control, I use teh AJAX ValidatorHookupControlID method. If I hard code the following code directly in my aspx page that houses the usercontrol, my Client Validation Function is successfulluy called when any of the 3 date part control values are changed: <script type="text/javascript"> //<![CDATA[ debugger; alert('hooking up'); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_txtYear", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_ddlDate", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_ddlMonth", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); //]]> However, I would like my usercontrol to emit this Javascript, so I added the following Code. Public Property ClientValidationFunction() As String Get Return CustomValidator1.ClientValidationFunction End Get Set(ByVal value As String) CustomValidator1.ClientValidationFunction = value End Set End Property Public Property EnableClientScript() As Boolean Get Return CustomValidator1.EnableClientScript End Get Set(ByVal value As Boolean) CustomValidator1.EnableClientScript = value End Set End Property Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.ClientValidationFunction.Trim <> "" AndAlso Me.EnableClientScript Then RegisterValidationScript() End If End Sub Private Sub RegisterValidationScript() Dim Key As String = Me.ClientID & "_ClientValidate" If Not Page.ClientScript.IsClientScriptBlockRegistered(Key) Then Page.ClientScript.RegisterClientScriptBlock(GetType(String), Key, GetJavascript, True) End If End Sub Private Function GetJavascript() As String Dim Out As String = "" Const Quote As String = Chr(34) Out &= "debugger;" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & txtYear.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & ddlDate.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & ddlMonth.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Return Out End Function Unfortunately, when the ValidatorHookupControlID method is called, the second parameter (the one that locates the validation control) always evaluates to null and the method fails. ValidatorHookupControlID("ctl00_phPageContent_DateSelector21_txtYear", document.all("ctl00_phPageContent_DateSelector21_CustomValidator1")); Can you tell me how to correct this error?

    Read the article

  • Cleaning all inline events from HTML tags

    - by Itay Moav
    For HTML input, I want to neutralize all HTML elements that have inline js (onclick="..", onmouseout=".." etc). I am thinking, isn't it enough to encode the following chars? =,(,) So onclick="location.href='ggg.com'" will become onclick%3D"location.href%3D'ggg.com'" What am I missing here? Edit: I do need to accept active HTML (I can't escape it all or entities is it).

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >