tmc / tmc/apple

appkit.NSModalResponses values appear undefined

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
27
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I was attempting to use the file-picker based on

https://github.com/tmc/apple/blob/872b4b8c75cb24617d606e0484c1db1e2948f01e/examples/appkit/file-picker/main.go

The example doesn't seem to work though and always returns Cancelled

Poking a little by adding some logging

		response := panel.RunModal()

		log.Println("response", response)
		log.Println("ok", appkit.NSModalResponses.OK)
		log.Println("continue", appkit.NSModalResponses.Continue)
		log.Println("cancel", appkit.NSModalResponses.Cancel)
		log.Println("stop", appkit.NSModalResponses.Stop)

I receive

2026/09/10 15:28:25 response 1
2026/09/10 15:28:25 ok 0
2026/09/10 15:28:25 continue 0
2026/09/10 15:28:25 cancel 0
2026/09/10 15:28:25 stop 0

It would appear appkit.NSModalResponses.* constants never actually get populated with values and just return 0

https://github.com/tmc/apple/blob/872b4b8c75cb24617d606e0484c1db1e2948f01e/appkit/global_vars.gen.go#L18126-L18137

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the file-picker example in examples/appkit/file-picker/main.go and the generated values in appkit/global_vars.gen.go around the referenced lines. Run the example and inspect how NSModalResponses values are populated or exposed. Done means the response constants have usable values and the example can distinguish a successful selection from cancellation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.