re: New Problem in Dialog

"emile.a.schwarz" <[email protected]> Tue, 17 Apr 2018 07:43:37 +0200 (CEST)
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <1631688678.462.1523943817862.JavaMail.www@wwinf1k22>
There are two answers: in the old (deprecated) times and today…

 

Today: the OS relies on the file extension (.txt) to determine the file contents.

 

.txt files hold text data, nothing else.

 

When you click in a file whose extension is .txt, the OS fires the appropriate application; the application fixed (by Apple, Microsoft, the user can change that) to be fired by default, usually TextEdit / TextPad/WordPar (?).

 

Of course, you can store what you want in your text files, but, beware of the consequences.

 

In short, always add an extension to your files.

 

Also, RTFM (do your home work), then ask here if you’re in trouble.

 

Simple (too simple, a bit misleading) explanation:

https://fr.wikipedia.org/wiki/Extension#Informatique

 

Bonne chance

 

 

> Message du 16/04/18 20:30
> De : "Daniel Drijard" 
> A : "Nug" 
> Copie à : 
> Objet : New Problem in Dialog
> 
>    I have a new dialog problem (possibly connected to my recent one). I want to select a text file in a folder. Thus I gather some text files to which I affect or not the extension .txt. Some of them are accessible (accepted) by the dialog, others not. The point is that I have 2 pieces of code which behave differently for this, one requesting the .txt extension the other refusing it.
    My question is about understanding what is defining the Text style. There is the .txt extension but there must be an internal file’s characteristic. The program which generated the file must be somewhat indicated in the file. 
   I do not know what the dialog uses to accept/reject a file. 
 
Daniel







Daniel Drijard
Thoiry téléphone : 
  04 50 41 22 75
    international
  +33/4 50 41 22 75
Courriel :
   [email protected]
Thoiry F-01710
   48, rue des Savoies