Skip to content

Tk overwrites Base.Text #117

@pfitzseb

Description

@pfitzseb

which causes issues when using Atom.jl when importing Tk.jl in user code.

Ref: JunoLab/atom-julia-client#118

The solutions I see would be to either

  • not export Text and require the user to use Tk.Text or maybe define TkText or
  • make Widget not include AbstractString and instead use TkWidget(x::AbstractString) or something similar.

Edit: And since the second half of this issue doesn't appear for mysterious reasons (actually, most likely a forgotten Ctrl+Enter...):

  • use Text{typeof(x)}(x) everywhere in Atom to use the parametric constructor from Base, but that seems oh so ugly. Maybe there's another way to enforce using a specific constructor?

I'm not sure if there's any kind of guideline for overwriting types from Base, but Tk's behaviour seems kinda strange to me. If there's something we can/should change on our side, I'd be glad to do it -- otherwise I'd be happy to implement some change in Tk as well.

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