Search Results

Search found 114 results on 5 pages for 'warrior'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • How to get spacing between characters printed using TextOut ?

    - by life-warrior
    I'm trying to calcuate size of each cell (containing text like "ff" or "a0"), so that 32 cells will fit into window by width. However, charWidth*2 doesn' represent the width of a cell, since it doesn't take spacing between characters in the account. How can I obtain size of a font so that 32 cells each is two chars like "ff" fit exactly into window's client area ? Curier is fixed-width font. RECT rect; ::GetClientRect( hWnd, &rect ); LONG charWidth = (rect.right-rect.left)/BLOCK_SIZE/2-2; int oldMapMode = ::SetMapMode( hdc, MM_TEXT ); HFONT font = CreateFont( charWidth*2, charWidth, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FF_ROMAN, _T("Courier") ); HGDIOBJ oldFont = ::SelectObject( hdc, font ); for( int i = 0; i < BLOCK_SIZE; ++i ) { CString str; str.Format( _T("%.2x"), (unsigned char)*(g_memAddr+i) ); SIZE size; ::TextOut( hdc, (size.cx+2)*i+1, 1, str, _tcslen((LPCTSTR)str) ); }

    Read the article

  • Delegates does not work properly

    - by Warrior
    I am new to iPhone development. I am converting the date to the desired format and set it to the delegate and get its value in the another view. The session restarts when I tried to get the value from delegate. If I set the original date and not the formatted date in the set delegate, then i able to get the value in the another view. If I also give any static string value, then also I am able to the static string value back. Only the formatted date which is string is set then the session restarts. If i print and check the value of the formatted date it prints the correct formatted date only.Please help me out.Here is my code for date conversion NSString *dateval=[[stories objectAtIndex: storyIndex] objectForKey:@"date"]; NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init]; [inputFormatter setDateFormat:@"EEE, MMM dd, yyyy"]; NSDate *inputDate = [inputFormatter dateFromString:dateval]; NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"MMMM dd"]; NSString *outputDate = [outputFormatter stringFromDate:inputDate]; AppDelegate *delegate=(AppDelegate *)[[UIApplication sharedApplication]delegate]; [delegate setCurrentDates:outputDate]; EDIT: This is displayed in console inside view did load [Session started at 2010-04-21 19:12:53 +0530.] GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:11:58 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all Attaching to process 4216. (gdb) In another view - (void)viewDidLoad { NSLog(@"inside view did load"); AppDelegate *delegate=(AppDelegate *)[[UIApplication sharedApplication]delegate]; NSString *titleValue=[delegate getCurrentDates]; self.navigationItem.title =titleValue ; } The get does not work properly.It works fine if i give any static string or the "dateval". Thanks.

    Read the article

  • Delegates doesnot work properly

    - by Warrior
    I am new to iphone development.I am covering the date to the desired format and set it to the delegates and get its value in the another view.The session restarts when i tried to get the value from delegates.If i set the original date and not the formatted date in the set delegate ,then i able to get the value in the another view.If i also give any static string value,then also i am able to the static string value back.Only the formatted date which is string is set then the session restarts.If i print and check the value of the formatted date it prints the correct formatted date only.Please help me out.Here is my code for date conversion NSString *dateval=[[stories objectAtIndex: storyIndex] objectForKey:@"date"]; NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init]; [inputFormatter setDateFormat:@"EEE, MMM dd, yyyy"]; NSDate *inputDate = [inputFormatter dateFromString:dateval]; NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"MMMM dd"]; NSString *outputDate = [outputFormatter stringFromDate:inputDate]; AppDelegate *delegate=(AppDelegate *)[[UIApplication sharedApplication]delegate]; [delegate setCurrentDates:outputDate]; Thanks.

    Read the article

  • How play the video using “HTTP Live Streaming” in iphone?

    - by Warrior
    I am new to iphone development,I am parsing a XML URL and display its content in the table, when i click a row , its corresponding parsed tube URL is played using the movie player.I am using media player framework.Here is my code NSURL *movieURL = [NSURL URLWithString:requiredTubeUrl]; if (movieURL) { if ([movieURL scheme]) { MoviePlayerController *myMovie = [[MoviePlayerController alloc]init]; [myMovie initAndPlayMovie:movieURL]; } } This is working fine, but i want to play the video using "HTTP Live Streaming".How can i do that? Any tutorials and sample code would me more helpful.Thanks.

    Read the article

  • iPhone: How to Display Mail Composer View Without Obscuring Toolbar

    - by Warrior
    I display a mail composer view upon a tool bar button click event. At present, I can display the email composer view but when it display it hides the tool bar. I need the toolbar to remain visible. I have seen other apps display the email composer without hiding a toolbar but I can't figure out how they did so. I am new to iphone development. Please help me out.Thanks.

    Read the article

  • How to store data using core data in iphone?

    - by Warrior
    I am new to iphone development.I want to show a form a and store the contents in to a core data database after clicking the submit button.I have created a form.xcdatamodel and class events.h and events.m with reference to the apple docs.In some Sample codes the values are stored statically in the delegate class and they use core data delegate methods. But in my case the form view come after passing 2 views. I want to store the data entered here .How can i achieve it.Please help me out.Thanks.

    Read the article

  • How to remove segment at index at 0 of UISegmentcontrol in iphone?

    - by Warrior
    I am able to remove the segment at index 1,2,3 etc but not able to remove the segment at index 0 . [self readGroupFromDatabase]; NSLog(@"the current teble desc count value is %d",[tableDesc count]);---->0 if([tableDesc count]== 0){ [segemntedControl removeSegmentAtIndex:0 animated:NO]; } i am getting this error : *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (-1( or possibly larger)) beyond bounds (5)' Please help me out.Thanks.

    Read the article

  • How to release a string created inside a method in iphone?

    - by Warrior
    I have declared a local string inside the method.I am releasing the string inside the same method.I found my code crashing if release that object.If i dont release the string,code runs successfully.I have called that method in viewdidappear so that method is called while pushing and poping.Nothing gets printed in the console. Here is my code -(void)appendString{ NSString *locStr = [[NSString alloc] initWithString:@""]; for (int i=0;i<[result count]; i++) { locStr=[locStr stringByAppendingFormat:@"%@",[result objectAtIndex:i]]; } [str setString:locStr]; [locStr release]; } I am calling the "appendString" method from "viewDidAppear"."str" is a NSMutable string declared in .h class.How should i release the "locStr" .Please help me out

    Read the article

  • How to create a tabbar on clicking a row in table in iphone?

    - by Warrior
    My first view consist of table with 7 rows of data.When i click each row it should navigate to a view with tab bar with 4 tabitems .In this what is the proper approac of creating a tab bar. When should i create it.Should i create in didSelectRowAtIndexPath of the table in first view like this UITabBarController *tabbar=[[UITabBarController alloc] init]; Homepageview* vc1 = [[Homepageview alloc] initWithNibName:@"Homepageview" bundle:nil] ; vc1.tabBarItem.title=@"Home"; vc1.tabBarItem.image = [UIImage imageNamed:@"home.png"]; ShoppingView* vc2 = [[ShoppingView alloc] initWithNibName:@"ShoppingView" bundle:nil]; vc2.tabBarItem.title=@"Shopping"; vc2.tabBarItem.image = [UIImage imageNamed:@"shopping.png"]; Checkout* vc3 = [[Checkout alloc] initWithNibName:@"Checkout" bundle:nil] ; vc3.tabBarItem.title=@"Checkout"; vc3.tabBarItem.image = [UIImage imageNamed:@"checkout1.png"]; Settings *vc4=[[SlSettings alloc] initWithNibName:@"Settings" bundle:nil] ; vc4.tabBarItem.title=@"Settings"; vc4.tabBarItem.image = [UIImage imageNamed:@"setting1.png"]; tabbar.delegate = self; tabbar.viewControllers = [NSArray arrayWithObjects:vc1, vc2, vc3,vc4,nil]; //self.navigationItem.title=@"Snhopping list"; //[tabbar.selectedViewController viewDidAppear:YES]; [self.navigationController pushViewController:tabbar animated:YES]; [vc1 release]; [vc2 release]; [vc3 release]; [vc4 release]; [tabbar release]; Or is there any alternate to do it. If i do it by the above method , when i navigate from the home page view of tabbar to another view then i am not able to get tab bar.Please help me out.Thanks.

    Read the article

  • How to make the tabbar view appear when parsing is done in iphone?

    - by Warrior
    I am new to iphone development.I created a application , in which the first tab bar view ,load a web page and in second tab bar view ,it parses a xml file and display the content in the table view. When i click the second tab bar, the tab bar view is seen only after the parsing is done, till the parsing time the tab bar appears like unselected.I want to display the tabbar view with activity indicator when the parsing is done.How can i achieve it.Please help me out.Thanks.

    Read the article

  • How can i limit parsing and display the previously parsed contents in iphone?

    - by Warrior
    I am new to iphone development.I parsing a url and displayed its content in the table.On clicking a row it plays a video.When i click a done button, i once again call the tableview.When i call the table view it parse the url once again to display the contents .I want to limit the parsing for 1 time and for the next time i want to display the contents which are parsed at the first time.How can i achieve it ?Please help me out.Thanks.

    Read the article

  • I want increase the scrolling performance in my table view with images in iphone?

    - by Warrior
    I am new to iphone development.I am parsing a xml and display the title,date,contents and image in the cell,Now the scrolling is not smooth, it struck.How can i increase it.I have already applied lazy loading in another view, i am not able to apply in the new view.So how can i increase the scrolling performance.Can i check for any condition that if image is already loaded in the image view,if so i can stop once again the loading of image view. Please help me out.Thanks.

    Read the article

  • How to bring the mail composer view in between the view and tool bar in iphone?

    - by Warrior
    I am new to iphone development.I want a toolbar and a button in it.On clicking the button ,a mail compose view should open.I want the tool bar to be visible in the mail composer view.The mail composer should animate from back of the toolbar.How can i achieve that. Recently i saw a application,which implemented this.The mail emerges from back of the tool bar. In general which is more preferable for creating application like m need.Tabar or tool bar? any other method should i follow? Thanks.

    Read the article

  • How to check if there is an image present in the image view?

    - by Warrior
    I am new to iphone development. I want to check for a condition whether the image is present in the image view? I have created a image view such as UIImageView *subview = [[UIImageView alloc] initWithFrame:CGRectMake(10.0f, 6.0f,50.0f, 50.0f)]; How to check whether the image is present in the image view?Please help me out.Thanks.

    Read the article

  • In web project can we write core services layer without knowledge of UI ?

    - by Silent Warrior
    I am working on web project. We are using flex as UI layer. My question is often we are writing core service layer separately from web/UI layer so we can reuse same services for different UI layer/technology. So practically is it possible to reuse same core layer services without any changes/addition in API with different kind of UI technologies/layers. For e.g. same core service layer with UI technology which supports synchronized request response (e.g. jsp etc.) and non synchronize or event driven UI technology (e.g Ajax, Flex, GWT etc.) or with multiple devices like (computers, mobiles, pdas etc.). Personally I feel its very tough to write core service layer without any knowledge of UI. Looking for thoughts from other people.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >