Skip to content

Commit b92857d

Browse files
committed
Fix NSSavePanel and NSOpenPanel nullability
Fixes #813.
1 parent eeb5b2c commit b92857d

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

framework-crates/objc2-app-kit/translation-config.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,19 @@ class.NSWindow.main-thread-only = true
191191
# Documented as "Thread-Unsafe"
192192
# class.NSResponder.sendable = false
193193

194+
##
195+
## Fixing nullability.
196+
##
197+
198+
# These are nullable when sandboxed without correct entitlements, see:
199+
# https://github.com/madsmtm/objc2/issues/813
200+
class.NSSavePanel.methods.savePanel.return.nullability = "nullable"
201+
class.NSSavePanel.methods.new.return.nullability = "nullable"
202+
class.NSSavePanel.methods.init.return.nullability = "nullable"
203+
class.NSOpenPanel.methods.openPanel.return.nullability = "nullable"
204+
class.NSOpenPanel.methods.init.return.nullability = "nullable"
205+
class.NSOpenPanel.methods.new.return.nullability = "nullable"
206+
194207
###
195208
### Fixing pointer bounds.
196209
###

generated

0 commit comments

Comments
 (0)