In this case it would be really great if you had a minimal reproducible 
example. It looks to me as you are doing everything right, so I would start 
looking for typos and scoping issues. It's hard to find them without 
looking at the code.

Ideally the example should be small and possible to paste into a REPL 
session, but if you can publish your code and don't want to extract only 
the relevant part, that might be fine too.

Julia version and operating system is also nice to include, so that we have 
it available in case we have problems reproducing your results.

Regards Ivar

kl. 20:14:48 UTC+1 fredag 7. november 2014 skrev John Drummond følgende:
>
> Hi,
> I suspect I'm doing something stupid but no idea what I'm missing.
>
> I create a module .
> I create a type in it, DayPriceText
> I import Base.isless
> I define isless for the type
>
> now in the repl I get
>
> methods(isless)
> =>
> # 25 methods for generic function "isless":
> ......
> isless(x::DayPriceText,y::DayPriceText) at 
> c:\works\juliaplay\LogParse.jl:16
>
> but
>
> julia> typeof(a1p)
> Array{DayPriceText,1}
>
> julia> sort(a1p, lt=CILogParse.isless)
> ERROR: `isless` has no method matching isless(::DayPriceText, 
> ::DayPriceText)
>  in sort! at sort.jl:246
>
> julia> sort(a1p)
> ERROR: `isless` has no method matching isless(::DayPriceText, 
> ::DayPriceText)
>  in sort! at sort.jl:246
>
> I'm sure there's some obvious answer, but I've not idea what.
> Thanks for any help
> kind regards, John.
>
>

Reply via email to