Post

Replies

Boosts

Views

Activity

Comment on Multiple environmentObject
Having this setup means that changes will take effect for network and product. what if i want only properties in network to have objectWillChange.send() take effect? I do not want those in product to be rebuilt. if both of these are placed in 1 ObservableObject model, then all their properties gets rebuilt instead of just those in network
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’22
Comment on Why Doesnt this Wrap Correctly?
hi @claude31 i udnerstand what you mean. o copy pasted the c ode as it is , i explicitly declar3d it because it is a subview that will be used in a for loop. i figured as a param reusing it will not be resource heavy. or is it the same as having GeometryReader in every struct like what you did
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
Comment on How to set instance of a property of the same class type
I have decided to convert a lib into Swift since it's the one library that works for me in Android. And the Clipper libraries do not work with the data that I am using. The instance of "this" is the class itself. e.g. this class https://github.com/ChristianLutz/gpcj/blob/master/gpcj/src/main/java/com/seisw/util/geom/Clip.java line 1536. Currently, I added a setter method instead as a workaround. But i dont think it will work in this scenario PolySimple.java (please use same url) line 333
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’23
Comment on Can A Property In An ObservableObject listen to Another Property? How?
ill get back to you in a few days since im out of town now. i actually also tried the manual trigger to no avail but it looks like the way you did it is different from what i did. ill check this one out and compare. thank you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Comment on Multiple environmentObject
Having this setup means that changes will take effect for network and product. what if i want only properties in network to have objectWillChange.send() take effect? I do not want those in product to be rebuilt. if both of these are placed in 1 ObservableObject model, then all their properties gets rebuilt instead of just those in network
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Comment on Attempting to store bytes of data in CFPreferences/NSUserDefaults on this platform is invalid
Not an image, just json data. Hmm ok. But what is weird is that I can do this on the first try. It does not work if save the data when the key already exists. I tried to remove the key and add it but same result.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Comment on Parser Json with Single Quote
Ok. that's what I did as workaround in the meantime. So there is really no other way for that except to change single to double quotes. I see. thank you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Comment on How To Fix CoreData: error: Failed to load mode model named ...
Thanks for clarifying. Got your hint. Documentation example is not clear and incomplete though.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on How To Set Values To Binding Variable
the value works ok from the Child View. cityUrlId is set. and i dismiss the child view so i modify cityUrlId from the parent view and that is where the issue comes in. i do some prints in the setter it actually gives the correct value but the getter does not.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on How To Set Values To Binding Variable
Sorry. I thought I could a q&a with this one but seems it is not so. Ill close this one since i did a different workaround. I used another non state variable once the state variable is updated.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on Why Doesnt this Wrap Correctly?
hi @claude31 i udnerstand what you mean. o copy pasted the c ode as it is , i explicitly declar3d it because it is a subview that will be used in a for loop. i figured as a param reusing it will not be resource heavy. or is it the same as having GeometryReader in every struct like what you did
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on How To Create Data Json Object from Empty String
I didnt think about that he he he. will check. I was basing it in ny android code so i thought the Data object should be somewjat of json type.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on How To Create Data Json Object from Empty String
It works. thanks
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on Possible to set body view's background to transparent?
lol. .clear, i didnt expect that keyword . thanks claude31!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on Possible to set body view's background to transparent?
@Claude31 it didnt work out though. the background of the view is all white.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Comment on What does "#if DEBUG" really mean in Swift?
@eskimo im curious since im new to swift. is it possible to mix #if debug with another conditional? Like i need to have 2 conditionals and one of them is if it's debug.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’23
Comment on For Loop Conversion in Swift
Not much in there. but guess the while loop is the only way to go. Thank you.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’23
Comment on How to set instance of a property of the same class type
I have decided to convert a lib into Swift since it's the one library that works for me in Android. And the Clipper libraries do not work with the data that I am using. The instance of "this" is the class itself. e.g. this class https://github.com/ChristianLutz/gpcj/blob/master/gpcj/src/main/java/com/seisw/util/geom/Clip.java line 1536. Currently, I added a setter method instead as a workaround. But i dont think it will work in this scenario PolySimple.java (please use same url) line 333
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’23