Search Results

Search found 10773 results on 431 pages for 'core foundation'.

Page 80/431 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • How to remove deletedObjects from ManagedObjectContext?

    - by Babut
    Hi, I have two enities: path <-- node. (one to many) In nodes ArrayController I override -DeleteObjects: to remove path if the last node is removed. Everything works perfect, but it's impossible to save edited document, because nodes are left in [ManagedObjectContext deletedObjcets]. It gives error on save. How to clean them up? Babut

    Read the article

  • How to speed up drawing of scaled image? Audio playback chokes during window resize.

    - by Paperflyer
    I am writing an audio player for OSX. One view is a custom view that displays a waveform. The waveform is stored as a instance variable of type NSImage with an NSBitmapImageRep. The view also displays a progress indicator (a thick red line). Therefore, it is updated/redrawn every 30 milliseconds. Since it takes a rather long time to recalculate the image, I do that in a background thread after every window resize and update the displayed image once the new image is ready. In the meantime, the original image is scaled to fit the view like this: // The drawing rectangle is slightly smaller than the view, defined by // the two margins. NSRect drawingRect; drawingRect.origin = NSMakePoint(sideEdgeMarginWidth, topEdgeMarginHeight); drawingRect.size = NSMakeSize([self bounds].size.width-2*sideEdgeMarginWidth, [self bounds].size.height-2*topEdgeMarginHeight); [waveform drawInRect:drawingRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1]; The view makes up the biggest part of the window. During live resize, audio starts choking. Selecting the "big" graphic card on my Macbook Pro makes it less bad, but not by much. CPU utilization is somewhere around 20-40% during live resizes. Instruments suggests that rescaling/redrawing of the image is the problem. Once I stop resizing the window, CPU utilization goes down and audio stops glitching. I already tried to disable image interpolation to speed up the drawing like this: [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationNone]; That helps, but audio still chokes during live resizes. Do you have an idea how to improve this? The main thing is to prevent the audio from choking.

    Read the article

  • A UI over Windows Workflow

    - by Tom
    Hi there, Are there any build in UI capabilities when using Windows Workflow.. Lets say I have a workflow that takes an hour to run where different activities are happening all the time. While it's running I want to see what activity is currently active, what activities have already ran etc.. Do I have to code this UI myself or does WF have built in features that graphically show the status etc of the workflow?

    Read the article

  • Can I change an NSDictionaries key?

    - by Mark Reid
    I have an NSDictionary object that is populated by NSMutableStrings for its keys and objects. I have been able to change the key by changing the original NSMutableString with the setString: method. They key however remains the same regardless of the contents of the string used to set the key initially. My question is, is the key protected from being changed meaning it will always be the same unless I remove it and add another to the dictionary? Thanks.

    Read the article

  • Query interface for iPhone CoreData store

    - by JT
    Hi, another iPhone newbie question... I have the following: NSPersistentStoreCoordinator NSManagedObjectContext NSManagedObjectModel Is it possible to run queries directly on the store (since its a sqlite DB)? I'm trying to delete all the records from a tableview, and figured a "DELETE FROM table" would be nice and quick as opposed to looping through the records and removing them manually (which i'm also struggling with). Thanks for your time, James

    Read the article

  • Retrieving Relationships from within two arrays of pointers

    - by DanF
    In a portion of a program I'm working on, I need to count all the times each person has worked on projects with each other person. Let's say we have "Employee" entities and "Session" entities. In each session, there are four project types, "A", "B", "C", & "D", each a many-to-many relationship to Employees. I'm making a loop to systematically review every person a selected person has worked with. First, I put all their project types in a single array, so it's easier to loop through, but by the time I ask the last nested Project for its Employee members, I get an "unrecognized selector" error. IBOutlet NSArrayController * list; int x; for(x = 0; x < [list count]; x++){ NSArray *A = [[list objectAtIndex:x] valueForKey:@"projectAs"]; NSArray *A = [[list objectAtIndex:x] valueForKey:@"projectBs"]; NSArray *A = [[list objectAtIndex:x] valueForKey:@"projectCs"]; NSArray *A = [[list objectAtIndex:x] valueForKey:@"projectDs"]; NSArray *masterList = [[NSArray alloc] initWithObjects: projectAs, projectBs, projectCs, projectDs, nil]; int y; for(y = 0; y < [masterList count]; y++){ int z; for(z = 0; z < [[masterlist objectAtIndex:y] count]; z++){ //And now to make an Array of this employee's partners on the selected object, to run comparisons on. //I also have an array of keys for each session's teams, so that's what I'm referencing here: NSArray * thisTeam = [list objectAtIndex:y] objectAtIndex:z] valueForKey:projectKey]; This throws an exception... namely, -[_NSFaultingMutableSet objectAtIndex:]: unrecognized selector sent to instance What's wrong with that last Array creation?

    Read the article

  • Access workflow ExectionProperties from Activity

    - by rekna
    When I derive an activity from NativeActivity, I can access Workflow executionproperties using the NativeActivityContext like this: context.Properties.Find("propertyname"); Some of my activities derive from Activity, because I they define a coded workflow using the Implementation property. An Activity has an ActivityContext, which does not provide access to the workflow execution properties, it does not have a Properties property. Is there another way to get access to the workflow execution properties from within an Activity

    Read the article

  • Can someone help me with two-entity coreData iOS6?

    - by user1878923
    I'm new in iOS development and i need simple example (project) with explained two-entity coreData with to-many relationship between A and B entities on iOS6 with storyboard interface and ARC. In storyboard should be two UITableView controllers which present entities A and B and two UIViewControllers which present adding string data from text fields I searched in many books, sites, video lessons like "lynda.com", but i still not understand how and where i should implement two-entity coredata with one to-many relationship in code. Can someone give me link to understandable tutorial or put the project on GitHub?

    Read the article

  • What does -setPropagatesDeletesAtEndOfEvent: actually do?

    - by dontWatchMyProfile
    Let me try it: If I don't set this, then the default value is YES. So when I delete an managed object from the context, the context propagates this immediately to the persistent store so the object is gone? And when I set this to NO, then objects are deleted from the persistent store only when calling -save? Is that really true? I mean: If it was true, then the default behavior is that once you call the context to delete an object, the object is gone. Lets assume you're not using an undo manager. So... gone. Right? No rollback possible? Or can it still be recovered with a rollback?

    Read the article

  • Call center workflow scenario with WF 4

    - by mossy
    I need to develop a workflow for a call center. A bot will ask some predefined questions to the caller. Based on the answers the workflow will decide the questions to ask and finally redirect the caller to a representative that has required skills. Based on the scenario above, I have several questions. How can I make the workflow "wait" between asking a question to the caller and receiving response from the caller? Do I have to use HandleExternalEvent? If so do I have to define an event for every question? Flowchart workflow seems to be the best solution but I can't imagine how to handle this waiting issue right now. Any help is appreciated.

    Read the article

  • NSManagedObjectID into NSData

    - by papr
    I found this wonderful NSManagedObjectID. This would be very good for referencing an Entity/NSManagedObject/NSEntityDescription, right? Let's get an ID from an entity: NSEntityDescription *entity = [self newEntity]; NSManagedObjectID *objID = [entity objectID]; So... any idea how to get this objID into a string? Or better: NSData. Actually something to be able to save it to the NSUserDefaults. ;-) Btw: NSFetchRequest doesn't want to work in my case. I use an modified version of this example: answer of an old question.

    Read the article

  • Safe way of iterating over an array or dictionary and deleting entries?

    - by mystify
    I've heard that it is a bad idea to do something like this. But I am sure there is some rule of thumb which can help to get that right. When I iterate over an NSMutableDictionary or NSMutableArray often I need to get rid of entries. Typical case: You iterate over it, and compare the entry against something. Sometimes the result is "don't need anymore" and you have to remove it. But doing so affects the index of all the rows, doesn't it? So how could I safely iterate over it without accidently exceeding bounds or jumping over an element that hasn't been checked?

    Read the article

  • best way to use CoreLocation across multiple views

    - by Matt
    I have two views in my app, one is a general view where CoreLocation works away calculating the users location while the user is doing other stuff in the view. The second view is accessed by the user when they touch a button allowing them to locate themselves more accurately using a mapview and MapKit, i would like the mapview in this view to show the location that CoreLocation has already identified in the first view AND to continue displaying this location based on updates from CoreLocation in the other view. Is the best way here to create a singleton that encapsulates the CoreLocation stuff and have this referenced in the view with the map, or to use notifications ? or to use some other better practice for my scenario ? Thanks

    Read the article

  • Animating removeFromSuperview

    - by user230949
    I'd like to animate the transition from a subview back to the super view. I display the subview using: [UIView beginAnimations:@"curlup" context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:.5]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [self.view addSubview:self.mysubview.view]; [UIView commitAnimations]; The above works fine. It's going back to the super view that I don't get any animation: [UIView beginAnimations:@"curldown" context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:.5]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES]; [self.view removeFromSuperview]; [UIView commitAnimations]; Is there something different I should be doing to get the subview to animate when removed?

    Read the article

  • What's -mutableSetValueForKey: returning, actually? Is that something special?

    - by dontWatchMyProfile
    From the docs: You usually access to-many relationships using mutableSetValueForKey:, which returns a proxy object that both mutates the relationship and sends appropriate key-value observing notifications for you. So this returns an "intelligent" NSMutableSet which automatically lets the context delete objects when they get deleted from the set, and reverse? Is that a proxy object?

    Read the article

  • What is the best way to create derived properties

    - by user342788
    I have a datamodel with to-many to-many relations. Using the example of employee database let say the entity division is related to department which in turn is related to employee. The employee has an attribute salary. How best to have a attribute at the level of division which is derived from the salary attribute. For example average salary or maximum salary. I would need those attributes to sort the list of departments.

    Read the article

  • suggestion for designing an application to show plists

    - by thndrkiss
    Hi, I am new to iphone programming designs. I have hundreds of plists on my server. On the first launch i will be downloading all these plists into my application and storing it here. What are all the best ways to save and retrieve these plists in my application ? What are the iPhone libraries that should be used to get the best and memory efficient iphone application ?

    Read the article

  • CALayer Position Contents to Bottom Left

    - by Louis
    I am attempting to draw an image onto a CALayer. I only need an image, so I have created my later as follows: CALayer *layer = [CALayer layer]; I add my image as follows: NSImage *img = [[NSImage alloc] initWithContentsOfFile:@"path/to/img.png"]; [layer setContents:img]; This works, however it draws my images to fill the entire parent frame (stretching my image in the process). Reading the docs, I found the following: [layer setContentsGravity:@"kCAGravityBottomLeft"]; I am attempting to draw my image in the bottom left of the parent frame, however no matter what I do it draws my icon in the bottom center. Is there anyway to specify the bottom left?

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >