Post

Replies

Boosts

Views

Activity

Mac air crashes
My Mac Air has crashed twice in the last couple of days. This is the top of the crash report: panic(cpu 2 caller 0xffffff7fb3ae5505): "Submission on work queue 47 failed due to insufficient space!\n" @IGGuC.cpp:2899 Panicked task 0xffffff903c4223b0: 8 threads: pid 70012: SimMetalHost Backtrace (CPU 2), panicked thread: 0xffffff903f451550, Frame : Return Address What "space" is it talking about? System info: Mac OS version: 21E258 Kernel version: Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 Kernel UUID: B6F8637B-0844-355F-8C82-60FA06149384 KernelCache slide: 0x000000001b200000 KernelCache base: 0xffffff801b400000 Kernel slide: 0x000000001b210000 Kernel text base: 0xffffff801b410000 __HIB text base: 0xffffff801b300000 System model name: MacBookAir8,2 (Mac-226CB3C6A851A671) System shutdown begun: NO Hibernation exit count: 0
1
0
444
Apr ’22
Custom Text modifier that returns a Text
Hi, I would to like create a custom Text modifier that returns a Text, so that I can use the sum operator: Text(..) + Text(..) + Text(..) The accepted answer to the below seems close: https://developer.apple.com/forums/thread/132627 But not quite, so I tried the following mods: protocol TextModifier {   func body(text: Text) -> Text } extension Text {   func modifier<TM: TextModifier>(_ theModifier: TM) -> Text {     return theModifier.body(text: self)   } } struct TestModifier: TextModifier {   func body(text: Text) -> Text {     return text.foregroundColor(.orange).font(.largeTitle)   } } extension Text {   func mymodifier() -> Text {     modifier(TestModifier())   } } // In some view code I can do: Text("abc").mymodifier() + Text("def").mymodifier() And the above works fine. The problem that I have though is that in the TestModifier body I need to apply modifiers that return "some View", and then I'm toast as I need that body to return a "Text". In the above I'm only using modifiers that return Text, so all is good, but that's not useful for me. Is there some way to get back the original Text object after applying modifiers that return "some View"?
0
1
662
Mar ’22