Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-01

Saving namespace files on WinXP

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marcos Douglas B. Santos

I don't know if Lazarus won't support WinXP in the near future, but I would like to notify a bug:
If you try to save a file that has a "namespace" like "foo.bar.unit1.pas" the IDE won't put the file extension.

Is this a known bug?

Marcos Douglas

Reply by email

Mattias Gaertner
to Marcos Douglas B. Santos

On Fri, 27 Jan 2017 17:19:39 -0200
"Marcos Douglas B. Santos via Lazarus"

I don't know if Lazarus won't support WinXP in the near future, but I would like to notify a bug: If you try to save a file that has a "namespace" like "foo.bar.unit1.pas" the IDE won't put the file extension.

What do you mean with "put the file extension"?

Mattias

Reply by email

Bart
to Bart
Bart wrote
IIRC there is a difference between XP and newer Windows wrt to handling of default extension in savedialog.

On Win7 in File Save As dialog:

type foo -> filename = foo.pas (or foo.pp)
type foo.bar -> filename = foo.bar.pas
type foo.doc -> filename = foo.doc
type foo.txt -> filename = foo.txt

It seems like Windows checks if the extension is a registered type, and if so does not apply the default extension.

If I run a sample program with a TSaveDialog it's the same. If I run this in XP-compatibility mode the behaviour is different: if the filename has an extension then then default extension is never applied, so:
foo -> foo.pas
foo.bar -> foo.bar
foo.doc -> foo.doc

Bart

Reply by email

Marcos Douglas B. Santos
to Mattias Gaertner: On Fri, 27 Jan 2017 17:19:39 -0200 "Marcos Douglas B. Santos via Lazarus" What do you…
Mattias Gaertner wrote 6 lines
> I don't know if Lazarus won't support WinXP in the near future, but I > would like to notify a bug: > If you try to save a file that has a "namespace" like > "foo.bar.unit1.pas" the IDE won't put the file extension. What do you mean with "put the file extension"?

Sorry. I meant the file is saved without the ".pas" extension.

Marcos Douglas

Reply by email

Lars
to Bart: On 1/27/17, Marcos Douglas B. Santos via Lazarus IIRC there is a difference between XP…
Show quoted text 10 lines
On 1/27/17, Marcos Douglas B. Santos via Lazarus wrote: If you try to save a file that has a "namespace" like "foo.bar.unit1.pas" the IDE won't put the file extension. Is this a known bug?

But why save an fpc unit with dots in it, does this file syntax even get accepted as a unit?

Delphi has this:
https://sergworks.wordpress.com/2011/08/09/dotted-unit-names-in-delphi/

So it would conflict/confuse with that feature?

Can you even compile an fpc unit that has dots in it? Did fpc ever implement the delphi dotted namespace system? (sorry, I tend to avoid new features and stick with the old, so I have no clue)

Reply by email