khchen / wNim

Nim's Windows GUI Framework
MIT License
327 stars 17 forks source link

[Help] wFileDialog returns an empty sequence when using wFdMultiple. #111

Closed Aetopia closed 1 year ago

Aetopia commented 2 years ago
import wNim/wFileDialog
var fd = FileDialog(style=wFdOpen or wFdMultiple or wFdFileMustExist)
echo fd.display()

Using this code snippet simply returns an empy sequence when selecting multiple files.

I am not sure if this some issue with wNim or the parameters, I have passed to the FileDialog function.

khchen commented 2 years ago

Thanks for report. After testing, this is a regression bug of strutils since nim 1.6.0. Nim 1.4.7 works correctly. This code leads the problem:

import strutils
echo "abc\0\0\0".find("\0\0")

Nim 1.4.3 output 3. Nim 1.6.0 output 0.

Aetopia commented 2 years ago

Oh, thank you!

Aetopia commented 2 years ago

Any ETA when this will be fixed?

khchen commented 2 years ago

Bug is in strutils. wNim won't be fixed.