Old 13th April 2010, 20:38   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
weird nsDialogs behaviour

please have a look at the attached dummy-script

when ever you select a directory containing certain file-types (bmp, jpg, avi...), the checkboxes will be checked automatically. however, when i'm deleting the path-name from the text-field, it will always activate the bmp-checkbox.

i haven't been able to spot the problem, any ideas?

ps: the new forum doesn't allow attaching .nsi files
Attached Files
File Type: zip dummy.zip (1.4 KB, 178 views)
Yathosho is offline   Reply With Quote
Old 13th April 2010, 21:24   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
Test post for nsi attachment handling

Quote:
Originally Posted by Yathosho View Post
ps: the new forum doesn't allow attaching .nsi files
-daz
Attached Files
File Type: nsi dummy.nsi (5.2 KB, 186 views)
DrO is offline   Reply With Quote
Old 13th April 2010, 22:01   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
Quote:
Originally Posted by Yathosho View Post
when ever you select a directory containing certain file-types (bmp, jpg, avi...), the checkboxes will be checked automatically. however, when i'm deleting the path-name from the text-field, it will always activate the bmp-checkbox.
only happens on win7, not on xp
Yathosho is offline   Reply With Quote
Old 14th April 2010, 01:04   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Perhaps you have a .bmp file in your root folder?

Essentially, add something like this in your checkbox state changing code..
PHP Code:
${If} ${FileExists"$0\*.bmp"
  
FindFirst $R0 $R1 "$0\*.bmp"
  
FindClose $R0
  
/* GetFullPathName $R1 "$0\$R1" */
  
MessageBox MB_OK "[$R1]" 
..and see what the messagebox believes was found.

For me, the .jpg checkbox would always be checked - simply because I have some JPGs in my root folder ("c:\somefile.jpg").

As for a solution - you should probably trap for an empty line and always uncheck all checkboxes in that situation.. as it's probably not expected behavior for the end-user that you would be looking at the root folder

Edit: Ah - you -are- trapping for it.. but your trap is sprung too late Your ``${ElseIf} $0 == ""`` should come -before- the IfFileExists checks.
Animaether is offline   Reply With Quote
Old 14th April 2010, 09:28   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
thought i tried changing the order before - obviously i didn't, it works now! thanks
Yathosho is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
browse, checkboxes, directoryrequest, nsdialogs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump