Search Results

Search found 7799 results on 312 pages for 'changing'.

Page 21/312 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Application hangs after changing language From “En-Us” to any global language in control panel

    - by user1764824
    I created a WinForms application using C#. When I try to change the culture info, my application gets hanged. Microsoft.Win32.SystemEvents.UserPreferenceChanged += new Microsoft.Win32.UserPreferenceChangedEventHandler(SystemEvents_UserPreferenceChanged); void SystemEvents_UserPreferenceChanged(object sender, Microsoft.Win32.UserPreferenceChangedEventArgs e) { if (!PreviousInstance()) { CultureInfo ObjCulture = new CultureInfo(CultureInfo.InvariantCulture.IetfLanguageTag, false); Thread.CurrentThread.CurrentCulture = ObjCulture; Application.CurrentCulture = ObjCulture; } } public void INIT() { CultureInfo objCultureInfo = null; try { objCultureInfo = new CultureInfo("en-US", false); objCultureInfo.NumberFormat.NumberDecimalSeparator = "."; objCultureInfo.NumberFormat.NegativeSign = "-"; objCultureInfo.NumberFormat.NumberNegativePattern = 1; //1 stands for -100. Application.CurrentCulture = objCultureInfo; } } After Changing Language ... My Application gets Hanged and i cant Debug anything When i Try to Evaluate things This Event Called only once.. But if try in a small application it comes every time when Language is changed... ... Nothing shown in Eventviewer either. How can I solve this problem? ..

    Read the article

  • Changing JButton background colour temporarily?

    - by sashep
    Hi, I'm super new to Java, and in need of some help. I'm making a little java desktop application where I basically have a grid of 4 JButtons ( 2 x 2 grid), and I need the background colour of individual JButtons to change, and after one second, change back to the original colour (the game I'm trying to make is like Simon, where you have to follow a pattern of buttons that light up). I have a vector that contains randomly generated numbers in the range of 1 to 4, and I want to be able to get each element from the vector and get the corresponding button to change to a different colour for one second (for example, if the vector contains 2 4 1, I would want button 2 to change, then button 4 to change, then button 1 to change). Is this possible or is there a better way to go about doing this with something other than JButtons? How do I implement this? Also, I'm running Mac OS X, which apparently (based on some things I've read on forums) doesn't like JButtons background changing (I think it's because of system look and feel), how can I change this so it works on mac? Thank you in advance for any help :)

    Read the article

  • JAVASCRIPT changing on click

    - by Webby
    Hello, Id like some help changing this javascript onclick event to just load the data on page the page load... Preferably not using the body on load tag... So obviously I'd pre set the var for term inside the script term rather than the excisting on click event.. Hope that made sense <p><a id="keywordlink" href="?term=wombats">Get keywords for wombats</a></p> <script type="text/javascript" src="keywords.js"></script> <script type="text/javascript"> var x = document.getElementById('keywordlink'); if(x){ x.onclick = function(){ var term = this.href.split('=')[1]; this.innerHTML += ' (loading...)'; KEYWORDS.get(term,seed); return false; } } function seed(o){ var div = document.createElement('div'); var head = document.createElement('h2'); head.innerHTML = 'Keywords for '+o.term; div.appendChild(head); var p = document.createElement('p'); p.innerHTML = o.toplist; div.appendChild(p); var head = document.createElement('h3'); head.innerHTML = 'Details:'; div.appendChild(head); var list = document.createElement('ol'); for(var i=0,j=o.keywords.length;i<j;i++){ var li = document.createElement('li'); li.innerHTML = o.keywords[i].term + '('+o.keywords[i].amount+')'; list.appendChild(li); } div.appendChild(list); x.parentNode.replaceChild(div,x); } </script>

    Read the article

  • Append a dynamically changing watermark to a PDF in SharePoint

    - by ccomet
    This is primarily a question of possibilities more than instructions. I'm a programming consultant working on a WSS project site system for my client. We have a document library in which files are uploaded to go through a complex approval process. With multiple stages in this process, we have an extra field which dictates what the current status of the document is. Now, my client has become enamored with the idea of PDF watermarking. He wants the document (which is already a PDF) to be affixed with a watermark corresponding to the current status, such that with each stage of the approval process the watermark will change. One method, the traditional method for PDF watermarking, of accomplishing this is to have one "clean" copy of the document somewhere hidden on the site, and create a new PDF from it that has the watermark at each stage of the approval process. Since the filename will never change, this new PDF can be uploaded continually to a public library, always overwriting the old version and simulating a "dynamically changing watermark". However, in the various stages there will also be people uploading clean copies with corrections and suggestions, nevermind the complex nature of juggling around two libraries and the fact we double the number of files stored. My client and I agree that this is not a practical path to choose. What we would like to do is be able to "modify" the watermark in a PDF, so that we only have to keep one copy of the file. Unfortunately, from what I've seen, in most cases when you make something like a watermark, which in its nature is supposed to be "unmodifyable", you won't be able to edit it later. So, is it possible to have a part of a PDF which cannot be changed by anyone who downloads the file, but can be changed as part of a workflow or other object model process? Thanks in advance!

    Read the article

  • C# : changing listbox row color?

    - by Meko
    HI. I am trying to changing backround colorof some rows on listbox.I have 2 list that one has all names and it shown on listbox.And second list has some same value with first list.I want to show that when clicking button it will search in listbox and in second list then will change color where found value. I may search in list box like for (int i = 0; i < listBox1.Items.Count; i++) { for (int j = 0; j < students.Count; j++) if (listBox1.Items[i].ToString().Contains(students[j].ToString())) { } } But I don't know which method to change appearances of row.Any help? *EDIT: * HI I made my code like private void ListBox1_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); Graphics g = e.Graphics; Brush myBrush = Brushes.Black; Brush myBrush2 = Brushes.Red; g.FillRectangle(new SolidBrush(Color.Silver), e.Bounds); e.Graphics.DrawString(listBox1.Items[e.Index].ToString(), e.Font, myBrush, e.Bounds, StringFormat.GenericDefault); for (int i = 0; i < listBox1.Items.Count; i++) { for (int j = 0; j < existingStudents.Count; j++) if (listBox1.Items[i].ToString().Contains(existingStudents[j])) { e.Graphics.DrawString(listBox1.Items[i].ToString(), e.Font, myBrush2, e.Bounds, StringFormat.GenericDefault); } } e.DrawFocusRectangle(); } Now it draws my list on listbox.But when I click button first it shows only student that in list with red color but when I click on listbox it again draws all elements.I want that it will show all element ,when I click button it will show all elements and founded element in list with red color.Whre is my mistake?

    Read the article

  • NSFetchedResultsController: changing predicate not working?

    - by icerelic
    Hi, I'm writing an app with two tables on one screen. The left table is a list of folders and the right table shows a list of files. When tapped on a row on the left, the right table will display the files belonging to that folder. I'm using Core Data for storage. When the selection of folder changes, the fetch predicate of the right table's NSFetchedResultsController will change and perform a new fetch, then reload the table data. I used the following code snippet: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"list = %@",self.list]; [fetchedResultsController.fetchRequest setPredicate:predicate]; NSError *error = nil; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } [table reloadData]; However the fetch results are still the same. I've NSLog'ed "predicate" before and after the fetch, and they were correct with updated information. The fetch results stay the same as initial fetch (when view is loaded). I'm not very familiar with the way Core Data fetches objects (is there a caching system?), but I've done similar things before(changing predicates, re-fetching data, and refreshing table) with single table views and everything went well. If someone could gave me a hint I would be very appreciated. Thanks in advance.

    Read the article

  • LookAndFeel not changing in Ubuntu

    - by Tom Brito
    Anyone knows Why the laf is not changing in the following code? (running in Ubuntu) import java.awt.Dialog; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; public class TEST extends JPanel { public TEST() { final LookAndFeelInfo[] lafArray = UIManager.getInstalledLookAndFeels(); String[] names = new String[lafArray.length]; for (int i = 0; i < names.length; i++) { names[i] = lafArray[i].getName(); } final JComboBox cb = new JComboBox(names); cb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ev) { try { int index = cb.getSelectedIndex(); LookAndFeelInfo lafInfo = lafArray[index]; String lafClassName = lafInfo.getClassName(); System.out.println(lafClassName); UIManager.setLookAndFeel(lafClassName); } catch (Exception e) { e.printStackTrace(); } } }); add(cb); } public static void main(String[] args) throws Exception { System.out.println("start"); JDialog dialog = new JDialog(null, Dialog.ModalityType.APPLICATION_MODAL); dialog.setContentPane(new TEST()); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.setVisible(true); dialog.dispose(); System.out.println("end"); } }

    Read the article

  • Value is not changing in the javascript variable on the onClick event

    - by Chetan sharma
    I am trying to implement a dynamic search jquery and php, but I am not able to change the value of a javascript variable on my onclick event. <script type="text/javascript"> var main_category = '<?php echo $main_category?>'; var main_url = '<?php echo $url?>get/' + encodeURIComponent(main_category) + '/'; var container_id = '<?php echo $unique_id?>content_area'; //name $('#<?php echo $unique_id?>search_by_name').autocomplete('<?php echo $url?>get_autocomplete_data/' + encodeURIComponent(main_category) + '/names/', { matchContains: "word", autoFill: true, width: 310 });$('#<?php echo $unique_id?>search_by_name').result(function (event, data){ var url = main_url + 'search/title/' + encodeURIComponent(data); load_div(container_id, url); }); //on click of displayed categories $('[rel="<?php echo $unique_id?>sub_category"]').click(function (){ window['main_category'] = this.title; $('#<?php echo $unique_id?>category').html('' +main_category+ ''); return false; }); }); </script> It changes the value when on click is fired //on click of displayed categories $('[rel="<?php echo $unique_id?>sub_category"]').click(function (){ window['main_category'] = this.title; $('#<?php echo $unique_id?>category').html('' +main_category+ ''); return false; }); but when after that i add data for the search it still searches for the old category $('#<?php echo $unique_id?>search_by_name').result(function (event, data){ var url = main_url + 'search/title/' + encodeURIComponent(data); load_div(container_id, url); }); "main_category" value is not changing in the "main_url"

    Read the article

  • How to prevent linq-to-sql designer undo my changing

    - by anonim.developer
    Dear All, Thanks for your attention in advance, I’ve met an issue with LINQ-2-SQL designer in VS 2008 SP1 which has made me CRAZY. I use Linq2sql as my DAL. It seems Linq2sql speeds up coding in the first step but lots of issues arise in feature specifically with table or object inheritance. In this case I have a class Entity that all other entity classes generated by Linq2sql designer inherit from. public abstract class Entity { public virtual Guid ID { get; protected set; } } public partial class User : monius.Data.Entity { } And the following generated by L2S designer (DataModel.designer.cs) [Column(Storage = "_ID", AutoSync = AutoSync.OnInsert, DbType = "UniqueIdentifier NOT NULL", IsPrimaryKey = true, IsDbGenerated = true, UpdateCheck = UpdateCheck.Never)] [DataMember(Order = 1)] public System.Guid ID { get { return this._ID; } set { if ((this._ID != value)) { this.OnIDChanging(value); this.SendPropertyChanging(); this._ID = value; this.SendPropertyChanged("ID"); this.OnIDChanged(); } } } When I compile the code VS warns me that Warning 1 'User.ID' hides inherited member 'Entity.ID'. To make the current member override that mplementation, add the override keyword. Otherwise add the new keyword. That warning is obvious and I have to change the code generated by L2S designer (DataModel.designer.cs) to […] public override System.Guid ID { … protected set … } And the code compiled with no error or warning and everyone is happy. But that is not the end of story. As soon as I made changes to entities of the diagram (dbml) or even I open dbml file to view it, any change manually I made to designer has been vanished and POOF! Redo AGAIN. That is a painful job. Now I wonder if there is a way to force L2S designer not changing portions of auto-generated code. I’ll be appreciated if someone kindly helps me with this issue.

    Read the article

  • Changing an image's ALT value with jQuery

    - by NightMICU
    Hi all, I have a modal form that changes the caption of a photo (paragraph under the image) and I am also trying to change the image's ALT attribute but cannot seem to. Here is the jQuery I am trying to make work $(".edit").click(function() { var parent = $(this).parents('.item'); var caption = $(parent).find('.labelCaption').html(); $("#photoCaption").val(caption); $("#editCaptionDialog").dialog({ width: 450, bgiframe: true, resizable: false, modal: true, title: 'Edit Caption', overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { 'Edit': function() { var newCaption = $("#photoCaption").val(); $(parent).find(".labelCaption").html(newCaption); $(parent).find('img').attr('alt', newCaption); } } }); return false; }); And the HTML <li class="item ui-corner-all" id="photo<? echo $images['id'];?>"> <div> <a href="http://tapp-essexvfd.org/gallery/photos/<?php echo $images['filename'];?>.jpg" class="lightbox" title="<?php echo $images['caption'];?>"> <img src="http://tapp-essexvfd.org/gallery/photos/thumbs/<?php echo $images['filename'];?>.jpg" alt="<?php echo $images['caption'];?>" class="photo ui-corner-all"/></a><br/> <p><span class="labelCaption"><?php echo $images['caption'];?> </span></p> <p><a href="edit_photo.php?filename=<?php echo $images['filename'];?>" class="button2 edit ui-state-default ui-corner-all">Edit</a></p> </div> </li> The caption is changing like it should. Thanks

    Read the article

  • Changing character encoding in MySQL, PHP scripts, HTML

    - by Sandman
    So, I have built on this system for quite some time, and it is currently outputting Latin1 (ISO-8859-1) to the web browser, and this is the components: MySQL - all data is stored with the Latin1 character set PHP - All PHP text files are stored on disk with Latin1 encoding HTML - The output has the http-equiv="content-type" content="text/html; charset=iso-8859-1" meta tag So, I'm trying to understand how the encoding of the different parts come into play in my workflow. If I open a PHP script and change its encoding within the text editor to UTF-8 and save it back to disk and reload the web browser, the text is all messed up - unless the text comes from the DB. If I change the encoding of the DB to UTF-8 and keep the PHP files in latin1 I have to use utf8_decode() for the data to display correctly. And if I change the HTML code the browser will read it incorrectly. So yeah, I realise that if I want to "upgrade" to UTF8, I have to update all three parts of this setup for it to work correctly, but since it's a huge system with some 180k lines of PHP code and millions of posts in a lot of databases/tables, I don't want to start something like this without understanding everything correctly. What haven't I thought about? What could mess this up beyond fixing? What are the procedures for changing the encoding of an entire MySQL installation and what's the easiest way to change the encoding of hundreds or thousands of PHP files on disk? The META tag is luckily added dynamically, so I'll change that in one place only :) Let me hear about your experiences with this.

    Read the article

  • Arrow keys and changing control's focus hang the application

    - by sthay
    I have a usercontrol that contains a FlowLayoutPanel (topdown flow) with a bunch of radiobuttons. The control exposes a CheckedChanged event that fires whenever one of the radiobuttons's check changed. My form contains the usercontrol and a textbox. I subscribe the usercontrol's CheckedChanged event and depending on which radiobutton gets checked, I either disable the textbox or put a focus inside the textbox. All this works fine with mouseclick when changing the radiobutton's check state. However, this will hang indefinitely when using the arrow keys. I don't understand why the difference. The following are steps to reproduce the behavior I'm seeing: Create a usercontrol and drop a FlowLayoutPanel control and set its FlowDirection = TopDown. Then add two radiobuttons to the FlowLayoutPanel. Provide an event handler in the usercontrol public event EventHandler CheckedChanged { add { radioButton2.CheckedChanged += value; } remove { radioButton2.CheckedChanged -= value; } } Create a windows form and drop the above user control. Add a textbox and set Enabled to False. Subscribe to the usercontrol's CheckedChanged event as follows private void userControl11_CheckedChanged(object sender, EventArgs e) { textBox1.Select(); } Run. Notice that if you use the mouse to click between the radiobuttons, thing works fine; but it will crash if you use the up/down arrow keys.

    Read the article

  • SIGABRT on iPhone when changing xib

    - by Boz
    I've just finished off an app for the iPhone which, until today, ran fine on the iPhone simulator and actual devices. I tried changing the xib which is loaded in the applicationDidFinishLaunching method in my application delegate class - all I did was change the string in initWithNibName. When I launch the app on the simulator, the Default.png image is shown, then the app crashes with an uncaught exception. When running on a device, the Default.png image is shown for about 10 seconds, the UI is never loaded and I get 'GDB: Program received signal: "SIGABRT".' on the Xcode status bar. Debugging shows that applicationDidFinishLaunching is never actually reached before the app crashes. Setting the starting xib back to the original solves the issue, but now I've made a change and saved it in the Interface Builder and the app shows the same issues as above - I've made no code changes at all. Is this a memory issue, or a known issue of a common mistake? NOTE: I've made no code changes whatsoever, and the only changes I've made to the xib are cosmetic, the IBOutlets are all intact.

    Read the article

  • Max Daily Budget exceeded and Billing Status "Changing Daily Budget"

    - by draftpik
    We've exceeded the Max Daily Budget for our app, but we can't increase the budget due to a serious flaw in Google's billing system. Google App Engine and Google Wallet do not have very capable support for multiple sign-in. As a result, I went to change the budget, but it used the wrong Google Wallet account (a different Google Account I was signed in as). I had to go back and try again, but now our GAE app shows the following status: Billing Status: Changing Daily Budget Your account has been locked while we process your budget changes. If you were redirected to Google Checkout but did not complete the process, your settings will remain unchanged. (You will be able to make changes to your budget settings again once the outstanding payment is processed.) Now I'm completely prevented from making any billing changes, our app is shut off (over quota), and I have NOTHING I can do to fix it. This is a seriously fundamental flaw in App Engine's billing system and Google Wallet integration. Has anyone run into this before? Is there a workaround anyone is aware of? Right now, our production app is completely down thanks to this issue. Any help you can offer would be greatly appreciated? If you're from Google and you might be able to help on the backend, our app id is "nhldraftpik". Thanks! Brian

    Read the article

  • Changing Apache2.2.11 httpd.conf has no effect

    - by Adrian
    Hi, Hopefully someone can help here. I recently installed wampserver ver 2.0 with Apache ver 2.2.11. My issue is, I have some large php scripts which timeout at the default 5 min (300 sec) browser limit (I'm using ie8). It is critcal I get this limit extended. I have tried changing the httpd.conf file to include the following: TimeOut 1200 My objective was to set the timeout at 1200 seconds, or 20 min. I had just chosen a random location to place this directive within the httpd.conf file as I cannot locate any documentation to suggest it belongs in a specific place within the file. Regardless, the changes I make appear in the httpd.conf file that can be found in the system tray for wampserver, however they have no effect - the browser still times out after 5 minutes. I thought perhaps I had the capitals incorrect, so I changed to: Timeout 1200 This change had no effect either. Can someone please help, this is very frustrating. Maybe the command can only be used within a specific module? If so, I have no idea which one, nor do I know the syntax to specify this. Regards Adrian.

    Read the article

  • Nokogiri changing custom elements

    - by dagda1
    Hi, I have sample html that I have marked up with some special tags that will be used by a different program, an example of the html is below. You should note the <START:organization>..<END> elements. <html> <head/> <body> <ul> <li> <START:organization> Advanced Integrated Pest Management <END> </li> <li> <START:organization> American Bakers Association <END> </li> </ul> </body> </html> I wanted to use nokogiri to preprocess the html to easily remove irrelevant tags like <script>. I created the following extension to the nokogiri document class: module Nokogiri module HTML class Document def prepare_html xpath("//script").remove to_html.remove_new_lines end end end end The problem is that nokogiri is changing the <START:organization> element to <organization>. Is there anyway that I can preserve the htnl to maintain my custom markup tags? Thanks Paul

    Read the article

  • Windows Phone 8 Panorama SelectionIndex not changing on swiping through items

    - by Balraj Singh
    I have created Panorama control and binded PanoramaItem from ItemSource. Now when i am changing the selected Panoramaitem by swiping over them the Selected index is always set to -1. I dont know what wrong i am doing while implementation. neither selectionchange event is getting fired. Code: <phone:Panorama Grid.Row="1" Visibility="Visible" x:Name="PnrVwMainNews" ItemsSource="{Binding ParnormaItemsData}" ItemContainerStyle="{StaticResource PanoramaContainerItemStyle}"> <phone:Panorama.ItemTemplate> <DataTemplate> <!-- Panorma Items Template --> <Controls:DynamicContentControl Content="{Binding UsrCntrlDynamic}" /> </DataTemplate> </phone:Panorama.ItemTemplate> </phone:Panorama> PanoramaContainerItemStyle <Style x:Key="PanoramaContainerItemStyle" TargetType="phone:PanoramaItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="VerticalContentAlignment" Value="Stretch" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="phone:PanoramaItem"> <Grid Background="{TemplateBinding Background}" Margin="12,0,0,0"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • C# Changing Objects within a List

    - by kwong22
    Hi, I'm having a little problem changing members of an object in a list using a found index. So this is the method I am currently working with: static void addToInventory(ref List<baseItem> myArray, baseItem item, float maxAmount, ref float currentAmount) { if (currentAmount + item.getWeight() <= maxAmount) { Console.WriteLine("item.Quantity = {0}", item.Quantity); if (myArray.Contains(item)) { Console.WriteLine("Item ({0}) already exists", item.Name); int id = myArray.IndexOf(item); myArray[id].Quantity += item.Quantity;//Change occurs in this line, item.Quantity becomes the same as myArray[id].Quantity } else { Console.WriteLine("Adding new item ({0})", item.Name); myArray.Add(item); } currentAmount += item.getWeight(); } else { Console.WriteLine("Inventory full"); } myArray.Sort(); } This method takes several parameters including the inventory/list. I check if the item fits in and if it does, I see if there is another item of the same name in the list, find the index, and add more of the item. However, the quantity of the item added suddenly becomes the same as the quantity of the item in the list. For some reason, this also changes the quantity of the item outside of the list. So therefore, instead of quantities adding up like this: 1, 2, 3, 4, they add up like this: 1, 2, 4, 8. I've just started to learn how to use lists so if there is anything I'm missing, don't hesitate to criticize. Thanks in advance.

    Read the article

  • "reset" cells after changing orientation

    - by Christian
    Hi, I added the interfaceOrientation to my app. It works fine concerning the views. Some of the table-cells I defined by CGRects to position the text in the cell. In portrait-mode the cell is 300px long, in landscape-mode 420px. I use the following code to change the CGRects depending the orientation: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (self.interfaceOrientation == UIDeviceOrientationPortrait) { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 300, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]initWithFrame:keyLabelRect]; keyLabel.tag = 100;......... } else { NSString *currentLanguage = [[NSString alloc] initWithContentsOfFile:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/sprache.txt"]]; static NSString *TableViewTableCellIdentifier = @"TableViewTableCellIdentifier"; UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:TableViewTableCellIdentifier]; CGRect cellRect = CGRectMake(0, 0, 450, 175); cell.backgroundColor = [UIColor darkGrayColor]; cell = [[[UITableViewCell alloc] initWithFrame:cellRect reuseIdentifier:TableViewTableCellIdentifier] autorelease]; CGRect keyLabelRect = CGRectMake(0, 5, 5, 20); UILabel *keyLabel = [[UILabel alloc]..... My problem is, when the table is visible and the orientation is changed, I need to scroll to see the new "layout". How can I manage to "reload" the view after changing the orientation?

    Read the article

  • Retruning reference to object not changing the address in c++

    - by ashish-sangwan
    I am trying to understand function returning reference. For that i have written a simple program :- include using namespace std; class test { int i; friend test& func(); public: test(int j){i=j;} void show(){cout< }; test& func() { test temp(10); return temp; //// Address of temp=0xbfcb2874 } int main() { test obj1(50); // Address of obj1=0xbfcb28a0 func()=obj1; <= Problem:The address of obj1 is not changing obj1.show(); // // Address of obj1=0xbfcb28a0 return 0; } I run the program using gdb and observed that the address of obj1 still remains same but i expect it to get changed to 0xbfcb2874. I am not clear with the concept. Please help. Thanks in advance

    Read the article

  • Returning reference to object is not changing the address in c++

    - by ashish-sangwan
    I am trying to understand functions returning a reference. For that I have written a simple program: #include<iostream> using namespace std; class test { int i; friend test& func(); public: test(int j){i=j;} void show(){cout<<i<<endl;} }; test& func() { test temp(10); return temp; //// Address of temp=0xbfcb2874 } int main() { test obj1(50); // Address of obj1=0xbfcb28a0 func()=obj1; <= Problem:The address of obj1 is not changing obj1.show(); // // Address of obj1=0xbfcb28a0 return 0; } I ran the program using gdb and observed that the address of obj1 still remains same, but I expect it to get changed to 0xbfcb2874. I am not clear with the concept. Please help.

    Read the article

  • Oddities in Linq-to-SQL generated code related to property change/changing events

    - by Lasse V. Karlsen
    I'm working on creating my own Linq-to-Sql generated classes in order to learn the concepts behind it all. I have some questions, if anyone knows the answer to one or more of these I'd be much obliged. The code below, and thus the questions, are from looking at code generated by creating a .DBML file in the Visual Studio 2010 designer, and inspecting the .Designer.cs file afterwards. 1. Why is INotifyPropertyChanging not passing the property name The event raising method is defined like this: protected virtual void SendPropertyChanging() Why isn't the name of the property that is changing passed to the event here? It is defined to be part of the EventArgs descendant that is passed to the event handler, but the method only passes an empty such value to it. 2. Why are the EntitySet<X> attach/detach methods not raising property changed? For an EntitySet<X> reference, the following two methods are generated: private void attach_EmailAddress1s(EmailAddress1 entity) { this.SendPropertyChanging(); entity.Person1 = this; } private void detach_EmailAddress1s(EmailAddress1 entity) { this.SendPropertyChanging(); entity.Person1 = null; } Why isn't SendPropertyChanged also called here? I'm sure I have more questions later, but for now these will suffice :)

    Read the article

  • My IF statement is changing variables in PHP

    - by user1902509
    I am fairly new to the whole programming thing, so forgive me if this is a stupid question. It seems odd that I haven't run into it before. I am trying to make an order form for a cake. You fill out the form, submit it, and it will then display the order in a new window, where you then hit "submit," and upload it to the Database. I have a series of If Statements to check for errors in the form before submitting it. Here is a simplified version of the code. Writing means any writing you want on the cake, Name is your name, and cake is what type of cake you want (the default is "None"). try { $name = trim($params->name); $cake = trim($params->cake); $writing = trim($params->writing); if (strlen($name) < 3){ throw new Exception("Please enter Your name."); } if ($cake = "None") { throw new Exception("Please select a Cake" } if ($cake = "Caramel Apple Pie" or $cake = "Pumpkin Pie" or $cake = "Eggnog Pie" and strlen($writing) > 1) { throw new Exception("We are sorry, but you can't write on any of our specialty pies."); } } catch(Exception $x) { $error = $x->getmessage(); } So what is happening is that when I go and hit submit the first time, the correct cake type comes up, but when you submit it the second time, the error comes up saying that I have "None" selected. All the other values are there and remain the same. I think the problem is that the first "IF" statement (Where it says "If($cake = "None")) is automatically changing $cake to "None" because I have tried commenting just that statement out, and it will then change the cake to be "Caramel Apple Pie," which is in the top of the next IF statement. Anyone know why it is doing this? And how to fix it?

    Read the article

  • Removing Item from Collection / Changing field of Object

    - by x Nuclear 213
    public void searchOwner(List<Appointments> appts, String owner) { Appointments theOne = null; for (Appointments temp : appts) { if (owner.equalsIgnoreCase(temp.owner.name)) { System.out.println(temp.data); temp.setResolved(true); } } } public void checkRemoval() { for (Appointments appts : appointments) { if (appts.resolved == true) { appointments.remove(appts); } //Iterator method used before enhanced for-loop public void checkRemovalI(){ Iterator<Appointments> it = appointments.iterator(); while(it.hasNext()){ if(it.next().resolved = true){ it.remove(); } } } So far this is where I am encountering my problem. I am trying to check the arrayList of Appointments and see if the field (resolved) is set to true, however I am receiving an ConcurrentModification exception during the searchOwner method when trying to set resolved = to true. I've tried using an Iterator in checkRemoval instead of an enhanced for-loop however that didn't help either. I really only need to get the part where the appointment is set to true to work, the checkRemoval seemed to be working early before implementing the changing of the boolean resolved. Any help will be greatly appreciated, thank you.

    Read the article

  • android costumized button problem with changing text color

    - by alaxid
    Hi, I made a button that changes the background drawable on different states, this way: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/btn_location_pressed" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/btn_location_pressed"/> <!-- focused --> <item android:drawable="@drawable/btn_location"/> <!-- default --> The problem here is that I'm also trying to change the textColor as I do with the drawable but I'm not being able to. I already tried android:textColor and android:color but the first doesn't work whilst the seconds changes my background. The next code is part of my layout. Regarding to the text color it only works for the normal state text color, thus not changing it to the white one while pressed <Button android:id="@+id/location_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="5dp" android:background="@drawable/location" android:textSize="15sp" android:textColor="@color/location_color" android:textColorHighlight="#FFFFFF" /> As anybody got a clue? ty! :)

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >