Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 130/337 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • DDMS Not Showing Threads From Device

    - by polyclef
    I'd like to check for memory leaks in my Android app using the DDMS feature in Eclipse. When I launch an emulated device, the threads display properly for the emulated device, starting with 8600 and up. However, when I connect my Droid to the PC, the device shows up just fine in DDMS. The logcat is generated correctly, and I can view the file structure. However, threads do not display. I get "no client selected" in the Threads pane, and there is no drop-down icon next to the device listing. Do I need to change some particular setting in Eclipse? Is this maybe a driver issue?

    Read the article

  • Google Mock for iPhone development?

    - by Cliff
    I have an interesting situation where I am refactoring a bunch of ObjC iPhone code to create a C++ API. I'm a novice to C++ and looking into C++ mocking frameworks to augment the work I'd done using OCUnit and poor man's mocks. I ran across googlemock and wanted to know if anyone has ever used it for iPhone development? Also, how can I share this (or mockpp) with other devs as it is an installable package and doesn't seem to lend itself to checking into a repository?

    Read the article

  • View load methods not firing.

    - by 4thSpace
    I'm loading a view like this: if(commentSubmissionView == nil){ commentSubmissionView = [[CommentSubmissionController alloc] initWithNibName:@"CommentSubmissionView" bundle:nil]; } [self.view addSubview:commentSubmissionView.view]; viewDidLoad and viewWillAppear in commentSubmissionView do not fire. Is there something else I need to do?

    Read the article

  • How to keep MPMoviePlayerController open after movie ended?

    - by redguy
    If I use MPMoviePlayerController to play video in my iPhone app, it opens, loads the movie, plays it and then closes. Is it possible to force it to stay open after the movie finishes, so that user can replay it using its controls, instead of using controls in parent view? Also, is it possible to start MPMoviePlayerController in the paused mode? thanks for any advice.

    Read the article

  • getting error when using mapkit in xcode?

    - by Rahul Vyas
    'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MKMapView)' i am getting this error.am i missed something.i don't know from where to add MApkit.framework first i tried with target-getInfo and then from the bottom + sign added framework but that did not wrked.then i search in spotlight and added another framework.by adding this it removed previous error but gives the above one.what is the exact location of mapkit framework. i want to test it in simulator.

    Read the article

  • Making complex queries through SQLiteDatabase

    - by Luca
    Hi! I'm using the Android MediaProvider application to get information regarding the resources registered in the media library. The only way I found to do this is to use the ContentProvider class provided by the MediaProvider application. Unfortunately, it seems to me this is quite a limitation, isn't it? Is it possible this way to create complex queries with subqueries and using other functions of SQLite? I thought that it may be possible using the SQLiteDatabase class, but it seems it is not possible to open the database directly with its path, and anyway, the query method seems not to allow subqueries. Any solution to this? Thanks!

    Read the article

  • iPhone: Proper use of View and View Controller

    - by Joel
    I've recently been doing a lot of Objective-C programming, and just got back into doing more iPhone development. I've done a lot of programming using MVC in other languages/frameworks, but I just want to make sure I'm using MVC properly in my iPhone Development. I created a new iPhone Utility Application, which creates two views: MainView and FlipsideView. Both have a controller (FlipsideViewController and MainViewController) and XIB file of their own. What I've been doing is putting the IBOutlet UIControl myControl variables in my MainView.h or FlipsideView.h files and then tying the controls in Interface Builder to those variables. Then I put any IBAction SomeAction myAction methods in the MainViewController.h and FlipsideViewController.h files and tying the events to those methods in Interface Builder. This seems to be conceptually correct, but seems to cause problems. Say I have a button that when clicked it changes a label's text. So the Controller doesn't have a clue of what the variable name of the label is in the OnTouchUp event handler for my button. So I make a @property for it. But since the MainViewController.view property isn't of type MyView, I get warnings or errors whenever I try to access those properties from the view controller. I am doing this correctly? Is there a better way to do this? If this is correct, how do I properly work with those variables without getting warnings or errors? Thanks

    Read the article

  • Passing Activity to non-activity object properly

    - by rayman
    In my app ive got a non-activity object which it's role is being a manager class. many times i need to pass "source activity" to methods as parameter to that manager class in order to make some operations on that activity. for exaple let's assume we have MyActivity which gotta do some toast. so i have this manager class called MyManager, and i have this method in it raiseToast(Activity sourceActivity) { Toast.makeText(sourceActivity, demo, Toast.LENGTH_LONG).show(); } and from Myactivity class we calling that method this way: MyManager manager=new MyManager(); manager.raitetoast(MyActivity.this); it works fine. what I'm asking here, is this a proper way to pass an Activity as parameter to a non-activity object? I'm having a memory leaks on real device(not the emulator), I wonder if this could also causing any reason for that? Thanks Idan.

    Read the article

  • to print local xml file through NSData?

    - by senthilmuthu
    hi, i want to take some xml data from local path,and to parse,but when i use following code NSLog returns(content) different texts which is differed from xml file, how can i get exact xml data to check ,it consists correct xml data or not? any help please? when i parse , it returns nothing..i have saved the file as .xml and copied to local resource folder? NSString *xmlFilePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"samp.xml"]; NSString *xmlFileContents = [NSString stringWithContentsOfFile:xmlFilePath]; NSData *data = [NSData dataWithBytes:[xmlFileContents UTF8String] length:[xmlFileContents lengthOfBytesUsingEncoding: NSUTF8StringEncoding]]; NSString *content=[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding]; NSLog(@"%@",content);

    Read the article

  • How much of the "Objective-C" I'm learning is universal Objective-C, and not Apple's frameworks?

    - by Chris Cooper
    This question is related to one of my others about C: What can you do in C without “std” includes? Are they part of “C,” or just libraries? I've become curious lately as to what is really contained the the core Objective-C language, and what parts of the Objective-C I've done for iPhone/OS X development is specific to Apple platforms. I know that things like syntax are the same, but for instance, is NSObject and its torrent of NS-subclasses actually part of "standard" Objective-C? Could I use them in, say, Windows? What parts are universal for the most part, and what parts would I only find on an Apple platform? If you want, giving an example of Objective-C used elsewhere as an example of what is more "universal" would help me as well. Thanks! =)

    Read the article

  • Loading a Reusable UITableViewCell from a Nib

    - by Greg Martin
    I am able to design custom UITableViewCells and load them just fine using the technique described in the thread found at http://forums.macrumors.com/showthread.php?t=545061. However, using that method no longer allows you to init the cell with a reuseIdentifier which means you have to create whole new instances of each cell at every call. Has anyone figured out a good way to still cache particular cell types for reuses, but still be able to design them in Interface Builder?

    Read the article

  • UITextFields losing values after UINavigationController activity

    - by Dan Ray
    This is going to be hard to demonstrate in code, but maybe you can picture it with me. I have a view that contains two UITextFields, "title" and "descr". That same view contains two UIButtons that push another controller onto the navController to get more detail from the user about the object we're assembling and ultimately uploading to my server. It appears that pushing another view on, doing something, and popping it back off results in the two UITextFields keeping their content VISUALLY, but the .text property of those fields becomes NULL. I've confirmed that if I do my two push-pop fields before filling in those UITextFields, I get my data when I upload, and if I do them in the opposite order, I don't. It LOOKS like there's data there, but I get nothing when I NSLog their .text properties. Is this normal? Do I need to just design around this? Or is this as weird as it seems, and I should be looking deeper at causes of this?

    Read the article

  • Two PickerViews in save View issue?

    - by NextRev
    I'm trying to have 2 pickerviews in the same view. It works except for two things. If one pickerview has more rows than the other the app crashes when picking an item from the pickerview with more items. Also I created an NSLog for the pickerviews and the console shows that I'm picking two items at once when in fact i'm only dealing with one pickerview. I know it sounds a bit confusing but I'm including all the code. Thank you in advance. list and list2 are NSMutableArrays list has 4 items list2 has 5 items There error: * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (4) beyond bounds (4)' -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView{ if([thePickerView isEqual:pickerView1 ]){ return 1; } else if([thePickerView isEqual:pickerView2]){ return 1; } else{ return 0; } } -(NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component{ if([thePickerView isEqual:pickerView1 ]){ return [list count]; } else if([thePickerView isEqual:pickerView2]){ return [list2 count]; } else{ return 0; } } -(NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ if([thePickerView isEqual:pickerView1 ]){ return [list objectAtIndex:row]; } else if([thePickerView isEqual:pickerView2]){ return [list2 objectAtIndex:row]; } else{ return 0; } } - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { NSLog(@"Selected item %@. Index of selected item:%i", [list objectAtIndex:row], row); NSLog(@"Selected item %@. Index of selected item:%i", [list2 objectAtIndex:row], row); NSLog(@"Selected item %@. Index of selected item:%i", [list3 objectAtIndex:row], row); if([thePickerView isEqual:pickerView1 ]){ //Do Something } else if([thePickerView isEqual:pickerView2 ]){ //Do Something } else if([thePickerView isEqual:pickerView3 ]){ //Do Something } }

    Read the article

  • Optimising local image loading/rendering on iPhone

    - by Tricky
    Hi, I'm looking to create an interface where the user can navigate through large volumes of images. Each image has a thumbnail of 128x128 that I wish to display and will be kind of similar to coverflow in operation. I have this all working in principle but am becoming stuck when navigating through content at speed. The interface begins to stutter and becoming jerky. I believe this is primarily because of disk i/o and the cost of rendering each image. Is there anyway this can be handed over to a seperate thread simply? Defaulting to a greyed out thumbnail until the image has loaded? How have Apple managed to achieve this in coverflow? Many thanks,

    Read the article

  • EAGLView orientation changes and strange buffering

    - by Drew
    I'm writing an app that offloads some heavy drawing into an EAGLView, and it does some lightweight stuff in UIKit on top. It seems that the GL render during an orientation change is cached somewhere, and I can't figure out how to get access to it. Specifically: After an orientation change, calling glClear(GL_COLOR_BUFFER_BIT) isn't enough to clear the GL display (drawing is cached somewhere?) How can I clear this cache? After an orientation change, glReadPixel() can no longer access pixels drawn before the orientation change. How can I get access to where this is stored?

    Read the article

  • What is NSString in struct?

    - by 4thSpace
    I've defined a struct and want to assign one of its values to a NSMutableDictionary. When I try, I get a EXC_BAD_ACCESS. Here is the code: //in .h file typedef struct { NSString *valueOne; NSString *valueTwo; } myStruct; myStruct aStruct; //in .m file - (void)viewDidLoad { [super viewDidLoad]; aStruct.valueOne = @"firstValue"; } //at some later time [myDictionary setValue:aStruct.valueOne forKey:@"key1"]; //dies here with EXC_BAD_ACCESS This is the output in debugger console: (gdb) p aStruct.valueOne $1 = (NSString *) 0xf41850 Is there a way to tell what the value of aStruct.valueOne is? Since it is an NSString, why does the dictionary have such a problem with it? ------------- EDIT ------------- This edit is based on some comments below. The problem appears to be in the struct memory allocation. I have no issues assigning the struct value to the dictionary in viewDidLoad, as mentioned in one of the comments. The problem is that later on, I run into an issue with the struct. Just before the error, I do: po aStruct.oneValue Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x9895cedb in objc_msgSend () The program being debugged was signaled while in a function called from GDB. GDB has restored the context to what it was before the call. To change this behavior use "set unwindonsignal off" Evaluation of the expression containing the function (_NSPrintForDebugger) will be abandoned. This occurs just before the EXC_BAD_ACCESS: NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"MM-dd-yy_HH-mm-ss-A"]; NSString *date = [formatter stringFromDate:[NSDate date]]; [formatter release]; aStruct.valueOne = date; So the memory issue is most likely in my releasing of formatter. The date var has no retain. Should I instead be doing NSString *date = [[formatter stringFromDate:[NSDate date]] retain]; Which does work but then I'm left with a memory leak.

    Read the article

  • Reading Resource Files from my own APK in Android Native Environment

    - by Kyle
    I'm porting to Android. My existing project has a ton of resource files that I'm porting into my Android project. I have them all in /res/raw/, and I would like to access those resources in my native library with functions such as fopen() and such. Can this be done, or do I have to go through JNI for this as well? I would really prefer not to, for ease of porting and possible speed and memory reasons.

    Read the article

  • Explain to me how the Method Profiler works in the DDMS, I get heap space error

    - by Pentium10
    I start the Method Profiler for a process, then leave it run for about 5-10 secs, then I stop it. I see a progress that a file is pulled from the sdcard, than I get this Exception [2010-05-23 18:45:42] Traceview: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space [2010-05-23 18:45:42] Traceview: at java.util.Arrays.copyOf(Unknown Source) [2010-05-23 18:45:42] Traceview: at java.util.Arrays.copyOf(Unknown Source) [2010-05-23 18:45:42] Traceview: at java.util.ArrayList.toArray(Unknown Source) [2010-05-23 18:45:42] Traceview: at java.util.Collections.sort(Unknown Source) [2010-05-23 18:45:42] Traceview: at com.android.traceview.TimeLineView.setData(TimeLineView.java:370) [2010-05-23 18:45:42] Traceview: at com.android.traceview.TimeLineView.<init>(TimeLineView.java:316) [2010-05-23 18:45:42] Traceview: at com.android.traceview.MainWindow.createContents(MainWindow.java:95) [2010-05-23 18:45:42] Traceview: at org.eclipse.jface.window.Window.create(Window.java:431) [2010-05-23 18:45:42] Traceview: at org.eclipse.jface.window.Window.open(Window.java:790) [2010-05-23 18:45:42] Traceview: at com.android.traceview.MainWindow.run(MainWindow.java:60) [2010-05-23 18:45:42] Traceview: at com.android.traceview.MainWindow.main(MainWindow.java:224) What I am doing wrong?

    Read the article

  • Problem Showing Sensors Details

    - by Skatephone
    Hi, i'm looking to show detail about sensors in an Actvity but when i put my app in to my phone i manage to view only details about the accellerometer, but the program says that i have 4 sensors: Accellerometer, Magnetic field, Orientation and Temperature. I'm using Android 1.6 and a htc Tattoo for testing. This is my code: public class SensorInfo extends Activity { private SensorManager mSensorManager; TextView mTextAcc,mTextGyr,mTextLig,mTextMag,mTextOri, mTextPre,mTextPro,mTextTem, mSensorsTotTitle,mSensorAvailablesTitle,mTextAccTitle,mTextGyrTitle,mTextLigTitle,mTextMagTitle,mTextOriTitle, mTextPreTitle,mTextProTitle,mTextTemTitle; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.detaillayout); // Get the texts fields of the layout and setup to invisible setTextViews(); // Get the SensorManager mSensorManager= (SensorManager) getSystemService(SENSOR_SERVICE); // List of Sensors Available List<Sensor> msensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL); // Print Sensor Details Sensor sens; int type,i; String text = new String(""); // Do the list of available sensors on a String and print detail about each sensor for (i=0;i<msensorList.size();i++){ sens = msensorList.get(i); type = sens.getType(); text = " - "+getString(R.string.power)+" "+String.valueOf(sens.getPower())+"mA\n"; text+= " - "+getString(R.string.resolution)+" "+String.valueOf(sens.getResolution())+"\n"; text+= " - "+getString(R.string.maxrange)+" "+String.valueOf(sens.getMaximumRange ())+"\n"; text+= " - "+getString(R.string.vendor)+" "+sens.getVendor()+"\n"; text+= " - "+getString(R.string.version)+" "+String.valueOf(sens.getVersion()); switch(type) { // Check the type of Sensor that generate the event and show is resolution case Sensor.TYPE_ACCELEROMETER: mTextAccTitle.setVisibility(0); mTextAccTitle.setMaxHeight(30); mTextAcc.setVisibility(0); mTextAcc.setMaxHeight(100); mTextAcc.setText(text); // Print data of the Sensor break; case Sensor.TYPE_GYROSCOPE: mTextGyrTitle.setVisibility(0); mTextGyr.setVisibility(0); mTextGyr.setText(text); // Print data of the Sensor break; case Sensor.TYPE_LIGHT: mTextLigTitle.setVisibility(0); mTextLig.setVisibility(0); mTextLig.setText(text); // Print data of the Sensor break; case Sensor.TYPE_MAGNETIC_FIELD: mTextMagTitle.setVisibility(0); mTextMag.setVisibility(0); mTextMag.setText(text); // Print data of the Sensor break; case Sensor.TYPE_ORIENTATION: mTextOriTitle.setVisibility(0); mTextOri.setVisibility(0); mTextOri.setText(text); // Print data of the Sensor break; case Sensor.TYPE_PRESSURE: mTextPreTitle.setVisibility(0); mTextPre.setVisibility(0); mTextPre.setText(text); // Print data of the Sensor break; case Sensor.TYPE_PROXIMITY: mTextProTitle.setVisibility(0); mTextPro.setVisibility(0); mTextPro.setText(text); // Print data of the Sensor break; case Sensor.TYPE_TEMPERATURE: mTextTemTitle.setVisibility(0); mTextTem.setVisibility(0); mTextTem.setText(text); // Print data of the Sensor break; } } } // Get the texts fields of the layout and setup to invisible void setTextViews(){ mTextAccTitle = (TextView) findViewById(R.id.sensorAccTitle); mTextAccTitle.setVisibility(4); mTextAccTitle.setMaxHeight(0); mTextAcc = (TextView) findViewById(R.id.sensorAcc); mTextAcc.setMaxHeight(0); mTextAcc.setVisibility(4); mTextGyrTitle = (TextView) findViewById(R.id.sensorGyrTitle); mTextGyrTitle.setVisibility(4); mTextGyrTitle.setMaxHeight(0); mTextGyr = (TextView) findViewById(R.id.sensorGyr); mTextGyr.setVisibility(4); mTextGyrTitle.setMaxHeight(0); mTextLigTitle = (TextView) findViewById(R.id.sensorLigTitle); mTextLigTitle.setVisibility(4); mTextLigTitle.setMaxHeight(0); mTextLig = (TextView) findViewById(R.id.sensorLig); mTextLig.setVisibility(4); mTextLig.setMaxHeight(0); mTextMagTitle = (TextView) findViewById(R.id.sensorMagTitle); mTextMagTitle.setVisibility(4); mTextMagTitle.setMaxHeight(0); mTextMag = (TextView) findViewById(R.id.sensorMag); mTextMag.setVisibility(4); mTextMag.setMaxHeight(0); mTextOriTitle = (TextView) findViewById(R.id.sensorOriTitle); mTextOriTitle.setVisibility(4); mTextOriTitle.setMaxHeight(0); mTextOri = (TextView) findViewById(R.id.sensorOri); mTextOri.setVisibility(4); mTextOri.setMaxHeight(0); mTextPreTitle = (TextView) findViewById(R.id.sensorPreTitle); mTextPreTitle.setVisibility(4); mTextPreTitle.setMaxHeight(0); mTextPre = (TextView) findViewById(R.id.sensorPre); mTextPre.setVisibility(4); mTextPre.setMaxHeight(0); mTextProTitle = (TextView) findViewById(R.id.sensorProTitle); mTextProTitle.setVisibility(4); mTextProTitle.setMaxHeight(0); mTextPro = (TextView) findViewById(R.id.sensorPro); mTextPro.setVisibility(4); mTextPro.setMaxHeight(0); mTextTemTitle = (TextView) findViewById(R.id.sensorTemTitle); mTextTemTitle.setVisibility(4); mTextTemTitle.setMaxHeight(0); mTextTem = (TextView) findViewById(R.id.sensorTem); mTextTem.setVisibility(4); mTextTem.setMaxHeight(0); } } Tank's Valerio From Italy

    Read the article

  • iPad: Cannot load facebook page wall in UIWebview

    - by geekay
    Its already too long i am struggling with this issue. After searching a lot I decided to post a question here. What my app does Captures photo Uploads the photo on the wall of the page Displays the facebook page wall in a UIWebview after upload is complete Everything was working as expected 4 days back :) Suddenly something went wrong :( Code NSString *facebookPageURL =@"https://m.facebook.com/pages/<myPageName>/<myPageID>?v=wall" UIWebView *webView = [[UIWebView alloc] initWithFrame:kAppFrame]; [webView setUserInteractionEnabled:NO]; [webView setBackgroundColor:[UIColor clearColor]]; webView.delegate = self; [webView setHidden: YES]; NSURL *url = [NSURL URLWithString:[facebookPageURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] relativeToURL:[NSURL URLWithString:@"http://login.facebook.com"]]; NSMutableURLRequest *request = nil; if(url) request = [NSMutableURLRequest requestWithURL:url]; [webView loadRequest:request]; [self.view addSubview:webView]; [webView reload]; [self.view bringSubviewToFront:webView]; webView = nil; Scenario If I open the url facebookPageURL in Safari in iOS Simulator it works well If I open the url in any browser on Mac it works well In webView I see a white screen If I change the facebookPageURL to remove ?v=wall to ?v=info I am stil able to see the page.(not blank screen atleast). Note 1. My facebook Page is NOT unpublished and is visible. 2. I have cross checked the facebook page permissions. I suspect there is something changed on facebook side overnight. Please guide.

    Read the article

  • OpenGL depth buffer on Android

    - by kayahr
    I'm currently learning OpenGL ES programming on Android (2.1). I started with the obligatory rotating cube. It's rotating fine but I can't get the depth buffer to work. The polygons are always displayed in the order the GL commands render them. I do this during initialization of GL: gl.glClearColor(.5f, .5f, .5f, 1); gl.glShadeModel(GL10.GL_SMOOTH); gl.glClearDepthf(1f); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glDepthFunc(GL10.GL_LEQUAL); gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); On surface-change I do this: gl.glViewport(0, 0, width, height); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); GLU.gluPerspective(gl, 45.0f, (float) width / (float) height, 0.1f, 100f); When I enable backface culling then everything looks correct. But backface culling is only a speed-optimization so it should also work with only the depth buffer or not? So what is missing here?

    Read the article

  • documentBuilder: The process cannot access the file because it is being used by another process

    - by st mnmn
    I am using DocumentBuilder (of openXML api), to those who doesn't know the documentBuilder I'll give a short explanation: it has a function 'BuildDocument' which gets list of sources (each source contains wmldocument), and string of fileName to save to. public static void BuildDocument(List<Source> sources, string fileName) the purpose of this function is to build one word docx which contains all the sources. it merges some docs to one. at the end of its functionality it saves the doc using: File.WriteAllBytes(...) but when I run my project on the server I keep getting the error: "The process cannot access the file because it is being used by another process." few times it works ok. and in the visualStudio it also works without errors. what can be the problem?

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >