TextField format argument is not implemented
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
Here:
public var body: some View {
Form {
Section {
TextField("Amount", value: $checkAmount, format: .currency(code: Locale.current.currency?.identifier ?? "USD"))
}
Section {
Text(checkAmount, format: .currency(code: Locale.current.currency?.identifier ?? "USD"))
}
}
}
I'm getting:
Skip is unable to determine the owning type for member 'currency'. This often occurs when other issues prevent Skip from matching the surrounding API call, and it may resolve when those issues are fixed. Or add the owning type explicitly (e.g. MyType.currency)
EDIT: I see that the Locale API is fully supported via SkipFoundation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the SwiftUI example using TextField(value:format:) with the currency format, then trace how Skip handles this TextField overload and its format argument. Confirm the existing diagnostic and compare the TextField behavior with the adjacent Text call. Done means the example translates without the owning-type error and supports editing the formatted currency value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100