JuliaInterop / ObjectiveC.jl

Objective-C embedded in Julia
Other
39 stars 10 forks source link

Error with misplaced expression escape #5

Closed rsrock closed 1 year ago

rsrock commented 8 years ago

Appears to be triggered when an Objective-C message in [ ... ] is combined with standard Julia syntax. Here's an example (from Julia Version 0.4.0-dev+6527).

julia> using ObjectiveC

julia> @objc [[[NSHost currentHost] localizedName] UTF8String] |> bytestring
ERROR: unsupported or misplaced expression escape

julia> @objc [[[NSHost currentHost] localizedName] UTF8String]
Ptr{Int8} @0x00007f977aec8ea1

Seems to be the escape called here: https://github.com/one-more-minute/ObjectiveC.jl/blob/c1a38e9ba01ffc645c64eec75413e4432f2d5083/src/syntax.jl#L32. But I don't know how to debug further.

(This is pretty nifty, BTW.)

rennis250 commented 8 years ago

Thanks for this. It helped with fixing loading the package and loading frameworks.

Best, Rob