Skip to content

Restrict JuliaItemModel constructor to match documentation and behavior #205

@steffenhaug

Description

@steffenhaug

The manual states that JuliaItemModel is constructed from a 1D Julia array, but the method currently silently accepts types that are not arrays, without producing a MethodError immediately (as i believe it should since the argument actually needs to be an array) only to then fail down the line. For example:

julia> JuliaItemModel(nothing)
QML.JuliaItemModelAllocated(Ptr{Nothing} @0x0000600003a95660)

I'm wondering if JuliaItemModel method should be restricted to work only with types which are AbstractArray?

Perhaps more insidiously, things that in principle are natural, such as

JuliaItemModel(Observable([1,2,3]))

are accepted, but fails down the line, without making the root cause clear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions