Skip to content

Hello World is Broken #3

@runeimp

Description

@runeimp

I tried playing with GoUI today and ran into several issues. But this may all boil down to a single issue that happens when trying to run the hello example. If I clone the repo locally, cd into example/hello, and run go run main.go I get:

# github.com/fipress/GoUI
/Users/runeimp/.local/share/go/lib/src/github.com/fipress/GoUI/provider_macos.go:334:3: warning: implicit declaration of function 'dispatch_async_and_wait' is invalid in C99 [-Wimplicit-function-declaration]
Open config file failed, filename: config/dev.rj , error: open config/dev.rj: no such file or directory
menuCount: 0

bundlePath:/var/folders/p0/m0wd_4c51872rbwhvb769_fh0000gn/T/go-build431077537/b001/exe
index:/var/folders/p0/m0wd_4c51872rbwhvb769_fh0000gn/T/go-build431077537/b001/exe/ui/index.html
dir:/var/folders/p0/m0wd_4c51872rbwhvb769_fh0000gn/T/go-build431077537/b001/exe/ui
run loop
applicationWillFinishLaunching

_menuCount: 0

applicationDidFinishLaunching

Window: become main

Window: become key

which also leaves me with a window with the title "Hello" but an empty page otherwise.

There are a few issues I noted before trying the hello example.

  1. The URI for the repo has many variations
    • https://fipress.org/project/goui and the README.md on GitHub references github.com/fipress/GoUI but then accesses the code as goui.
    • I thought I saw github.com/fipress/goui somewhere. Can't find it at the moment. Maybe I made it up.
    • But the actual URI is github.com/FIPress/GoUI
    • I don't know how much Go cares about capitalization but most Unix systems care a lot. Including Mac depending on configuration.
  2. The operating system suffixes on many files are not correct to my knowledge. None of _macos.go, _ios.go, or especially _macOS.go should work. But all three should (to my understanding) all be _darwin.go. Maybe they are convenience aliases in the build system I'm unaware of? Wouldn't surprise me. In any case all suffixes should be lowercase for safety on all systems that support Go.

Now, those two issues maybe completely unfounded and I mean no disrespect at all. Wouldn't be the first time someone knew more about Go than I. But I wanted to point them out in case they are possible contributing factors to the issue.

BTW, this is on macOS 10.14 Mojave. I haven't tried any of this on other systems yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions