Autor Beitrag
chickenfigt1989
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Mo 15.03.10 23:29 
Hey
Ich hab in mein MainMenü ein Speichern unter drin. Wen ich jetzt was Speicher und der Name ist schon vorhanden, dann wird sie aber einfach überschrieben.
Jetzt hab ich bei den Savedialog unter Options ofOverwritePrompt auf true gestellt, aber ich werde immer noch nicht gefragt ob ich die Datei überschreiben will.
Gibt es ne andere Möglichkeit?
Lg
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 15.03.10 23:47 
Welches Delphi? Welches Betriebssystem?
Nicht nachvollziehbar..
Wenn ich OverwritePrompt auf True stelle, udn ne Datei auswähle, die es schon gibt, werd ich gefragt, ob ich die erstzen möchte.

_________________
PROGRAMMER: A device for converting coffee into software.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Mo 15.03.10 23:50 
Delphi 7 Personal Edition
Win Vista
Bei mir gehts aber leider nicht :(
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 15.03.10 23:51 
user profile iconXentar hat folgendes geschrieben Zum zitierten Posting springen:
Welches Delphi? Welches Betriebssystem?

Welche Benutzerrechte?
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Mo 15.03.10 23:55 
Adminrechte
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mo 15.03.10 23:57 
Admin"rechte" oder "als Admin ausgeführt"?

Irgendwann lernen die Leute den Unterschied *g*

_________________
PROGRAMMER: A device for converting coffee into software.
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Mo 15.03.10 23:58 
kann es sein das die Datei gar nicht offen ist?
sorry hatt damit nichts zu tun :wink:
irrtum von mir :?
Gruss ALf

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!


Zuletzt bearbeitet von ALF am Di 16.03.10 00:15, insgesamt 2-mal bearbeitet
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 16.03.10 00:12 
Was hat das mit "offen" zu tun? Es geht darum, dass sie schon existiert, aber im Speichern-unter-Dialog keine entsprechende Abfrage kommt.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Di 16.03.10 00:15 
Als Admin Ausgeführt.
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Di 16.03.10 00:27 
Ach, was sind wir heute wieder sparsam mit Informationen :D

Du könntest mal ein neues Projekt anlegen, wo du nur den SaveDialog draufsetzt. Das ganze dann komplett mit Quellcode und exe hier hochladen, dann kann das jemand anderes mit Vista ausprobieren.

_________________
PROGRAMMER: A device for converting coffee into software.
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Di 16.03.10 00:31 
Wirklich auf true gesetzt? Auch nur 1 savedialog im Programm drin? (soll auch vorkommen das man 2 drin hat und das falsche bearbeitet?) obwohl man es nicht braucht!
oder leg ein neues projekt an mit nur dem savdialog und teste noch mal.
opps zu langsam :wink:
Gruss Alf

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Di 16.03.10 00:46 
Ich habe drei Savedialogs drin aber bei allen dreien auf True gestellt.
Habe es mit nen neuen Project getestet, allerdings geht es da auch nicht.
ALF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1085
Erhaltene Danke: 53

WinXP, Win7, Win10
Delphi 7 Enterprise, XE
BeitragVerfasst: Di 16.03.10 00:55 
Brauch man 3 savedialoge mh... ?
Egal, trotzdem komisch :gruebel:

trotzt neuem Projekt mh...., Kann mir kein reim drauf machen!
Da sind Fachleute gefragt. :roll:, Weil irgenwie nicht nachvollziehbar!

Gruss ALf

_________________
Wenn jeder alles kann oder wüsste und keiner hätt' ne Frage mehr, omg, währe dieses Forum leer!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 16.03.10 01:31 
Also bei mir funktioniert es jedenfalls problemlos mit Delphi 7 und Vista, auch wenn ich via UAC das Programm als Admin ausführe.

Häng doch das Testprojekt bitte einmal gepackt inkl. Quelltext an.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Di 16.03.10 01:46 
Mein Quelltext:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, SynEdit, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    SynEdit1: TSynEdit;
    SaveDialog1: TSaveDialog;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var Dateiname: string;
begin
  if SaveDialog1. Execute then
  begin
    if ExtractFileExt(SaveDialog1.FileName) = '' then
      case SaveDialog1.FilterIndex of
        1: DateiName := ChangeFileExt(SaveDialog1.FileName,'.py');


      end
    else
      Dateiname := SaveDialog1.FileName;
    SynEdit1.Lines.SaveToFile(Dateiname);
    SynEdit1.Modified := false;
  end;
end;

end.


Rest ist im Anhang
MfG
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 16.03.10 02:08 
Da wirst du wohl dein Windows neu installieren müssen, das Programm funktioniert hier mit Vista wunderbar.

Das einzige was mir noch einfällt ist, dass du mit den ausgeblendeten Dateierweiterungen nicht klarkommst, aber das stellt man ja normalerweise als erstes nach einer Neuinstallation von Windows um.
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Di 16.03.10 02:14 
Da wirst du wohl Recht haben.
Seit gestern erhalte ich auch dauernd Fehlermeldungen wen ich compilieren will.
Aber trotzdem Danke euch allen für eure Hilfe.
MfG
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Di 16.03.10 02:19 
Der SaveDialog hat so einige Macken - kann gut sein, dass das bei dir auch nicht geht. Mit DefaultExt zusammen ist das Verhalten fast unvorhersehbar... Ich hatte damals mit D4 mal den Effekt, und mir dann angewöhnt diese Art Abfragen selbst zu machen (Also FileExists, MessageDlg & Co.)

Werde deinen Code auch mal testen und dann hier
Tante Edith: funktioniert wie gewollt auf XP und W2k, compiliert mit D7. Tut mir leid :nixweiss:


Trotzdem: Windows einfach mal so neu installieren, my ass.

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."


Zuletzt bearbeitet von Martok am Di 16.03.10 03:12, insgesamt 1-mal bearbeitet
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Di 16.03.10 02:26 
Naja ich müsste zwar den Pc eh mal wieder Formatieren, aber Lieber wärs mir wen es ohne gehen würde.
Wär echt cool von dir.
MfG
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 16.03.10 10:50 
user profile iconMartok hat folgendes geschrieben Zum zitierten Posting springen:
Der SaveDialog hat so einige Macken

Das wäre mir ehrlich gesagt neu. Davon höre ich zum ersten mal.