Search Results

Search found 4648 results on 186 pages for 'voting buttons'.

Page 10/186 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Whats the best way to stop this app crash when buttons rapidly pressed iphone obj-c

    - by dubbeat
    Hi, I'm not entirely sure why this crash is happening and I'd like to get advice on the best way to deal with it. My app has 3 buttons. Each button requests a different XML file from a server which is used to populate a table view. If I rapidly press the buttons in sequence , button 1 button 2 button3 button 1 button 2 button3 button 1 button 2 button3 the application quits. What could be causing this. Would id be in the NSURLRequest side of things or the table view population side? How would you suggest I stop this behaviour? I was going to just set a boolean "isRequesting" to true when a button is pressed and set it to false when the table view is finished populating. If any button is pressed while isRequesting is True they do nothing. Does that sound wise or is there a better way? Thanks, dub

    Read the article

  • Vertical ButtonBar buttons width

    - by user294702
    I am creating a vertical button bar with 3 buttons. How to I force the same width for all three buttons so it doesn't look like crap? <s:ButtonBar x="10" y="10" dataProvider="{viewstack1}" > <s:layout> <s:VerticalLayout gap="-1"/> </s:layout> </s:ButtonBar> <mx:ViewStack id="viewstack1" left="115" paddingRight="0" right="0" bottom="0" top="0"> <s:NavigatorContent label="ABC Products" width="100%" height="100%"><custom:Banner width="100%" height="100%"/></s:NavigatorContent> <s:NavigatorContent label="Btn Player" width="100%" height="100%"><custom:Player /></s:NavigatorContent> <s:NavigatorContent label="Btn Cleaner" width="100%" height="100%"><custom:Cleaner width="100%"/></s:NavigatorContent> </mx:ViewStack>

    Read the article

  • Can I increase a buttons onclick-area programmatically?

    - by sandis
    Sometimes I have a button in my UI that it is so small that it is difficult to click. My solution so far has been to add a transparent border around the button in photoshop. Just increasing the padding on the button does not work, since this will also stretch the image. Since it is kind of a fuss to open photoshop each time I want to change the clickable surface, is there any way to do this programmatically? I have tried placing a framelayout behind the button and make it clickable, but then the button wont change appearance on touch as it should. Ofcourse I could also add a ontouchlistener on the framelayout which changes the buttons appearance, but then it quite some code if I have several of those buttons. Cheers,

    Read the article

  • Tkinter Packing Strangeness: Buttons packed above others

    - by Parand
    I'm sure I'm doing something obvious wrong here, but I can't see it. I end up with the "Should be on top" label packed at the bottom instead of at the top. What am I doing wrong? from Tkinter import * class SelectAction(Frame): buttons = {} def callback(self): print "Callback" def createWidgets(self): logo_label = Label(text="Should be on top").pack(fill=X) for name, text, callback in ( ('setup_account', 'Account Settings', self.callback), ('do_action', 'Do Something', self.callback), ): self.buttons[name] = Button(self, text=text, command=callback).pack(fill=X) def __init__(self, master=None): Frame.__init__(self, master) self.pack() self.createWidgets() if __name__ == "__main__": root = Tk() app = SelectAction(master=root) app.mainloop() root.destroy()

    Read the article

  • WPF buttons same/recommended width

    - by rwallace
    Suppose you have a window with multiple buttons such as Ok/Cancel or Yes/No/Cancel. All the buttons need to be the same width. Obviously this could be done by just guessing a number and hardwiring all of them to that number. Is there a better way to do it, one that would take into account preferred/recommended sizes (just how wide should an Ok button be anyway? This is not a rhetorical question, I actually don't know the answer!), what's needed by the text of the longest caption, what happens if the font size is increased etc?

    Read the article

  • editButtonItem set but no minus buttons?

    - by QAD
    My edit button is placed in viewDidLoad: self.navigationItem.rightBarButtonItem = self.editButtonItem; It shows up correctly on the nav bar, and tapping this button indeed change it to Done. However, no minus buttons show up in my table rows. Swiping a row, then tap Delete works, though. Any ideas? EDIT 1: Here's how I'm doing: - (void)loadView { tableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; tableView.delegate = self; tableView.dataSource = self; tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.view = tableView; } EDIT 2: My observation is that the edit and minus buttons display fine if my tableview is created in IB (RootViewController). The other two (or three) tableview are created by the aforemention code, so that might be the problem. Guess I'd have to dive in to isEditing, editing and whatnot.

    Read the article

  • Disable buttons on post back using jquery in .net app

    - by Chris Lively
    I have a asp.net app that I want to disable the buttons as soon as they are clicked in order to prevent multiple submissions. I'd like to use jquery for this as the site already liberally uses it anyway. What I've tried is: $(document).ready(function () { $("#aspnetForm").submit(function () { $('input[type=submit]', $(this)).attr("disabled", "disabled"); }) }); The above will disable the button, and the page submits, but the asp.net button on click handler is never called. Simply removing the above and the buttons work as normal. Is there a better way?

    Read the article

  • POST and multiple submit buttons on form (iphone)

    - by Jonathan
    NSString *reqURL = [NSString stringWithFormat:@"%@/login",SERVER_URL]; NSMutableURLRequest *req = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:reqURL]]; [req setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"]; NSData *myRequestData = [NSData dataWithBytes:[@"username=whatever&password=whatever" UTF8String] length: [@"username=whatever&password=whatever" length]]; [req setHTTPMethod: @"POST"]; [req setHTTPBody: myRequestData]; NSData *returnData = [NSURLConnection sendSynchronousRequest:req returningResponse: nil error: nil]; NSString *html = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; I got this code from another question I asked. But what happens if there is more than one submit button. I really have no idea how to ask this question. An example of such situation is on the logout page for this site. There are no fields to enter data into, but there are 2 submit buttons. How can I "simulate clicking" on one of those buttons using code like the above (so not using a UIWebView)

    Read the article

  • how can we change the value by using radio buttons

    - by magna
    I am making a website in Adobe Dreamweaver with php. In the site there’s a 3 buttons for selecting payment method that will act as the continue button. What I want is when the user checks a radio buttons (I agree button), it will be add with that amount and display with previous amount.. there is three buttons which has the corresponding values(amount in pounds).. plz check my website http://www.spsmobile.co.uk in this linkgo to mobile phone unlocking and after add the cart click make payment it will go to next page there is a delivery mail details.. for that delivery mail details only am asking.. here i mentioned code: <input id="radio-1" type="radio" name="rmr" value="1"> <label for="radio-1">£3</label> <input id="radio-2" type="radio" name="rmr" value="2"> <label for="radio-2">£5.5</label> <input id="radio-3" type="radio" name="rmr" value="4"> <label for="radio-3">£10</label> <div class="total-text" style="font-size:36px">£10</div> var total = parseInt($("div.total-text").text().substring(1), 10); $("input[name='rmr']").bind('change', function() { var amount = 0; switch (this.value) { case "1": amount = 3; break; case "2": amount = 5.5; break; case "4": amount = 10; break; } $("div.total-text").text("£" + (total + amount)); }); but there is no change , my previous amount did not add with that. while am clicking previous amount only displayed on browser.. i need when i cliks radio button the value should change correspondingly.. where i did that mistake...plz give me some idea and what should i do..is there any need for storing db.. thanks in adv

    Read the article

  • Display radio buttons in prolog xpce

    - by Ben03
    I created a menu with Radio Buttons in XPCE prolog, but my radio buttons are showing on the same line, and I want to have each one on a separate line. My code is the following: new(D, dialog('title')), send(D, size, size(500,500)), send(D, append, new(Op, menu(options, marked))), send(Op, append, option1), send(Op, append, option2), send(Op, append, option3), send(Op, size, size(300,300)), send(D, display, Op, point(100, 40)), send(D, append(new(B1,button(ok, message(D, return, Op?selection))))), send(D, display, B1, point(100, 100)), send(D, append(button(cancel, message(D, return, @nil)))), send(D, default_button(ok)), get(D, confirm, Rval), free(D). Thanks in advance

    Read the article

  • Android bug with buttons and editText

    - by khatereh
    I have some android code (textView, editText, button) and I add all strings in string.xml. I call these data in this way: Button vibro; setVibro((Button) findViewById(R.id.vibro)); vibro.setText(getString(R.string.vibro_button)); vibro = (Button)findViewById(R.id.vibro); and also I create set and get method for it. This is one part of my main.xml: android:id="@+id/editme" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/username" / <Button android:id="@+id/buttons" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/bfirst" /> and this is one part of my string.xml: Register The problem is that I see the buttons and edit text and everything in all my pages. I am sure that I call them in a correct way. But what can cause a problem?

    Read the article

  • Take input through Buttons in java

    - by stash211
    I understand that the title might not be descriptive enough, but I'm making a magic square game in Java and basically, I'm trying to replicate user input as found in the sudoku game here: http://www.websudoku.com/. What I have is a n x n grid of Buttons (not JButton) as the board and what I want the user to be able to do is when the user clicks on one of the buttons, similar to the game above, it allows the user to type in his guess in the button itself instead of popping up a dialog box with an input field of some sort. I don't know where to start, I am a beginner in Java (not very beginner, but my knowledge with the various Java APIs is very limited), so I'm trying to find out if this would be possible and if it is, how would I go about doing it? Thanks for any help.

    Read the article

  • add navigation buttons with highlight to jQuery Cycle

    - by JJ Nold
    I am currently using jQuery cycle to display featured projects. I currently have the next and prev buttons setup, I also have four rounded buttons in between. I would like them to function as both a link to the corresponding slide as well as add a class to the button who's slide is currently active. I have the nav setup and the active class setup I just need the jQuery. You can see the code at http://jjnold.com/dev in the main slider at the top. I was thinking it's probably something like this to assign the class but I'm not sure how to link to the corresponding slide and have them work together. Any help is greatly appreciated. $('.featuredNavInt a').click(function() { $('.featuredNavInt a').removeClass('active'); $(this).addClass('active'); });

    Read the article

  • None of my Win Forms buttons work

    - by nectarines
    I have a windows form which connects to a SQL Server though a dataset. The form was working fine since my last compile. All of a sudden, none of my buttons work! The data is loaded on the form, all the tabs work fine, drop down boxes work fine, but the buttons are literally unresponsive to any clicks. I added a test button and I get the same results. I can visually see the button getting clicked but no events. Any ideas?

    Read the article

  • Making buttons - <button> or <div> ?

    - by user246114
    Hi, I'm wondering what html element to use for buttons on a web page - I'd like to style my 'buttons' like twitter does. For example: http://twitter.com/twitter the "more" button at the bottom of the tweet listing - is that a <button> element, or a <div> element? I'd like to know which to use. I think for either <button> or <div> we can supply rollover states and all that stuff to make it look pleasant? Thanks

    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

  • Determining the popularity of a video with ratings and views

    - by user295825
    I am about to embark on a new project - a video website. Users will be able to register, and vote on videos by clicking "like" or "dislike", or something to that effect. In any event, it will be a 2-option voting system, not a 5-star system. Every X number of days, I will be generating a "chart" of the most popular videos. So my question is: how should I determine the popularity of a given video? If I went the route of tallying up the videos with the most views, this could have the effect of exceptionally bad videos making it to the of the charts (just because they're so bad). If I go the route of a scoring system based on the amount of "like" and "dislike" votes (eg. 100 like votes, and 50 dislike votes equals a score of 2), videos with few views could appear on the top of the charts. So, what I need to do is a combination of the two. Barring, of course, spammy views and votes. What's your guys' thoughts on the subject?

    Read the article

  • MVVM: Binding radio buttons to a view model?

    - by David Veeneman
    I have been trying to bind a group of radio buttons to a view model using the IsChecked button. After reviewing other posts, it appears that the IsChecked property simply doesn't work. I have put together a short demo that reproduces the problem, which I have included below. Here is my question: Is there a straightforward and reliable way to bind radio buttons using MVVM? Thanks. Additional information: The IsChecked property doesn't work for two reasons: When a button is selected, the IsChecked properties of other buttons in the group don't get set to false. When a button is selected, its own IsChecked property does not get set after the first time the button is selected. I am guessing that the binding is getting trashed by WPF on the first click. Demo project: Here is the code and markup for a simple demo that reproduces the problem. Create a WPF project and replace the markup in Window1.xaml with the following: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <StackPanel> <RadioButton Content="Button A" IsChecked="{Binding Path=ButtonAIsChecked, Mode=TwoWay}" /> <RadioButton Content="Button B" IsChecked="{Binding Path=ButtonBIsChecked, Mode=TwoWay}" /> </StackPanel> </Window> Replace the code in Window1.xaml.cs with the following code (a hack), which sets the view model: using System.Windows; namespace WpfApplication1 { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { this.DataContext = new Window1ViewModel(); } } } Now add the following code to the project as Window1ViewModel.cs: using System.Windows; namespace WpfApplication1 { public class Window1ViewModel { private bool p_ButtonAIsChecked; /// <summary> /// Summary /// </summary> public bool ButtonAIsChecked { get { return p_ButtonAIsChecked; } set { p_ButtonAIsChecked = value; MessageBox.Show(string.Format("Button A is checked: {0}", value)); } } private bool p_ButtonBIsChecked; /// <summary> /// Summary /// </summary> public bool ButtonBIsChecked { get { return p_ButtonBIsChecked; } set { p_ButtonBIsChecked = value; MessageBox.Show(string.Format("Button B is checked: {0}", value)); } } } } To reproduce the problem, run the app and click Button A. A message box will appear, saying that Button A's IsChecked property has been set to true. Now select Button B. Another message box will appear, saying that Button B's IsChecked property has been set to true, but there is no message box indicating that Button A's IsChecked property has been set to false--the property hasn't been changed. Now click Button A again. The button will be selected in the window, but no message box will appear--the IsChecked property has not been changed. Finally, click on Button B again--same result. The IsChecked property is not updated at all for either button after the button is first clicked.

    Read the article

  • mouseover producing multiple images works in Firefox, but not i.e.

    - by tcantrel
    The code below allows the user to hover over 1 object and it not only replaces the object but also shows an additional object between the buttons. It works great in Firefox, but does not in Internet Explorer. HELP webpage: http://www.isp.ucar.edu/ Thx, Terri if ( < ocument.images) { img1on = new Image(); img1on.src = "images/buttons/button-beachon-on.gif"; img1off = new Image(); img1off.src = "images/buttons/button-beachon.gif"; img2on = new Image(); img2on.src = "images/buttons/button-bgs-on.gif"; img2off = new Image(); img2off.src = "images/buttons/button-bgs.gif"; img3on = new Image(); img3on.src = "images/buttons/button-iam-on.gif"; img3off = new Image(); img3off.src = "images/buttons/button-iam.gif"; img4on = new Image(); img4on.src = "images/buttons/button-nvia-on.gif"; img4off = new Image(); img4off.src = "images/buttons/button-nvia.gif"; img5on = new Image(); img5on.src = "images/buttons/button-utls-on.gif"; img5off = new Image(); img5off.src = "images/buttons/button-utls.gif"; img6on = new Image(); img6on.src = "images/buttons/button-water-on.gif"; img6off = new Image(); img6off.src = "images/buttons/button-water.gif"; img7on = new Image(); img7on.src = "images/buttons/button-exploratory-on.gif"; img7off = new Image(); img7off.src = "images/buttons/button-exploratory.gif"; // second image that does not appear in original button space img1ad = new Image(); img1ad.src = "images/buttons/beachon-overview-sm.gif"; img2ad = new Image(); img2ad.src = "images/buttons/bgs-overview-sm.gif"; img3ad = new Image(); img3ad.src = "images/buttons/iam-overview-sm.gif"; img4ad = new Image(); img4ad.src = "images/buttons/nvia-overview-sm.gif"; img5ad = new Image(); img5ad.src = "images/buttons/utls-overview-sm.gif"; img6ad = new Image(); img6ad.src = "images/buttons/water-overview-sm.gif"; img7ad = new Image(); img7ad.src = "images/buttons/exploratory-overview-sm.gif"; } function imgOn(imgName) { if ( < ocument.images) { document[imgName].src = eval(imgName + "on.src"); document["holder"].src = eval(imgName + "ad.src"); } } function imgOff(imgName) { if ( < ocument.images) { document[imgName].src = eval(imgName + "off.src"); document["holder"].src = "images/buttons/isp-overview-sm.gif"; } }

    Read the article

  • How can I transform this haml into a table?

    - by mmr
    I have the following haml code: - @theLinks.each_index do |x| %br %form{:action=>'/Download', :method=>"post",:enctype=>"multipart/form-data"} %input{:type=>"submit", :name=>"#{@theLinks[x].url}", :value=>"Name: #{@theLinks[x].Name} Study Time: #{@theLinks[x].studyTime} Comments: #{@theLinks[x].comments}"} Basically, for each person, list the time they participated in a study and the comments on the study. Right now, this renders as a set of buttons. I'd like to render it as a table, with each row clickable in the same way (ie, using the 'post' method, so that only the haml file has to be edited without touching the rest of the files). Ideally, I'd also like to be able to sort the table by name, time, or comments, but that might be getting ahead of myself. So how can I change this list of buttons into a table with clickable rows?

    Read the article

  • AsyncTask, inner classes and Buttons states

    - by Intern John Smith
    For a musical application (a sequencer), I have a few buttons static ArrayList<Button> Buttonlist = new ArrayList<Button>(); Buttonlist.add(0,(Button) findViewById(R.id.case_kick1)); Buttonlist.add(1,(Button) findViewById(R.id.case_kick2)); Buttonlist.add(2,(Button) findViewById(R.id.case_kick3)); Buttonlist.add(3,(Button) findViewById(R.id.case_kick4)); Buttonlist.add(4,(Button) findViewById(R.id.case_kick5)); Buttonlist.add(5,(Button) findViewById(R.id.case_kick6)); Buttonlist.add(6,(Button) findViewById(R.id.case_kick7)); Buttonlist.add(7,(Button) findViewById(R.id.case_kick8)); that I activate through onClickListeners with for example Buttonlist.get(0).setActivated(true); I played the activated sound via a loop and ifs : if (Buttonlist.get(k).isActivated()) {mSoundManager.playSound(1); Thread.sleep(250);} The app played fine but I couldn't access the play/pause button when it was playing : I searched and found out about AsyncTasks. I have a nested class PlayPause : class PlayPause extends AsyncTask<ArrayList<Button>,Integer,Void> in which I have this : protected Void doInBackground(ArrayList<Button>... params) { for(int k=0;k<8;k++) { boolean isPlayed = false; if (Buttonlist.get(k).isActivated()) { mSoundManager.playSound(1); isPlayed = true; try {Thread.sleep(250); } catch (InterruptedException e) {e.printStackTrace();}} if(!isPlayed){ try {Thread.sleep(250);} catch (InterruptedException e) {e.printStackTrace();} } } return null; } I launch it via Play.setOnClickListener(new PlayClickListener()); with PlayClickListener : public class PlayClickListener implements OnClickListener { private Tutorial acti; public PlayClickListener(){ super(); } @SuppressWarnings("unchecked") public void onClick(View v) { if(Tutorial.play==0){ Tutorial.play=1; Tutorial.Play.setBackgroundResource(R.drawable.action_down); acti = new Tutorial(); Tutorial.PlayPause myPlayPause = acti.new PlayPause(); myLecture.execute(Tutorial.Buttonlist); } else { Tutorial.play=0; Tutorial.lecture.cancel(true); Tutorial.Play.setBackgroundResource(R.drawable.action); } } } But it doesn't work. when I click on buttons and I touch Play/Pause, I have this : 07-02 11:06:01.350: E/AndroidRuntime(7883): FATAL EXCEPTION: AsyncTask #1 07-02 11:06:01.350: E/AndroidRuntime(7883): Caused by: java.lang.NullPointerException 07-02 11:06:01.350: E/AndroidRuntime(7883): at com.Tutorial.Tutorial$PlayPause.doInBackground(Tutorial.java:603) 07-02 11:06:01.350: E/AndroidRuntime(7883): at com.Tutorial.Tutorial$PlayPause.doInBackground(Tutorial.java:1) And I don't know how to get rid of this error. Obviously, the Asynctask doesn't find the Buttonlist activated status, even if the list is static. I don't know how to access these buttons' states, isPressed doesn't work either. Thanks for reading and helping me !

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >