Page 1 of 3

PB 5.10 PathRequester() does not show 'extensions'

Posted: Thu Mar 07, 2013 2:00 pm
by infratec
Hi,

I use PB 5.10 x86 on Win 7 x64.

Try this

Code: Select all

PathRequester("Test with directories like Test.001", "")
With directories like:
Test.001
Test.002

You will only see
Test
Test

And if you have directories like:
Test.infratec.001
Test.infratec.002

You will see
Test.infratec
Test.infratec

The last 'extension' is always not shown.

Bernd

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Thu Mar 07, 2013 5:54 pm
by jassing
Do you have "hide extensions for known file types" enabled?

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Thu Mar 07, 2013 6:37 pm
by skywalk
v5.11b1 works on both Windows 7 x86 & x64.

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 8:04 am
by infratec
Hi,

here is the evidence:

Image

Win7 x64 with PB 5.10 x86

The left picture shows the PathRequester, the right is Windows Explorer.

Bernd

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 10:48 am
by Fred
Could you check in another software which also use a path requester ? I don't think there is a flag to set to show the extensions on folders (i didn't know there was even extensions for folders..)

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 10:59 am
by infratec
Hi Fred,

after thinking a bit I found one:

IrfanView Batch Processing, select output directory:
Image

(I deleted the other directory names)

Bernd

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 11:25 am
by davido
Hi infratec,

I tried you code snippet on my system: W7/64bit 5.10/64bit.

The requester shows all the extensions on directories.

Hiding known extensions, as I expected, makes no difference; they still show.

It is, perhaps, odd that others have not flagged the problem you are experiencing.

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 11:49 am
by infratec
Hi davido,

the easy bugs are all fixed, only the tricky ones are left :wink:

How many peoble use such directory names?
Maybe only I.
But I use it to save my old software versions (for example).

Microsoft ways are always mystic :evil:

But it is trange that the IrfanView Requester shows the full names and the PB Requester not.

So something must be different.

Bernd

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:01 pm
by MachineCode
I just tried this on Win 7, 64-bit, and both requesters show the ".000" part when C: was expanded:

Code: Select all

CreateDirectory_("C:\A-Test-Dir.000",0)
SHBrowseForFolder_(@dir.BROWSEINFO)
PathRequester("","C:\")
What does it show for you, infratec?

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:08 pm
by RASHAD
Hi Berned :P
Try the next snippet with then without #BIF_BROWSEFILEJUNCTIONS
and see if there is any difference

Code: Select all

#BIF_BROWSEFILEJUNCTIONS = $00010000

Procedure BrowseCallbackProc(hwnd, msg, lParam, lData)
  Select msg
    Case #BFFM_INITIALIZED
      SendMessage_(hwnd, #BFFM_SETSELECTION, 1, lData)
  EndSelect
EndProcedure

Procedure.s BrowseForFolder( Path.s)
  Folder.s = Space(#MAX_PATH)
  bi.BROWSEINFO
  bi\ulFlags = #BIF_STATUSTEXT | #BIF_BROWSEINCLUDEFILES|#BIF_BROWSEFILEJUNCTIONS
  bi\lpfn = @BrowseCallbackProc()
  bi\lParam = @Path
  result.l = SHBrowseForFolder_(@bi)
  SHGetPathFromIDList_(result, @Folder)
  CoTaskMemFree_(result)
  ProcedureReturn Folder
EndProcedure

BrowseForFolder("c:\users")   ;Use your folder here


Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:12 pm
by infratec
Hi MachineCode,

your example works, but... PB not
Image

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:22 pm
by infratec
Hi MachineCode,

I was to fast.

Your example works fully. Also PB is showing the .000

Than I did some additional tests:

If I use

Code: Select all

SHBrowseForFolder_(@dir.BROWSEINFO)
PathRequester("","")
The PB Requester shows it correct too.

If I comment out the SHBrowseForFolder_() PB shows not the .xxx stuff :!:

It looks like that something is not correct initialized.
After the first call to SHBrowseForFolder_() it is initialized and the PB Requester works Ok.

Bernd

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:32 pm
by davido
Hi infratec,

Pleased to see your problem is solved.

Incidentally Windows does not appear to treat the .001 as an extension, as attempting to rename the file highlights the whole lot.

This is a great Forum :!: :D

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:36 pm
by infratec
davido wrote:Pleased to see your problem is solved.
Nothing is solved :cry:

It's 'only' a workaround. :D

But you are right, a big thank you to all who are involved.

Bernd

Re: PB 5.10 PathRequester() does not show 'extensions'

Posted: Fri Mar 08, 2013 12:38 pm
by mk-soft
No probleme her.

Win7 Pro X64, PB v5.10, v5.11

have you reinstall Purebasic?