Search Results

Search found 4289 results on 172 pages for 'focus stealing'.

Page 28/172 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • surviveFocusChange=true

    - by Geertjan
    Here's a very cool thing that I keep forgetting about but that Jesse reminded me of in the recent blog entries on Undo/Redo: "surviveFocusChange=true". Look at the screenshot below. You see two windows with a toolbar button. The toolbar button is enabled whenever an object named "Bla" is in the Lookup. The "Demo" window has a "Bla" object in its Lookup and hence the toolbar button is enabled when the focus is in the "Demo" window, as shown below: Now the focus is in the "Output" window, which does not have a "Bla" object in its Lookup and hence the button is disabled: However, there are scenarios where you might like the button to remain enabled even when the focus changes. (One such scenario is the Undo/Redo scenario in this blog a few days ago, i.e., even when the Properties window has the focus the Undo/Redo buttons should be enabled.) Here you can see that the button is enabled even though the focus has switched to the "Output" window: How to achieve this? Well, you need to register your Action to have "surviveFocusChange" set to "true". It is, by default, set to "false": import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionReferences; import org.openide.awt.ActionRegistration; import org.openide.util.NbBundle.Messages; @ActionID(category = "File", id = "org.mymodule.BlaAction") @ActionRegistration(surviveFocusChange=true, iconBase = "org/mymodule/Datasource.gif", displayName = "#CTL_BlaAction") @ActionReferences({     @ActionReference(path = "Toolbars/Bla", position = 0) }) @Messages("CTL_BlaAction=Bla") public final class BlaAction implements ActionListener {     private final Bla context;     public BlaAction(Bla context) {         this.context = context;     }     @Override     public void actionPerformed(ActionEvent ev) {         // TODO use context     } } That's all. Now folders and files will be created in the NetBeans Platform filesystem from the annotations above when the module is compiled such that the NetBeans Platform will automatically keep the button enabled even when the user switches focus to a window that does not contain a "Bla" object in its Lookup. Hence, the same "Bla" object will remain available when switching from one window to another, until a new "Bla" object will be made available in the Lookup.

    Read the article

  • jquery creating stacked bar chart with flot?

    - by KittyYoung
    I'm using jquery flot and I'm trying to create a stacked bar chart, but I'm having some syntax issues... I'll post my code at the end of this, but I'm quite certain it's wrong. I do get a stacked bar chart, but there's only three columns... Basically, here is the data that I'm working with and what I want to accomplish... The first group (Focus Group 1) on each line is the bottom bar of the stacked bar, the second group (Focus Group 2) is the second, and the third group (Focus Group 3) is the top group. The "Responses" are what I want to use on the x-axis, the first number in each set is x, and the second number is y. Response1, [0, 0], [0,0], [0,9] Response2, [1, 5], [1,5], [1,11] Response3, [2, 2], [2,0], [2,8] Response4, [3, 1], [3,2], [3,6] Response5, [4, 0], [4,0], [4,7] I should also mention, that I'm not sure if a stacked chart is the best way to go... Admittedly, I'm not a very visual person, and generally find charts annoying... If there's a better way to present this data, then I am so totally open to suggestions... Essentially... I have a series of questions. Each of these questions were presented to three focus groups. Members of the focus groups selected a response. I'm trying to present the count per response, per focus group, for each question. I thought that a stacked chart would be the best way to go, but again, I'm open to other ways of doing this. The only thing is, I definitely need a visual representation of the data....

    Read the article

  • trackroll does not works as i want or expect to do,blackberry

    - by SWATI
    i am working on blackberry curve 8300 i have added some components in the main screen,now i want to move the focus vertically when the trackball moves up or down and move the focus horizontally when track-Wheel moves left or right. ================================================================================== --Title area that contains a focusable field(BACK)-- --Non focusable Label field that indicates the name of the user-- --A horizontal field manager1 that contains 4 buttons-- --A horizontal field manager2 that contains 4 buttons-- --A horizontal field manager2 that contains 4 buttons-- ================================================================================== now suppose currently focus is on BACK button and i scroll the track-wheel downwards then, focus should come on 1st button of manager1 Again when i scroll downwards,then focus should come on the 1st button of manager2 and not the 2nd button of manager1(as its happening on device) my code is ::: protected boolean trackwheelRoll(int amount, int status, int time) { focusIndex = this.getFieldWithFocusIndex(); System.out.println("focus index ::::::::::::::::"+focusIndex); Field f; if(focusIndex!=0) { if(amount==-1) { //move up if(focusIndex>=0) { focusIndex = focusIndex-1; f = getField(focusIndex); f.setFocus(); } } if(amount==1) { //moving down if(focusIndex<=3) { f = getField(++focusIndex); f.setFocus(); } } } return super.trackwheelRoll(amount, status, time); } even after this control moves abruptly on simulator but on device no change took place

    Read the article

  • jquery select one class from many

    - by simnom
    Hi, I'm trying to achieve the following functionality. Within a form I have multiple fields with the class name .inputField if one of these fields is selected then the div associated with that element should be shown on focus and hidden on blur. However, when I implement the code below on selecting the second element the class is applied to both. Not sure where I'm going wrong?!?!? html markup: <form class="friendlyForm" name="friendlyForm" id="friendlyForm"> <ul> <li> <label for="testField">Test field</label> <input name="testField" value="here" class="inputField" id="testField" /> <div class="helper" style="display: none;">helper text here</div> </li> <li> <label for="testField">Test field2</label> <input name="testField2" value="here" class="inputField" id="testField2" /> <div class="helper" style="display: none;">helper text here</div> </li> </ul> </form> jQuery markup: $('.friendlyForm').find('.inputField').each(function(i) { $(this).blur(); $(this).focus(function() { //Add the focus class and fadeIn the helper div $(this).parent().addClass('focus'); $(this).parent().parent().find('.helper').fadeIn(); }); $(this).blur(function () { //Remove the focus class and fadeOut helper div $(this).parent().removeClass('focus'); $(this).parent().parent().find('.helper').fadeOut(); }); }); Any pointers here would be greatly appreciated. Thanks

    Read the article

  • How to determine if the camera button is half pressed

    - by Matthew
    I am creating a small test camera application, and I would like to be able to implement a feature that allows focus text bars to be present on the screen while the hardware camera button is pressed half way down. I created a camera_ButtonHalfPress event to perform the focus action, but I am unsure of how to toggle the text bars I would like to show on the screen accordingly. Essentially, my goal would be to show the text bars while the camera button is pressed half way down, and then remove them if the button is pressed all the way or the button is released before being pressed all the way down. The button being released is the part I am having trouble with. What I have is as follows: MainPage.xaml.cs private void camera_ButtonHalfPress(object sender, EventArgs e) { //camera.Focus(); // Show the focus brackets. focusBrackets.Visibility = Visibility.Visible; } } private void camera_ButtonFullPress(object sender, EventArgs e) { // Hide the focus brackets. focusBrackets.Visibility = Visibility.Collapsed; camera.CaptureImage(); } } Currently, if the the user decides to release the camera button before it is pressed all the way, the focus brackets persist on the screen. How might I fix this issue?

    Read the article

  • LINQ to Entities pulling back entire table

    - by Focus
    In my application I'm pulling back a user's "feed". This contains all of that user's activities, events, friend requests from other users, etc. When I pull back the feed I'm calling various functions to filter the request along the way. var userFeed = GetFeed(db); // Query to pull back all data userFeed = FilterByUser(userFeed, user, db); // Filter for the user userFeed = SortFeed(userFeed, page, sortBy, typeName); // Sort it The data that is returned is exactly what I need, however when I look at a SQL Profile Trace I can see that the query that is getting this data does not filter it at the database level and instead is selecting ALL data in the table(s). This query does not execute until I iterate through the results on my view. All of these functions return an IEnumerable object. I was under the impression that LINQ would take all of my filters and form one query to pull back the data I want instead of pulling back all the data and then filtering it on the server. What am I doing wrong or what don't I understand about the way LINQ evaluates queries?

    Read the article

  • N-Tier Architecture - Structure with multiple projects in VB.NET

    - by focus.nz
    I would like some advice on the best approach to use in the following situation... I will have a Windows Application and a Web Application (presentation layers), these will both access a common business layer. The business layer will look at a configuration file to find the name of the dll (data layer) which it will create a reference to at runtime (is this the best approach?). The reason for creating the reference at runtime to the data access layer is because the application will interface with a different 3rd party accounting system depending on what the client is using. So I would have a separate data access layer to support each accounting system. These could be separate setup projects, each client would use one or the other, they wouldn't need to switch between the two. Projects: MyCompany.Common.dll - Contains interfaces, all other projects have a reference to this one. MyCompany.Windows.dll - Windows Forms Project, references MyCompany.Business.dll MyCompany.Web.dll - Website project, references MyCompany.Business.dll MyCompany.Busniess.dll - Business Layer, references MyCompany.Data.* (at runtime) MyCompany.Data.AccountingSys1.dll - Data layer for accounting system 1 MyCompany.Data.AccountingSys2.dll - Data layer for accounting system 2 The project MyCompany.Common.dll would contain all the interfaces, each other project would have a reference to this one. Public Interface ICompany ReadOnly Property Id() as Integer Property Name() as String Sub Save() End Interface Public Interface ICompanyFactory Function CreateCompany() as ICompany End Interface The project MyCompany.Data.AccountingSys1.dll and MyCompany.Data.AccountingSys2.dll would contain the classes like the following: Public Class Company Implements ICompany Protected _id As Integer Protected _name As String Public ReadOnly Property Id As Integer Implements MyCompany.Common.ICompany.Id Get Return _id End Get End Property Public Property Name As String Implements MyCompany.Common.ICompany.Name Get Return _name End Get Set(ByVal value as String) _name = value End Set End Property Public Sub Save() Implements MyCompany.Common.ICompany.Save Throw New NotImplementedException() End Sub End Class Public Class CompanyFactory Implements ICompanyFactory Public Function CreateCompany() As ICompany Implements MyCompany.Common.ICompanyFactory.CreateCompany Return New Company() End Function End Class The project MyCompany.Business.dll would provide the business rules and retrieve data form the data layer: Public Class Companies Public Shared Function CreateCompany() As ICompany Dim factory as New MyCompany.Data.CompanyFactory Return factory.CreateCompany() End Function End Class Any opinions/suggestions would be greatly appreciated.

    Read the article

  • Using Facebook Connect auth.RevokeAuthorization in ASP.NET

    - by Focus
    I'm confused as to how revoking authorization works in the ASP.NET Toolkit. I've tried issuing the following: ConnectSession connect = new ConnectSession(FacebookHelper.ApiKey(), FacebookHelper.SecretKey()); Auth x = new Auth(fbSession); x.RevokeAuthorization(); But I get an object reference error during the RevokeAuthorization call. Here's the call definition. Any idea what I'm doing wrong?

    Read the article

  • Design suggestions for creating document management structure using hidden shares.

    - by focus.nz
    I need to add some document management functionality into my software. Documents will be grouped by company name and project name. The folders need to be accessed by the application using the id numbers of clients/projects, but also easily browsed by the end user using windows explorer. Clients and Projects will be stored in a database. I am thinking of having the software create the folders using the friendly name and then using a hidden share with the id number for the software to access the files. The folder structure would be something like this --Company 1 (Company-1234$) -- Project 101 (Project-101$) -- Project 102 (Project-102$) -- Project 103 (Project-103$) -- Company 2 (Company-5678$) -- Project 201 (Project-201$) -- Project 202 (Project-202$) -- Project 203 (Project-203$) So in the example above there would be a company called "Company 1" with a ID of "1234". When browsing the folders using windows explorer the user would see \\ServerName\Documents\Company1 and you could also access the same folder from \\ServerName\Documents\Company-1234$ By using the hidden share, if the company name changes or its renamed for some reason it doesn't break the link in the application because its using the hidden shared based on the ID that never changes. Will having hundreds (maybe thousands) or hidden shares on a server provide a huge performance hit? Does any one have any suggestions or alternatives to provide this feature?

    Read the article

  • How to encrypt information in aspx page?

    - by Jimmyc
    Hi all, I know it's a silly question but , My client asked for encrypting some information form their payment system to prevent user stealing personal information. The system is web-base and written by ASP.NET We have tried some annoying solution such as JavaScript no right-click or css-no-print but apparently my client didn't like it. so are there any commercial solution to encrypt information in aspx produced html pages? or someone can tell me how to pursuit my client to stop these "prevent stealing" idea in a web-base system?

    Read the article

  • Why this button doesn't cause triple postback?

    - by focus
    We have developed a page with a asp.net and debugging it accidentally we have discovered on our page button with the next code on onclik attribute onclick="__doPostBack('ctl00$FormPlace$m_userTaskMarkAsUnreadButton',''); __doPostBack('ctl00$FormPlace$m_userTaskMarkAsUnreadButton','');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$FormPlace$m_userTaskMarkAsUnreadButton", "", true, "", "", false, false))" It seems that the button do three postbacks but when we click it only cause on postback. With this code seems that de button will cause three postbacks!! We have try it with Internet Explorer and Firefox and the button only cause on postback always. Are browsers who avoid that the button do three postback ? Or Is Asp.net server who avoid the three postback? We don't understand why the button behaves correctly if onclick attribute has three call to do Postbacks. Thanks

    Read the article

  • Inefficient 'ANY' LINQ clause

    - by Focus
    I have a query that pulls back a user's "feed" which is essentially all of their activity. If the user is logged in the query will be filtered so that the feed not only includes all of the specified user's data, but also any of their friends. The database structure includes an Actions table that holds the user that created the action and a UserFriends table which holds any pairing of friends using a FrienderId and FriendeeId column which map to UserIds. I have set up my LINQ query and it works fine to pull back the data I want, however, I noticed that the query gets turned into X number of CASE clauses in profiler where X is the number of total Actions in the database. This will obviously be horrible when the database has a user base larger than just me and 3 test users. Here's the SQL query I'm trying to achieve: select * from [Action] a where a.UserId = 'GUID' OR a.UserId in (SELECT FriendeeId from UserFriends uf where uf.FrienderId = 'GUID') OR a.UserId in (SELECT FrienderId from UserFriends uf where uf.FriendeeId = 'GUID') This is what I currently have as my LINQ query. feed = feed.Where(o => o.User.UserKey == user.UserKey || db.Users.Any(u => u.UserFriends.Any(ufr => ufr.Friender.UserKey == user.UserKey && ufr.isApproved) || db.Users.Any(u2 => u2.UserFriends.Any(ufr => ufr.Friendee.UserKey == user.UserKey && ufr.isApproved) ))); This query creates this: http://pastebin.com/UQhT90wh That shows up X times in the profile trace, once for each Action in the table. What am I doing wrong? Is there any way to clean this up?

    Read the article

  • Ubuntu Unity (64-bit) Bugs on Nvidia dual screen [closed]

    - by Kristofer
    On my work computer I have upgraded 10.04 to 10.10 and now to 11.04. Upgrades have mostly worked well and the dual screen setup is almost working. There are however a couple of annoying bugs which I tried to report but the bug reporting tool told me to ask about the bugs here. Here's what I have found: Auto-hide stops working. It doesn't seem to matter which application is maximised/covering the dock, it just stays on top. I have tested changing the autohide settings with no result. Scenario: One maximised window on each screen. If I now try to drag the window that doesn't have focus by dragging the top of the window nothing happens. I can also not give the window focus by clicking the top bar, I have to click inside the window and then I can drag the window. If I unmaximise the window with focus it does work and I can both change focus and drag the window directly by clicking the top of the maximised window. Any bug fixes coming for these issues? Any work-arounds?

    Read the article

  • Focusing and Selecting the Text in ASP.NET TextBox Controls

    When a browser displays the HTML sent from a web server it parses the received markup into a Document Object Model, or DOM, which models the markup as a hierarchical structure. Each element in the markup - the <form> element, <div> elements, <p> elements, <input> elements, and so on - are represented as a node in the DOM and can be programmatically accessed from client-side script. What's more, the nodes that make up the DOM have functions that can be called to perform certain behaviors; what functions are available depend on what type of element the node represents. One function common to most all node types is focus, which gives keyboard focus to the corresponding element. The focus function is commonly used in data entry forms, search pages, and login screens to put the user's keyboard cursor in a particular textbox when the web page loads so that the user can start typing in his search query or username without having to first click the textbox with his mouse. Another useful function is select, which is available for <input> and <textarea> elements and selects the contents of the textbox. This article shows how to call an HTML element's focus and select functions. We'll look at calling these functions directly from client-side script as well as how to call these functions from server-side code. Read on to learn more! Read More >

    Read the article

  • Email Validation... advocating the use of +, and how embarrassed would you be to have written this?

    - by Langdon
    I take full advantage of GMail's wildcard feature ([email protected]). Unfortunately it seems that most developers don't understand that + is valid in an email address. This makes trying to unsubscribe a real chore sometimes. Take TicketMaster for example... immediately you notice that they didn't even bother escaping the email address, so the text field defaults to "user [email protected]". Not a problem, we can just add the + manually. Once Submit is clicked, you'll notice the validation stops you right in your tracks. What now? Most users would have to further contact TicketMaster and attempt to explain the situation. I opened up FireBug to investigate. That's when I noticed this whopping 74 line email validation function with so much redundancy it's ridiculous. My favorite check is on line 20, informing the user that his/her email cannot have more than one @. Unreal. My second favorite part is the TWO regular expressions used! Imagine... someone was paid money for this... and by the looks of it, they were paid by the line count. //Validates the email function validateOptoutEmail(object) { var emailStr = object.value; if(emailStr == '' || emailStr == null) { alert('Email can not be empty. Please provide email'); object.value = ''; object.focus(); return false; } else if(Trim(emailStr).length == 0) { alert('Email can not be empty. Please provide email'); object.value = ''; object.focus(); return false; } else { var atcount=0; for(var i=0;i<emailStr.length;i++) { if(emailStr.charAt(i)=='@') atcount++; } if(atcount>1) { alert('Invalid email. Email cannot have more than one @'); object.value = ''; object.focus(); return false; } if(emailStr.indexOf('.') == -1) { alert('Invalid email. Email must have one dot'); object.value = ''; object.focus(); return false; } if(emailStr.indexOf('..')!= -1) { alert('Invalid email. Email cannot have consecutive dots'); object.value = ''; object.focus(); return false; } var dotpos=0; for(var i=dotpos;i< emailStr.length;i++) { var ichar=emailStr.charAt(i); if(ichar=='.') dotpos=i; } for(var i=dotpos+1;i< emailStr.length;i++) { var ichar=emailStr.charAt(i); if((!isNaN(ichar)) || (ichar == '_')) { alert('Invalid email. Email cannot have numbers or _ after dot'); object.value = ''; object.focus(); return false; } } var pattern2=/^([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/; var pattern1=/^[0-9a-zA-Z\-\_.]+@\w+([\.-]?\w+)*(\.\w{2,4})+$/; if (pattern1.test(emailStr)) { if(pattern2.test(emailStr)) { return true; } else { alert('Invalid email'); object.value = ''; object.focus(); } return true; } else { alert('Invalid email'); object.value = ''; object.focus(); return false; } alert('Invalid email'); object.value = ''; object.focus(); return false; } } I eventually just put a break point in FireBug and changed the value of the email address passed into the validation function. From there everything worked fine... All that said, how can we get the word out there that + is valid in an email address? Too often, I'm unable to use the email address that I want to use for certain web sites because developers simply aren't aware of what constitutes a valid email address.

    Read the article

  • SQL Server 2008 Service Pack 1 and the Invoke or BeginInvoke cannot be called error message

    - by Jeff Widmer
    When trying to install SQL Server 2008 Service Pack 1 to a SQL Server 2008 instance that is running on a virtual machine, the installer will start:   But then after about 20 seconds I receive the following error message: TITLE: SQL Server Setup failure. ----------------------------- SQL Server Setup has encountered the following error: Invoke or BeginInvoke cannot be called on a control until the window handle has been created. ------------------------------ BUTTONS: OK ------------------------------ Searching for this issue I found that several people have the same problem and there is no clear solution.  Some had success with closing windows or Internet Explorer but that didn’t work for me; what did work is to make sure the SQL Server 2008 “Please wait while SQL Server 2008 Setup processes the current operation.” dialog is selected and has the focus when it first shows up.  Selected (with the current focus) it looks like this:   Without focus the dialog looks like this: Add a comment if you find out any information about how to consistently get around this issue or why it is happening in the first place.

    Read the article

  • Oracle Hosts Successful PeopleSoft Customer Advisory Board Meetings

    - by Mark.Hoernemann
    Last week, Oracle hosted the annual Customer Advisory Board meetings for various PeopleSoft applications, including the PeopleTools CAB.  The three day event at the Oracle headquarters brought together over 90 customers, with over 170 representatives taking part.  This was the largest CAB event PeopleSoft has had to date.  The focus of the event was to share our vision for PeopleSoft, and gain valuable input from our customer base on our direction and focus areas.  The customer feedback we received for the event was extremely positive, matching the sentiment on our side.  The information our CAB members provided was excellent; it will help ensure that we focus on the areas that matter most to our customers.   I’d like to thank all the customers that took the time out of their schedules to hear where we’re looking to go in the future, and provide guidance on how we can best assist our customer base on remaining successful in the marketplace.

    Read the article

  • Keyboard Navigation For ASP.NET GridView And TreeList Controls v2010 vol 1

    Great new keyboard navigation feature! With the DXperience v2010.1 release, you can enable keyboard navigation by changing a single property, set KeyboardSupport to true. Once KeyboardSupport is enabled, your users can: Focus On Grid Using Control Activation Key Specify an access key for your grid controls and allow your end-users to press CTRL+SHIFT+AccessKey to change focus to the corresponding grid control. Focused Row Press the UP and DOWN arrow keys to move row focus....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Keyboard Navigation For ASP.NET GridView And TreeList Controls v2010 vol 1

    Great new keyboard navigation feature! With the DXperience v2010.1 release, you can enable keyboard navigation by changing a single property, set KeyboardSupport to true. Once KeyboardSupport is enabled, your users can: Focus On Grid Using Control Activation Key Specify an access key for your grid controls and allow your end-users to press CTRL+SHIFT+AccessKey to change focus to the corresponding grid control. Focused Row Press the UP and DOWN arrow keys to move row focus....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • jQuery autocomplete - update options on dynamically created elements

    - by Ian Robinson
    Background The user enters values into multiple inputs on the page. Think of entering a list of widgets for sale. The user would select the type of a widget from a drop down. Then enter the name of the Widget vendor, and then the actual name of the widget. These UI elements would all appear as one row. The user is able to click an "add another widget" link and a new row is created. The two input elements have autocomplete functionality attached to them using the DevBridge jQuery plugin. It suggests the name of the vendor and the name of the widget. I have recently wired up the logic to filter the name of the widget based on the name of the vendor you entered. This means setting the (custom) vendorName parameter when attaching the autocomplete plugin so it can be passed to the server side to retrieve the widget names for that vendor that match the name the user entered. To achieve this functionality I'm dynamically attaching the autocomplete functionality to the second element (the widget name text box) when it receives focus. Here is an example: $('.autocomplete-widget').live('focus', function () { $(this).autocomplete({ serviceUrl: '/something.ashx', params: { type: 'widget', vendorName: $(this).parent().prev().find('.autocomplete-vendor').val()} }); }); Problem At first glance, this looks to function quite well. However I started noticing some inconsistencies, and upon inspection, I found out that the call to the server is actually happening several times in some cases. Each time the widget name input element receives focus the autocomplete functionality is attached. And what I'm seeing is that the call to the server is made in proportion to how many times the input element has gained focus. I'd like to avoid making the call more than once, but retain the ability to attach (or update) the autocomplete functionality "on focus". I've tried to use the autocomplete 'setOptions' method but have only been able to get it to work with the static elements, not the dynamically created elements. Question Is there a way I can clear out the autocomplete functionality before I attach another one?

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >