Post

Replies

Boosts

Views

Activity

Reply to Generic parameter 'V' could not be inferred Xcode error Please help
I've spent 3 or 4 days working on a issue that came down to this message 'V' could not be inferred. The problem turned out to be the compiler couldn't take the time to tell me the Transaction model did NOT have a property 'quantity' (it was changed to 'shares'). I found this out when I started factoring out pieces of the View into components... in this case when I got to creating a TransactionRow View the simplified code could be compiled and the 'quantity' property got flagged as non existent. Wow - such a bad compiler message. Had me thinking my Query properties were bad. Lesson I hope to learn - when things go to crap... simplify!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25
Reply to Protocol Naming Convention
I'm pondering this question in relation to a Protocol associated with CloudKit. I want a name for a protocol - like Coadable - is used for JSON to/from Objects. My desired protocol NAME will ensure that the Object implements the ability to be Instantated from a CKRecord and has a readable property that is a CKRecord. I'm pondering sticking with the Cloud metaphore... // Other options for a Protocol name: Precipitable, Materializable, dematerialize, evaporable, Sublimation // capabile of being  instantiated by CloudKit (from cloud to actual) & Sublimation (solid > gas phase change) protocol CKPrecipitable {     init?(record: CKRecord)     var record: CKRecord { get } } What's you opinion?
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’22
Reply to Xcode 13 indexing is broken
I've been struggling with this issue for days now. Running down all kinds of attempts... I can NOT say this was a general resolution. I turned off Indexing in Xcode with: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 1 And later after the code fixes back on by quiting Xcode and running: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 0 This appears to have given the compiler enough CPU to complain about one of my Swift Views. It was not compiling - nor showing errors in the IDE editor. So when it finnaly got enough CPU to complain and I started fixing... One of the complaints was the SwiftUI classic: "The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions" So that complaint was at the top of a View... so I successfully decomposed the view. And compiling started happening again. I turned back Indexing On - it controls autocomplete and other useful IDE features you will want. Good luck!
Aug ’22
Reply to Generic parameter 'V' could not be inferred Xcode error Please help
I've spent 3 or 4 days working on a issue that came down to this message 'V' could not be inferred. The problem turned out to be the compiler couldn't take the time to tell me the Transaction model did NOT have a property 'quantity' (it was changed to 'shares'). I found this out when I started factoring out pieces of the View into components... in this case when I got to creating a TransactionRow View the simplified code could be compiled and the 'quantity' property got flagged as non existent. Wow - such a bad compiler message. Had me thinking my Query properties were bad. Lesson I hope to learn - when things go to crap... simplify!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Protocol Naming Convention
I'm pondering this question in relation to a Protocol associated with CloudKit. I want a name for a protocol - like Coadable - is used for JSON to/from Objects. My desired protocol NAME will ensure that the Object implements the ability to be Instantated from a CKRecord and has a readable property that is a CKRecord. I'm pondering sticking with the Cloud metaphore... // Other options for a Protocol name: Precipitable, Materializable, dematerialize, evaporable, Sublimation // capabile of being  instantiated by CloudKit (from cloud to actual) & Sublimation (solid > gas phase change) protocol CKPrecipitable {     init?(record: CKRecord)     var record: CKRecord { get } } What's you opinion?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Xcode 14 beta 6 Indexing | Processing files forever - hangs So does Compiles.
I turned off Indexing in Xcode with: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 1 This appears to have given the compiler enough CPU to complain about one of my Swift Views.
Replies
Boosts
Views
Activity
Aug ’22
Reply to Xcode 13 indexing is broken
I've been struggling with this issue for days now. Running down all kinds of attempts... I can NOT say this was a general resolution. I turned off Indexing in Xcode with: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 1 And later after the code fixes back on by quiting Xcode and running: david@Mac ~ % defaults write com.apple.dt.XCode IDEIndexDisable 0 This appears to have given the compiler enough CPU to complain about one of my Swift Views. It was not compiling - nor showing errors in the IDE editor. So when it finnaly got enough CPU to complain and I started fixing... One of the complaints was the SwiftUI classic: "The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions" So that complaint was at the top of a View... so I successfully decomposed the view. And compiling started happening again. I turned back Indexing On - it controls autocomplete and other useful IDE features you will want. Good luck!
Replies
Boosts
Views
Activity
Aug ’22
Reply to Plotting a Stock Chart with ScaleType <missing> WeekDay
Does anyone know how the other apps do this? 100 | | 50 | | 0 |_______________________ Th F M T W Th F Maybe I don't know how to ask the right/best question. I want to plot price data with the latest price on the right and skipping weekend days (Sat. and Sunday). Any ideas?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to VStack showing error. I'm unable to figure out why
I've started see these similar error in Xcode 14 BETA. Trailing closure passed to parameter of type 'HorizontalAlignment' that does not accept a closure I've resolved it once by wrapping my contents inside a Group {} - SwiftUI block. ... might work...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Check if iOS 14 is available in SwiftUI body
I have Xcode Version 13.3 (13E113) and have a similar compiler error Expected declaration on line:  if #available(iOS 15, *) { Inside a View struct. FYI.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’22