Search results for

“SwiftData inheritance relationship”

4,981 results found

Post

Replies

Boosts

Views

Activity

Xcode 7 - Doesn't expand certain variables
We have a mostly C++ game that had no issues with Xcode 6. Ever since installing Xcode 7, I can't expand (or even view) certain variables that I could in Xcode 6.1. We have a std::string wrapper class (has-a relationship) and we cant expand the member variables to see what the UTF8 data of the std::string is. 2. We use polymorphism a lot and often have base class pointers in objects. Before in Xcode 6, we could see the derived type next to the memory address in Xcode debugger, as well as expand the derived class object to inspect its data. In Xcode 7, it doesn't show the derived type, nor can I expand to view the data. These 2 bugs effectively cripples our ability to debug our game!! We have to restort to printfs to debug - This is unacceptable.Surely other people have experienced a major bug like this?
2
0
980
Nov ’15
For-in-loop on custom types for which SequenceType doesn't make sense.
As far as I can see, conforming to SequenceType is the only way to get a type to work with a for-in-loop.However, SequenceType adds a lot of stuff that doesn't necessarily make sense for every custom type we might want to use with a for-in-loop.(SequenceType's versions of map (always to an Array!), filter (to an Array!), sort (to an Array!) etc.)So why isn't there a much simpler protocol that specify/require only what is needed for the for-in-loop to work?(I guess such a protocol would require nothing more than a generate-method from its conforming types.And SequenceType would then of course inherit from that protocol.)
10
0
5.4k
Nov ’15
Reply to Generics ambiguous argument
I definitely see where you are coming from, and I don't wish to say 'you are _wrong_' but maybe I can offer an alternative point of view.I think the difficulty in thinking about this may come from having called the structure Point. Because we all have preconceived ideas about what a point is (after many a dreary hour in geometry class...) But, the compiler did not spend those hours in Geometry and doesn't know that a Point is an extra-special meaningful thing.So, imagine if it was: struct ICanHoldOneOrTwoOfAnything<Element> { // and everything else is the same. }And the constructors make it possible to create an ICanHoldOneOrTwoOfAnything with, dare I say, one Element or two Elements. And amongst the candidates for the title of 'anything' is certainly Int and Float and struct and class and, yes, tuple. Because all those qualify as anything (ie Element).As far as the syntax goes, it is true that there is some _thing_ wonderful about the relationship between function arguments and tuples. And whe
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’15
CoreData crashed trying to run a pretty boring for...in loop.
Hi everyone, thanks very much for reading, and thank you in advance for any light you can shed on this.The crash logs as CRASH: *** -[NSMutableSet unionSet:]: set argument is not an NSSet. UnionSet is being called as part of a fast enumeration. As you see below the thing I'm trying to loop over claims to be a _NSFaultingMutableSet. Here are a few more fun facts.This code is executing on a background thread using a NSManagedContext that is a child of the one from the main thread. I'm not new to core data threading, and this code has been in the wild for a while now and works for the rest of our users. The background (child) context is never saved, and we don't care about keeping up to date with changes on the main thread so we aren't doing anything like merging in changes from other contexts.self here is an instance of a Location, which is a subclass of NSManagedObject.self.settings is a toMany relationship with another NSManagedObject subclass.This is not the first odd thing core data has done to me
5
0
2.9k
Nov ’15
Reply to 70/30 split between Apple?? 11.3
>any insight on how Uber worksHow does the Uber payment method work?Visit the main menu of the Uber app and select the Payment option or credit card icon to enter your payment information. Once your credit card, PayPal, or other payment info is in the app, all fee payments happen automatically.So, as you said in your first post It caters the food to a location and the transaction is processed in the app by using a credit card that the user enters on file but it is done by a payment system such as Paypal or Strippe or Square.Just remember that Uber may rely on a relationship w/Apple that isn't generally available to 'normal' devs, so unless you already enjoy concierge service w/app review (in which case you wouldn't be here, I think), you may have to make your own case on it's own merits. But if all you're worried about is paying 30% to Apple, in your example, and as already noted, that won't be likely.
Nov ’15
Entity.h and Entity.m incorrect import for relationship
Hi! I had an old Core Data Entity, with relationship to AnotherEntity@property(nonatomic, retain) AnotherEntity *anotherEntity;In AnotherEntity.h a have an attribute@property(nonatomic, retain) NSString *title;I've modified some of Entity's attributes (added new one) so after generating new NSManagedObject subclass Xcode generated 4 new classes: Entity.h, Entity.m, Entity+CoreDataProperties.h and Entity+CoreDataProperties.mPreviously AnotherEntity.h had been imported in Entity.h, but this time Xcode imported it in Entity.m. So trying to access entity.anotherEntity.title gives me error Property 'title' cannot be found in forward class objectI've solved it, importing in Entity.h, but wonder if it's correct and Xcode was wrong importing in .m or it's me doing something wrong?
1
0
415
Nov ’15
How do I communicate from a UICell to its UICollectionView
I have subclasses of each of the following: a UIViewController managing a UICollectionView. The cells in the UICollectionView contain custom subclassess of UICollectionViewCell. I am populating it UICollectionViewCell subclasses from CoreData in - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath and all this works fine and dandy. When the user selects a cell I pick this up in - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath and segue off to process the selected cell. This all works fine and dandy.PROBLEM: I now want to have a checkbox on each of the UICollectionViewCells that the user can click to select the cell. After they have selected one or more cells I want them to press a UIButton on the top level UIView (managed by the UIViewController (that manages the UICollectionView) and I want a method in the UIViewController top process each of the selected cells one at a time. How do I communc
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
380
Nov ’15
Reply to Constraints between a UITableView and a UITableViewCell
I would recommend trying to use the same relationships to position your column headers and the views in the cells. Have a view that is the same width as the tableview. The column headers would be subviews of that view. The positions of the column header views would be relative to the container view. Set up the cells to use the same relationships relative to the cell content view.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’15
Table Issues
I have two tables in one view in kind of a master/slave relationship (not a SplitView). One, not filling the space will show the TableHeader just fine. The other, filled enough to scroll, refuses to show the header. Worse yet, when programmatically changing the focused cell, the animations to Top or Middle are squirrelly with inconsistent operation, sometimes putting the selected row partially out of the view.I'm probably going to abandon TableHeaders and install a Label above the table instead.BTW, focus and selection are two independent properties. In one table, I show selection by showing an icon arrow in the left of the cell -- a little more visual than the ghost selection indication. Selection occurs when clicked. In the other table, focus and selection work together. Selection in one of the tables advances focus/selection in the other table.
1
0
371
Nov ’15
Reply to Bug: A managed object relationship that contains multiple copies of the same object.
Which version of iOS 8 (specific version number that you're testing on, like 8.4.1 on an iPad 3) are you seeing this on?And have you tried the silly sounding work around of setting the parent property on the child? Or, are you setting the parent property on the child? If you have the to-many and to-one relationships set up as inverses, setting the parent on the child should take care of updating the children relationship automatically.
Nov ’15
Reply to Which is best for iOS, double or float?
I know CGFloat is double on 64-bit devices and float on 32-bit devices.Just FYI, that decision was inherited from OS X, where it was made based on the performance characteristics of early PowerPC CPUs. Thus, you shouldn’t draw any conclusions about modern CPUs from that factoid.As to your overall question, it’s hard to answer without more information about your goals. Perhaps you can offer up some details of the problem you’re trying to solve.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: General Tags:
Nov ’15
Xcode crashes when I try to make a storyboard reference the target of a relationship segue
If I add a storyboard reference to the storyboard and then try to make that reference the target of a relationship segue from a tab bar controller, xcode always crashes immediately. Has anyone else had this problem? I know that ios8 doesn't support references as targets of relationship segues, but I'm explicitly targeting ios9 in the project's settings, and xcode shouldn't crash in any case.
6
0
2.1k
Nov ’15
Xcode 7 - Doesn't expand certain variables
We have a mostly C++ game that had no issues with Xcode 6. Ever since installing Xcode 7, I can't expand (or even view) certain variables that I could in Xcode 6.1. We have a std::string wrapper class (has-a relationship) and we cant expand the member variables to see what the UTF8 data of the std::string is. 2. We use polymorphism a lot and often have base class pointers in objects. Before in Xcode 6, we could see the derived type next to the memory address in Xcode debugger, as well as expand the derived class object to inspect its data. In Xcode 7, it doesn't show the derived type, nor can I expand to view the data. These 2 bugs effectively cripples our ability to debug our game!! We have to restort to printfs to debug - This is unacceptable.Surely other people have experienced a major bug like this?
Replies
2
Boosts
0
Views
980
Activity
Nov ’15
For-in-loop on custom types for which SequenceType doesn't make sense.
As far as I can see, conforming to SequenceType is the only way to get a type to work with a for-in-loop.However, SequenceType adds a lot of stuff that doesn't necessarily make sense for every custom type we might want to use with a for-in-loop.(SequenceType's versions of map (always to an Array!), filter (to an Array!), sort (to an Array!) etc.)So why isn't there a much simpler protocol that specify/require only what is needed for the for-in-loop to work?(I guess such a protocol would require nothing more than a generate-method from its conforming types.And SequenceType would then of course inherit from that protocol.)
Replies
10
Boosts
0
Views
5.4k
Activity
Nov ’15
Reply to Generics ambiguous argument
I definitely see where you are coming from, and I don't wish to say 'you are _wrong_' but maybe I can offer an alternative point of view.I think the difficulty in thinking about this may come from having called the structure Point. Because we all have preconceived ideas about what a point is (after many a dreary hour in geometry class...) But, the compiler did not spend those hours in Geometry and doesn't know that a Point is an extra-special meaningful thing.So, imagine if it was: struct ICanHoldOneOrTwoOfAnything<Element> { // and everything else is the same. }And the constructors make it possible to create an ICanHoldOneOrTwoOfAnything with, dare I say, one Element or two Elements. And amongst the candidates for the title of 'anything' is certainly Int and Float and struct and class and, yes, tuple. Because all those qualify as anything (ie Element).As far as the syntax goes, it is true that there is some _thing_ wonderful about the relationship between function arguments and tuples. And whe
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’15
CoreData crashed trying to run a pretty boring for...in loop.
Hi everyone, thanks very much for reading, and thank you in advance for any light you can shed on this.The crash logs as CRASH: *** -[NSMutableSet unionSet:]: set argument is not an NSSet. UnionSet is being called as part of a fast enumeration. As you see below the thing I'm trying to loop over claims to be a _NSFaultingMutableSet. Here are a few more fun facts.This code is executing on a background thread using a NSManagedContext that is a child of the one from the main thread. I'm not new to core data threading, and this code has been in the wild for a while now and works for the rest of our users. The background (child) context is never saved, and we don't care about keeping up to date with changes on the main thread so we aren't doing anything like merging in changes from other contexts.self here is an instance of a Location, which is a subclass of NSManagedObject.self.settings is a toMany relationship with another NSManagedObject subclass.This is not the first odd thing core data has done to me
Replies
5
Boosts
0
Views
2.9k
Activity
Nov ’15
Reply to 70/30 split between Apple?? 11.3
>any insight on how Uber worksHow does the Uber payment method work?Visit the main menu of the Uber app and select the Payment option or credit card icon to enter your payment information. Once your credit card, PayPal, or other payment info is in the app, all fee payments happen automatically.So, as you said in your first post It caters the food to a location and the transaction is processed in the app by using a credit card that the user enters on file but it is done by a payment system such as Paypal or Strippe or Square.Just remember that Uber may rely on a relationship w/Apple that isn't generally available to 'normal' devs, so unless you already enjoy concierge service w/app review (in which case you wouldn't be here, I think), you may have to make your own case on it's own merits. But if all you're worried about is paying 30% to Apple, in your example, and as already noted, that won't be likely.
Replies
Boosts
Views
Activity
Nov ’15
Entity.h and Entity.m incorrect import for relationship
Hi! I had an old Core Data Entity, with relationship to AnotherEntity@property(nonatomic, retain) AnotherEntity *anotherEntity;In AnotherEntity.h a have an attribute@property(nonatomic, retain) NSString *title;I've modified some of Entity's attributes (added new one) so after generating new NSManagedObject subclass Xcode generated 4 new classes: Entity.h, Entity.m, Entity+CoreDataProperties.h and Entity+CoreDataProperties.mPreviously AnotherEntity.h had been imported in Entity.h, but this time Xcode imported it in Entity.m. So trying to access entity.anotherEntity.title gives me error Property 'title' cannot be found in forward class objectI've solved it, importing in Entity.h, but wonder if it's correct and Xcode was wrong importing in .m or it's me doing something wrong?
Replies
1
Boosts
0
Views
415
Activity
Nov ’15
Reply to upload separatly to apple store
This sounds like a terribly one-sided relationship. Did you contract to receive the source code in the first place?
Replies
Boosts
Views
Activity
Nov ’15
Getting compile time error - Unknown segue relationship When Collection View is Used in Storyboard Project
Hi,In a new swift story board project - i dragged and dropped collection view and tried to compile, but i am getting this errorUnknown segue relationshipAny idea?Screen Shot : https://www.dropbox.com/s/02z22eu5d88stm2/test.png?dl=0Project :https://www.dropbox.com/s/tyz0qecm7dk4o4x/test.zip?dl=0
Replies
2
Boosts
0
Views
320
Activity
Nov ’15
How do I communicate from a UICell to its UICollectionView
I have subclasses of each of the following: a UIViewController managing a UICollectionView. The cells in the UICollectionView contain custom subclassess of UICollectionViewCell. I am populating it UICollectionViewCell subclasses from CoreData in - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath and all this works fine and dandy. When the user selects a cell I pick this up in - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath and segue off to process the selected cell. This all works fine and dandy.PROBLEM: I now want to have a checkbox on each of the UICollectionViewCells that the user can click to select the cell. After they have selected one or more cells I want them to press a UIButton on the top level UIView (managed by the UIViewController (that manages the UICollectionView) and I want a method in the UIViewController top process each of the selected cells one at a time. How do I communc
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
380
Activity
Nov ’15
Reply to Constraints between a UITableView and a UITableViewCell
I would recommend trying to use the same relationships to position your column headers and the views in the cells. Have a view that is the same width as the tableview. The column headers would be subviews of that view. The positions of the column header views would be relative to the container view. Set up the cells to use the same relationships relative to the cell content view.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’15
Table Issues
I have two tables in one view in kind of a master/slave relationship (not a SplitView). One, not filling the space will show the TableHeader just fine. The other, filled enough to scroll, refuses to show the header. Worse yet, when programmatically changing the focused cell, the animations to Top or Middle are squirrelly with inconsistent operation, sometimes putting the selected row partially out of the view.I'm probably going to abandon TableHeaders and install a Label above the table instead.BTW, focus and selection are two independent properties. In one table, I show selection by showing an icon arrow in the left of the cell -- a little more visual than the ghost selection indication. Selection occurs when clicked. In the other table, focus and selection work together. Selection in one of the tables advances focus/selection in the other table.
Replies
1
Boosts
0
Views
371
Activity
Nov ’15
Reply to Bug: A managed object relationship that contains multiple copies of the same object.
Which version of iOS 8 (specific version number that you're testing on, like 8.4.1 on an iPad 3) are you seeing this on?And have you tried the silly sounding work around of setting the parent property on the child? Or, are you setting the parent property on the child? If you have the to-many and to-one relationships set up as inverses, setting the parent on the child should take care of updating the children relationship automatically.
Replies
Boosts
Views
Activity
Nov ’15
Reply to Performing SKAction on a block with random values
Agreed.. if you look at the duration of your actionBlock1, it is 0 - Block actions don't inherit the durations of the actions added inside of them. Make sure if you are going to repeat something forever, it has a non-zero duration.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Nov ’15
Reply to Which is best for iOS, double or float?
I know CGFloat is double on 64-bit devices and float on 32-bit devices.Just FYI, that decision was inherited from OS X, where it was made based on the performance characteristics of early PowerPC CPUs. Thus, you shouldn’t draw any conclusions about modern CPUs from that factoid.As to your overall question, it’s hard to answer without more information about your goals. Perhaps you can offer up some details of the problem you’re trying to solve.Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’15
Xcode crashes when I try to make a storyboard reference the target of a relationship segue
If I add a storyboard reference to the storyboard and then try to make that reference the target of a relationship segue from a tab bar controller, xcode always crashes immediately. Has anyone else had this problem? I know that ios8 doesn't support references as targets of relationship segues, but I'm explicitly targeting ios9 in the project's settings, and xcode shouldn't crash in any case.
Replies
6
Boosts
0
Views
2.1k
Activity
Nov ’15