Hi,
I am looking for a way of preventing the deleting of one of my cells. (no delete button should appear next to the cell when the table view is in editing mode)
How can this be made possible?
Thanks :)
I have a tab-bar controller that loads a RootView.
The RootView has 4 buttons that will load a UITableView
I don't want my tab-bar to be visible in the RootView so I added the following code:
-(void)viewDidLoad{
self.hidesBottomBarWhenPushed = YES;
}
When I initially load the app the tab-bar doesn't appear, but when I click on a button, and go back to the RootView the tab-bar still appears. I have tried placing this code in viewWillAppear and other application lifecycle methods but no luck.
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
Please email me at [email protected]
I am using AppleScript to close windows in Google Sketchup as follows:
$ osascript -e 'tell application "SketchUp" to close window 1'
When I close the window, the program prompts me to save, and there is a dialog box with buttons "Don't Save", "Cancel", and "Save...".
How do I make my script click on the "Don't Save" button in this situation?
Also, if there is a better way of closing the window, I'm all ears.
When globalizing a wpf application with static resx classes, it's very easy to miss the odd label or button that has its Content property set to a hard coded string in a particular language, ie English. These should of course be moved off to a {x:Static ...} so they can be localised for each culture.
Are there any tools which can spot this and warn you? Built in to VS would be ideal, but I'm thinking that 'style cop' type build tools would do the job as well.
The problem in this code is that when it's run and I push "Yes" button, This is shown:
This means that my application stopped working, I just want it to end.
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
string message = "An unhandled exception has ocurred, do you want close the app?";
MessageBoxResult currentMB = MessageBox.Show(message, "SomeTitleApp", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
if (currentMB == MessageBoxResult.Yes)
{ Application.Current.Shutdown(); }
else
{ e.Handled = true; }
}
Hi All,
I am trying to get values from adjacent columns, when a radio button is clicked for that row.
I'm able to do so, but the problem I'm facing, when there are more elements in the radio button column, then i am getting null values(i.e 2nd row is not working). Please help...Code is all follows
<table id="dist_list" class="data">
<tbody>
<tr>
<td>
<input type="radio" value="636406" name="distRG" id="radio_7" /></td>
<td class="selected">Company 1</td>
<td class="siteId">1234</td>
<td class="siteName">First Company Name</td>
</tr>
<!-- Not able to get values from this row, since there are more elements in it -->
<tr>
<td>
<span class="jqTransformRadioWrapper"><a rel="distRG" class="jqTransformRadio" href="#"></a>
<input type="radio" value="636406" name="distRG" id="radio_2" />
</span></td>
<td class="selected">Company 2</td>
<td class="siteId">2345</td>
<td class="siteName">Second Company Name</td>
</tr>
<tr>
<td><input type="radio" value="636406" name="distRG" id="radio_3" /></td>
<td class="selected">Company 3</td>
<td class="siteId">3456</td>
<td class="siteName">Third Company Name</td>
</tr>
<tr>
<td><input type="radio" value="213584" name="distRG" id="radio_4" /></td>
<td class="selected">Company 4</td>
<td class="siteId">4567</td>
<td class="siteName">Fourth Company Name</td>
</tr></tbody></table>
jQuery script
$("input[name=distRG]").click(function() {
var owner = $(this).parent().siblings('td.selected').text();
var siteId = $(this).parent().siblings('td.siteId').text();
var siteName = $(this).parent().siblings('td.siteName').text();
alert(owner);
alert(siteId);
alert(siteName);
});
I have a parent page and a child page.
By using window.opener.parent property,I am able to read the parent page content and display it in the child page.(There is a PREVIEW button on parent page,on click of which the child page opens up as a popup and displays the content of parent page controls.)
This functionality was working fine in IE7/Mozilla/IE6 but I am unable to locate why its not workin with IE8. Can anyone please help?
I need to do something similar, where an animation highlights the text of a button to show that it must be slided to do something. Just like that unlock thing on the iPhone. How is that done? Is there a tutorial how to achieve this effect?
I've got a custom component that has children components dynamically added and removed to it depending on what button the user clicks. What I would like to do is trigger a transition effect that moves the child component onto the stage when it's added and then moves it off when it's removed.
Does anyone have a good example on how to accomplish this?
Edit: I figured it out and left my solution below. I hope it helps someone else!
i have attached my sample project here,
http://cid-08ec3041618e8ee4.skydrive.live.com/self.aspx/.SharedFavorites/dep2.rar
Can any one look and tell whats wrong in that,
everythng working well, but i cant bind the value in text box,
when u click the button u can see the passed value to usercontrol in message box, but i cant bind that value in text box.
Why????
I have a fairly complex asp.net page based on UpdatePanels and jQuery UI. Unfortunately, when the panels update, the jQuery UI widgets leak memory like crazy in ie7, even if I manually 'destroy' them. Does anyone know a technique/patch to prevent these leaks? I've created a simple example page with a slider inside an UpdatePanel. Just click the 'Leak' button and refresh the page to see the leak in sieve.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Leak2.aspx.cs" Inherits="Leak2" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Leak</title>
<link type="text/css" href="/jquery/css/custom-theme/jquery-ui-1.7.2.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="/jquery/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/jquery/js/jquery-ui-1.7.2.custom.min.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function initializeSlider() {
$(".slider").slider({
min: 0,
max: 100,
value: 100,
step: 5
});
}
$(document).ready(function() {
initializeSlider();
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {
initializeSlider();
});
});
</script>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div style="width: 300px;">
<div class="slider"></div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Leak" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Hi All,
I am working on page(Lesson) has button called "AddToFavorite".
when i click on this button lessonID,lessonHeading is added in the Coredata.
- (NSFetchedResultsController *)fetchedResultsController {
// Set up the fetched results controller if needed.
if (fetchedResultsController != nil) {
return fetchedResultsController;
}
// Create the fetch request for the entity.
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
// Edit the entity name as appropriate.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Favorites" inManagedObjectContext:managedObjectContext];
[fetchRequest setEntity:entity];
// Edit the sort key as appropriate.
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lessonHeading" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
[fetchRequest setSortDescriptors:sortDescriptors];
NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:@"lessonHeading" cacheName:@"Root"];
self.fetchedResultsController = aFetchedResultsController;
self.fetchedResultsController.delegate = self;
[aFetchedResultsController release];
[fetchRequest release];
[sortDescriptor release];
[sortDescriptors release];
return fetchedResultsController;
}
-(void)addToFavorites
{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:nil message:@"Lesson has been added successfully to your Favorite List" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
//Create a new managed object context for the new book -- set its persistent store coordinator to the same as that from the fetched results controller's context.
NSManagedObjectContext *addingContext = [[NSManagedObjectContext alloc] init];
self.addingManagedObjectContext = addingContext;
[addingManagedObjectContext setPersistentStoreCoordinator:[[fetchedResultsController managedObjectContext] persistentStoreCoordinator]];
Favorites *fav = [NSEntityDescription insertNewObjectForEntityForName:@"Favorites" inManagedObjectContext:addingContext];
fav.lessonID=[[data objectAtIndex:count]objectForKey:@"LessonID"];
fav.lessonTitle=[[data objectAtIndex:count]objectForKey:@"LessonTitle"];
[self didFinishWithSave:YES];
[addingContext release];
}
My problem is that i want to show an alert if this lessonID is already existing in the
coreData.
show guide me how i can match the current page lessonID with the existing lessonID's in the CoreData.
I am using CoreData 1st time.so sory for any mistake ...& thanks for ypur help frnds.
I have a problem with a TextBox in an application...
A window has a Grid with two columns. The left column contains a control with a constant width but with a height that adapts. The right column contains a TextBox that takes up all remaining space in the Grid (and thereby in the Window).
The Grid is given a minimal width and height and is wrapped within a ScrollViewer. If the user resizes the window to be smaller than the minimal widht/height of the Grid, scrollbars are displayed.
This is exactly how I want it to be. However, a problem occurs when the user starts typing text. If the text is to long to fit in one line in the TextBox, I want the text to wrap. Therefore I set TextWrapping="Wrap" on the TextBox. But since the TextBox has an automatic width and is wrapped in a ScrollViewer (its actually the whole Grid that is wrapped), the TextBox just keeps expanding to the right.
I do want the TextBox to expand if the window is expanded, but I don't want the TextBox to expand by the text. Rather the text should wrap inside the available TextBox. If the text don't fit within the TextBox height, a scrollbar should be displayed within the TextBox.
Is there a way to accomplish this?
Below is some code that shows my problem.
<Window x:Class="AdaptingTextBoxes.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="300" Width="400" Background="DarkCyan">
<Grid Margin="10" Name="LayoutRoot">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Grid MinWidth="300" MinHeight="200">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Margin="0,0,10,0" Content="Button" Width="100" />
<TextBox Grid.Column="1" AcceptsReturn="True" TextWrapping="Wrap" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" />
</Grid>
</ScrollViewer>
</Grid>
</Window>
I am very new to XAML and WPF.I have a problem.
I have two files. first.xaml and second.Xaml. There is a button in first.xaml, on click of which it should navigate to second.xaml.How do i achieve this.
I have created a site where people can create a profile. But I am trying to figure out how to start on making an add friend button so users can have friends.
In my user table, i have user_id, first_name, last_name, email, etc.
Should I somehow relate the user_id of the user and the friend in a friend table?
I am a novice to programming, so these things are still new to me. Thanks!
Hi All,
I am New to the iPhone Development. How can i carry a string value from view2 to view1 when using navigation bar. I have no problem in carrying string values from view1 to view2 to view3 to....by using pushviewcontroller But when i come back to previous views using Back button of navigation bar, I cannot able to hold string values.
I need your help in solving this issue.
Thanks In Advance
I have a very simple application. There is a refresh button, everytime it is being clicked, the adapter will call notifyDataSetChanged() to update a ListView. However, I got IllegalStateException all the time. Any quick solution? Thanks.
When click on particular uesr in list and select the show map button then it show the map with an icon but this icon is not deleted from the screen it continously.but i don't want that icon for this what can i do?Thanks in advance
I want a simple form with one text box and a submit button. If a user enters "foobar" into the text box and hits enter, they should be redirected to mysite.com/browse/foobar
Does anyone know how I can do this in php? thanks
I have a criteria page in my asp.net application. When user clicks report button, firstly in a new page results are binded to a datagrid, then this page is exported to excel file with changing content type method.
That normally works, but when large amount of data comes, system.outofmemoryexception is thrown.
Does anyone know a way to fix this problem, or another usefull technic to do?