User forums > Nightly builds

The 19 June 2007 build is out.

<< < (3/4) > >>

MortenMacFly:

--- Quote from: killerbot on June 20, 2007, 02:41:39 pm ---Eg. : C:\My{direc tor]y\I[s he(re)
is a valid dir : how stupid it may be, but it is

--- End quote ---
I know. That's why I'm trying to do it the opposite way: *forbid* certain characters (notice the ^ in the RegExp) but allow all others.
With regards, Morten.

Edit: Now this should actually work:

--- Code: ---#ifdef __WXMSW__
const wxString Compiler::FilePathWithSpaces = _T("[a-zA-Z]:\\\\[^/:*?\\\"<>]*\\\\?|[^/:*?\\\"<>]*");
#else
const wxString Compiler::FilePathWithSpaces = _T("[.]{0,2}[/][^\\\\:*?\\\"<>]*/?|[^\\\\:*?\\\"<>]*");
#endif                                           

--- End code ---

skirby:
Why don't you simply exclude only these characters:

--- Quote ---\ / : * ? " < > |
--- End quote ---

Windows forbid these characters when you create or rename a folder.

David Perfors:
Morton, just a reminder ;)
could you use the simple C++ statement:

--- Code: ---if(platform::windows)
--- End code ---
(see prep.h and the anti macro's topics on the forums ;))

MortenMacFly:

--- Quote from: mispunt on June 20, 2007, 03:27:03 pm ---
--- Code: ---if(platform::windows)
--- End code ---
(see prep.h and the anti macro's topics on the forums ;))

--- End quote ---
I can't, as this is a const global variable... ;-)

MortenMacFly:

--- Quote from: skirby on June 20, 2007, 03:21:06 pm ---Why don't you simply exclude only these characters:

--- Quote ---\ / : * ? " < > |
--- End quote ---
Windows forbid these characters when you create or rename a folder.

--- End quote ---
Keep in mind we are cross-platform. But for windows this is what I'm actually trying to do, including to verify a correct file syntax (with drive letter etc...)
With regards, Morten.

Edit: BTW: It really seems to work now, the "Mélange" example at least...
Could some other devs have a look at this proposal, too, please?!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version