Comments (8)
I don't think @ObservedObject
in this project is working. Is it?
If it should. I had no luck with getting it to compile while having @ObservedObject wrapper somewhere. :/
from swiftwebui.
It should work, here is the sample I was testing with: https://github.com/SwiftWebUI/Tinker2/blob/master/Sources/Tinker2/Views/Tests/BindingTestView.swift
from swiftwebui.
What is this for?
#if canImport(Combine)
import Combine
#elseif canImport(OpenCombine)
import OpenCombine
#endif
Should I add OpenCombine to the project? I think it is not working due to the fact the Two types ObservableObject
are colliding with each others.
from swiftwebui.
I've copy example from here example
That's what I am getting.
Without SwiftWebUI.Obse.... I have error such as:
'ObservableObject' is ambiguous for type lookup in this context
from swiftwebui.
All this is completely unrelated to this issue. OpenCombine is required on Linux, on macOS you can use the regular Combine (but you need Catalina).
from swiftwebui.
What I meant is that I still can't get it to work. Due to errors presented above.
from swiftwebui.
Oh, sorry. Actually it may not work indeed 🤔 That's what the issue is about 😄
I suppose SwiftWebUI is still assuming didChange, but ObservedObject already switched to willChange. Things probably go wrong ...
This might require a little rework.
I'm not sure how much, maybe it isn't actually that bad. Just replacing didChange w/ willChange might work, because WebUI is still working in a transaction. The "will" will still mark the view as dirty and should trigger the diffing.
from swiftwebui.
Resolved compiling issue. By placing ObservableObject in separate file with one import of SwiftWebUI.
Now I can work it out what's happening inside. See if and what is required to be corrected
from swiftwebui.
Related Issues (20)
- Potential issues with `Binding` creation HOT 3
- Combine "layer visuals affecting" views
- Update to reflect API changes from beta to final HOT 2
- Add PreferenceKey's
- No HOT 1
- Export to static web page HOT 2
- @State property change ends with error HOT 6
- EnvironmentObject EXC_BAD_ACCESS HOT 6
- How to publish the binary product to a hosting service? HOT 2
- Change DynamicPropertyInfo.updateInView to use ptr instead of `inout`
- The height of the root view should match the available browser height (was: Access to page color) HOT 4
- No available targets are compatible with triple HOT 4
- How Can I Access to Screen Size? (Fixed) HOT 3
- Use outside apple ecosystem HOT 1
- Type '() -> Label' cannot conform to 'View' HOT 1
- "You might be able to run SwiftWebUI within an iOS app." How might one go about this? HOT 2
- Just to say congratulations on the awesome project! HOT 1
- Cannot run SwiftWebUI on Raspberry Pi Zero W HOT 1
- 6097377315
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftwebui.