Search Results

Search found 20 results on 1 pages for 'shashi'.

Page 1/1 | 1 

  • mocking superclass protected variable using jmockit

    - by shashi
    Hi, I couldnt able to mock the protected varibale defined in the superclass.i could able to mock the protected method in superclass but couldnt to mock the protected variable in to the subclass ,wherein am writing the testcase for subclass,Please if anybody out there has any soluton for it .please reply. Thanks Shashi

    Read the article

  • Iphone SDK - adding UITableView to UIView

    - by Shashi
    Hi, I am trying to learn how to use different views, for this sample test app, i have a login page, upon successful logon, the user is redirected to a table view and then upon selection of an item in the table view, the user is directed to a third page showing details of the item. the first page works just fine, but the problem occurs when i go to the second page, the table shown doesn't have title and i cannot add title or toolbar or anything other than the content of the tables themselves. and when i click on the item, needless to say nothing happens. no errors as well. i am fairly new to programming and have always worked on Java but never on C(although i have some basic knowledge of C) and Objective C is new to me. Here is the code. import @interface NavigationTestAppDelegate : NSObject { UIWindow *window; UIViewController *viewController; IBOutlet UITextField *username; IBOutlet UITextField *password; IBOutlet UILabel *loginError; //UINavigationController *navigationController; } @property (nonatomic, retain) IBOutlet UIViewController *viewController; @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITextField *username; @property (nonatomic, retain) IBOutlet UITextField *password; @property (nonatomic, retain) IBOutlet UILabel *loginError; -(IBAction) login; -(IBAction) hideKeyboard: (id) sender; @end import "NavigationTestAppDelegate.h" import "RootViewController.h" @implementation NavigationTestAppDelegate @synthesize window; @synthesize viewController; @synthesize username; @synthesize password; @synthesize loginError; pragma mark - pragma mark Application lifecycle -(IBAction) hideKeyboard: (id) sender{ [sender resignFirstResponder]; } (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch //RootViewController *rootViewController = [[RootViewController alloc] init]; //[window addSubview:[navigationController view]]; [window addSubview:[viewController view]]; [window makeKeyAndVisible]; return YES; } -(IBAction) login { RootViewController *rootViewController = [[RootViewController alloc] init]; //NSString *user = [[NSString alloc] username. if([username.text isEqualToString:@"test"]&&[password.text isEqualToString:@"test"]){ [window addSubview:[rootViewController view]]; //[window addSubview:[navigationController view]]; [window makeKeyAndVisible]; //rootViewController.awakeFromNib; } else { loginError.text = @"LOGIN ERROR"; [window addSubview:[viewController view]]; [window makeKeyAndVisible]; } } (void)applicationWillTerminate:(UIApplication *)application { // Save data if appropriate } pragma mark - pragma mark Memory management (void)dealloc { //[navigationController release]; [viewController release]; [window release]; [super dealloc]; } @end import @interface RootViewController : UITableViewController { IBOutlet NSMutableArray *views; } @property (nonatomic, retain) IBOutlet NSMutableArray * views; @end // // RootViewController.m // NavigationTest // // Created by guest on 4/23/10. // Copyright MyCompanyName 2010. All rights reserved. // import "RootViewController.h" import "OpportunityOne.h" @implementation RootViewController @synthesize views; //@synthesize navigationViewController; pragma mark - pragma mark View lifecycle (void)viewDidLoad { views = [ [NSMutableArray alloc] init]; OpportunityOne *opportunityOneController; for (int i=1; i<=20; i++) { opportunityOneController = [[OpportunityOne alloc] init]; opportunityOneController.title = [[NSString alloc] initWithFormat:@"Opportunity %i",i]; [views addObject:[NSDictionary dictionaryWithObjectsAndKeys: [[NSString alloc] initWithFormat:@"Opportunity %i",i], @ "title", opportunityOneController, @"controller", nil]]; self.title=@"GPS"; } /*UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] init]; temporaryBarButtonItem.title = @"Back"; self.navigationItem.backBarButtonItem = temporaryBarButtonItem; [temporaryBarButtonItem release]; */ //self.title =@"Global Platform for Sales"; [super viewDidLoad]; //[temporaryBarButtonItem release]; //[opportunityOneController release]; // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem; } pragma mark - pragma mark Table view data source // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [views count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Configure the cell. cell.textLabel.text = [[views objectAtIndex:indexPath.row] objectForKey:@"title"]; return cell; } pragma mark - pragma mark Table view delegate (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //UIViewController *targetViewController = [[views objectAtIndex:indexPath.row] objectForKey:@"controller"]; UIViewController *targetViewController = [[views objectAtIndex:indexPath.row] objectForKey:@"controller"]; [[self navigationController] pushViewController:targetViewController animated:YES]; } pragma mark - pragma mark Memory management (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Relinquish ownership any cached data, images, etc that aren't in use. } (void)viewDidUnload { // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. // For example: self.myOutlet = nil; } (void)dealloc { [views release]; [super dealloc]; } @end Wow, i was finding it real hard to post the code. i apologize for the bad formatting, but i just couldn't get past the formatting rules for this text editor. Thanks, Shashi

    Read the article

  • How to get image URI

    - by Shashi
    Hi I am developing a simple application. I have an image stored in sdcard. In one activity I am displaying that image using imageview.setImageUri() .... Now on clicking on that Image I want to retrieve uri of that image and want to store it in sqlite database... can anybody tell me how that is possible.

    Read the article

  • how to check only one item in checkedlistbox

    - by Shashi Jaiswal
    I have check list box control and i want to select only one item at a time and i am currently using this code to do the same. private void CLSTVariable_ItemCheck(object sender, ItemCheckEventArgs e) { // Local variable int ListIndex; CLSTVariable.ItemCheck -= CLSTVariable_ItemCheck; for (ListIndex = 0; ListIndex < CLSTVariable.Items.Count; ListIndex++) { // Unchecked all items that is not currently selected if (CLSTVariable.SelectedIndex != ListIndex) { // set item as unchecked CLSTVariable.SetItemChecked(ListIndex, false); } // if else { // set selected item as checked CLSTVariable.SetItemChecked(ListIndex, true); } } // for CLSTVariable.ItemCheck += CLSTVariable_ItemCheck; } this code is working fine. but problem is that when i click again and again on selected item then that selected item should not be unchecked, means at least one item should be checked always...

    Read the article

  • How to close InAppBrowser itself in Phonegap Application?

    - by Shashi
    I am developing Phonegap application and currently i am using InAppBrowser to display external pages. On some of the external pages I place a close button and i want to close the InAppBrowser itself. because InAppBrowser displays these pages that is why the reference of it is not accessed on itself to close it and Please do not suggest me to use ChildBrowser Plugin. window.close(); //Not Worked for me or iabRef.close(); //Also not Worked for me because iabRef is not accessible on InAppBrowser. It is created on Parent Window Some of the Android device and iOS device display a Done Button to close it. As well as the iPad also display the Done button. but in Case of Android tablet there is not any kind of button to close it. UPDATE :- Here is my full code :- var iabRef = null; function iabLoadStart(event) { } function iabLoadStop(event) { } function iabClose(event) { iabRef.removeEventListener('loadstart', iabLoadStart); iabRef.removeEventListener('loadstop', iabLoadStop); iabRef.removeEventListener('exit', iabClose); } function startInAppB() { var myURL=encodeURI('http://www.domain.com/some_path/mypage.html'); iabRef = window.open(myURL,'_blank', 'location=yes'); iabRef.addEventListener('loadstart', iabLoadStart); iabRef.addEventListener('loadstop', iabLoadStop); iabRef.addEventListener('exit', iabClose); }

    Read the article

  • Ground Control by David Baum

    - by JuergenKress
    As cloud computing moves out of the early-adopter phase, organizations are carefully evaluating how to get to the cloud. They are examining standard methods for developing, integrating, deploying, and scaling their cloud applications, and after weighing their choices, they are choosing to develop and deploy cloud applications based on Oracle Cloud Application Foundation, part of Oracle Fusion Middleware. Oracle WebLogic Server is the flagship software product of Oracle Cloud Application Foundation. Oracle WebLogic Server is optimized to run on Oracle Exalogic Elastic Cloud, the integrated hardware and software platform for the Oracle Cloud Application Foundation family. Many companies, including Reliance Commercial Finance, are adopting this middleware infrastructure to enable private cloud computing and its convenient, on-demand access to a shared pool of configurable computing resources. “Cloud computing has become an extremely critical design factor for us,” says Shashi Kumar Ravulapaty, senior vice president and chief technology officer at Reliance Commercial Finance. “It’s one of our main focus areas. Oracle Exalogic, especially in combination with Oracle WebLogic, is a perfect fit for rapidly provisioning capacity in a private cloud infrastructure.” Reliance Commercial Finance provides loans to tens of thousands of customers throughout India. With more than 1,500 employees accessing the company’s core business applications every day, the company was having trouble processing more than 6,000 daily transactions with its legacy infrastructure, especially at the end of each month when hundreds of concurrent users need to access the company’s loan processing and approval applications. Read the complete article here. WebLogic Partner Community For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Wiki Technorati Tags: WebLogic,WebLogic Community,Oracle,OPN,Jürgen Kress

    Read the article

1