Discussion:
New Problem in Dialog
Daniel Drijard
2018-04-16 18:27:49 UTC
Permalink
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 :
***@cern.ch<mailto:***@cern.ch>
Thoiry F-01710
48, rue des Savoies
donJ
2018-04-16 21:37:56 UTC
Permalink
    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
Hi Daniel,
Others can probably help you more with some of this, but maybe this will
help.

There is nothing in a text file that identifies the creator. You can see
this if you make a text file with a single ASCII letter in it and check
the size. It will be one byte.
Permissions, dates, etc. are maintained by the file system and used by
the file manager. If the .txt extension is not enough, you may have to
read the first part of the files and look for some characteristic that
your app will identify.

I don't know what operating system you are using, but it may be that the
dialog box is using a system function to select what to include. My
linux systems scan the files and if all characters can be interpreted as
printable (plus a few CR, TAB, etc) characters, it will try to open the
file in a text editor unless the file has executable permissions.

Don
Daniel Drijard
2018-04-17 11:57:54 UTC
Permalink
Hello,

Thanks for the information about extensions.

About my difficulty on using or not the extension .txt in files considered by my dialog, I have solved it by using in the dialog the filter “ALL”. Thus, now, files are accepted with the extension .txt or without extension.

To answer a question of donJ, I use APPLE computers. I have an iMac Retina with the system Sierra (OSX 10.12.6) and a MacBook Pro with El Capitan (OSX 10.11.6). These computers were bought in September 2015 and April 2009, respectively. I have as well a Titanium 15” (OSX 10.4.11) bought in December 2002, which allows me to use OS9.
The age of the second induces me to replace it.

The indecent frequency of updates from Apple induces me to switch to another brand. This is a bit annoying because I started with Apple in 1982 and, now pretty old (82), I did not consider switching for possibly only a few years (?). In addition, I heard that Apple would switch to a new processor and consequently new system (not OSX). The compatibility between successive systems that I appreciated in Apple vanished I think about 15 years ago. Thus, Apple would make a big jump. It may as well start investing money in selling apples.
I worked with colleagues in particles Physics at CERN, contributing to the software needed to analyse the very large data collected from our detectors. We created multiple publications about physics results but we do not have a series of frequent modifications (updates), as Apple does. I often wonder if the number of bugs of Apple is larger in an update than in the file it corrects ! The modifications in our software are known (they are distributed within our teams), and rare. Those of Apple are unknown and probably not transmissible.

Practically, I consider switching to Linux (evidently NOT to Windows ).

Cordially,
Daniel


On 16 04 2018, at 23:37, donJ <***@gmail.com<mailto:***@gmail.com>> wrote:

On 04/16/2018 01:27 PM, Daniel Drijard wrote:
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


Hi Daniel,
Others can probably help you more with some of this, but maybe this will help.

There is nothing in a text file that identifies the creator. You can see this if you make a text file with a single ASCII letter in it and check the size. It will be one byte.
Permissions, dates, etc. are maintained by the file system and used by the file manager. If the .txt extension is not enough, you may have to read the first part of the files and look for some characteristic that your app will identify.

I don't know what operating system you are using, but it may be that the dialog box is using a system function to select what to include. My linux systems scan the files and if all characters can be interpreted as printable (plus a few CR, TAB, etc) characters, it will try to open the file in a text editor unless the file has executable permissions.

Don


Daniel Drijard
Thoiry téléphone :
04 50 41 22 75
international
+33/4 50 41 22 75
Courriel :
***@cern.ch<mailto:***@cern.ch>
Thoiry F-01710
48, rue des Savoies
Markus Winter
2018-04-17 12:09:27 UTC
Permalink
Post by Daniel Drijard
The indecent frequency of updates from Apple induces me to switch to another brand.
[…]
Practically, I consider switching to Linux (evidently NOT to Windows ).
So because Apple has too many updates you intent to switch to a system with even more frequent updates?

Don’t get me wrong, Linux can be fun, and by all means “good luck” to you, but that is one of the dumbest “reasons” for switching that I have ever heard …

Markus

Sent from my iPad
Daniel Drijard
2018-04-17 14:15:00 UTC
Permalink
I received 19 updates from Apple since the beginning of 2018, though coming by groups of 4. This is equivalent to about one per week. I have no experience with Linux sending updates, too many? Your email warns me that this will be worse from Linux. This is an argument to consider before I decide to switch.

Daniel

On 17 04 2018, at 14:09, Markus Winter <***@googlemail.com<mailto:***@googlemail.com>> wrote:


On 17. Apr 2018, at 13:57, Daniel Drijard <***@cern.ch<mailto:***@cern.ch>> wrote:

The indecent frequency of updates from Apple induces me to switch to another brand.
[
]
Practically, I consider switching to Linux (evidently NOT to Windows ).

So because Apple has too many updates you intent to switch to a system with even more frequent updates?

Don’t get me wrong, Linux can be fun, and by all means “good luck” to you, but that is one of the dumbest “reasons” for switching that I have ever heard 


Markus

Sent from my iPad


Daniel Drijard
Thoiry téléphone :
04 50 41 22 75
international
+33/4 50 41 22 75
Courriel :
***@cern.ch<mailto:***@cern.ch>
Thoiry F-01710
48, rue des Savoies
donJ
2018-04-17 14:47:19 UTC
Permalink
   I received 19 updates from Apple since the beginning of 2018,
though coming by groups of 4. This is equivalent to about one per
week. I have no experience with Linux sending updates, too many? Your
email warns me that this will be worse from Linux. This is an argument
to consider before I decide to switch.
Daniel
Hi Daniel,
No Linux system has ever *sent* me an update. The different packages are
updated constantly in the repositories, but they are never necessary and
never forced. I update a program when there is something I need or want
and I look at system update stuff once or twice a year, only updating
what I want.

NOTE: I, too started with Mac, in 1990, a time when Apple tried very
hard to be compatible with everybody and everything. I see that same
attitude in the Linux community today.

Don
Daniel Drijard
2018-04-17 14:58:10 UTC
Permalink
Hi Don,
I see 2 different reasons for an update. One corresponds to correcting a bug which definitely must be applied, this is mostly what I see from Apple. The other is adding an improvement which is maybe more the case for Linux.
Daniel

On 17 04 2018, at 16:47, donJ <***@gmail.com<mailto:***@gmail.com>> wrote:

On 04/17/2018 09:15 AM, Daniel Drijard wrote:
I received 19 updates from Apple since the beginning of 2018, though coming by groups of 4. This is equivalent to about one per week. I have no experience with Linux sending updates, too many? Your email warns me that this will be worse from Linux. This is an argument to consider before I decide to switch.

Daniel

Hi Daniel,
No Linux system has ever *sent* me an update. The different packages are updated constantly in the repositories, but they are never necessary and never forced. I update a program when there is something I need or want and I look at system update stuff once or twice a year, only updating what I want.

NOTE: I, too started with Mac, in 1990, a time when Apple tried very hard to be compatible with everybody and everything. I see that same attitude in the Linux community today.

Don


Daniel Drijard
Thoiry téléphone :
04 50 41 22 75
international
+33/4 50 41 22 75
Courriel :
***@cern.ch<mailto:***@cern.ch>
Thoiry F-01710
48, rue des Savoies
Vaughn Cordero
2018-04-17 14:55:04 UTC
Permalink
Hello Daniel

As a longtime MacOS user, I’d point out that the way that updates are distributed has changed over time as the Internet became an ‘always on’ resource that can poll and push tiny patches.

I still remember laboriously downloading 4-6 floppies worth with monolithic x.x.1 updates in the System 6 days, where you got your bug fixes if and when you learned that a new Macintosh was released. Many if not most of us where still on dialup downloading CD images too.

The internet has also caused the increased frequency of both security exploits and their remedies.

We live in a different era and notice the inexorable shift to a greater or lesser extent.

Salut

Vaughn

Sent from my iPhone
Post by Daniel Drijard
I received 19 updates from Apple since the beginning of 2018, though coming by groups of 4. This is equivalent to about one per week. I have no experience with Linux sending updates, too many? Your email warns me that this will be worse from Linux. This is an argument to consider before I decide to switch.
Daniel
Post by Markus Winter
Post by Daniel Drijard
The indecent frequency of updates from Apple induces me to switch to another brand.
[
]
Practically, I consider switching to Linux (evidently NOT to Windows ).
So because Apple has too many updates you intent to switch to a system with even more frequent updates?
Don’t get me wrong, Linux can be fun, and by all means “good luck” to you, but that is one of the dumbest “reasons” for switching that I have ever heard 

Markus
Sent from my iPad
Daniel Drijard
04 50 41 22 75
international
+33/4 50 41 22 75
Thoiry F-01710
48, rue des Savoies
Eduardo Gutierrez de O
2018-04-17 16:43:22 UTC
Permalink
Hi, Daniel.

Linux has way more updates than Mac. Windows as well. Having said this, updates in Windows usually don't force you to reboot as much as on Mac. At any rate frequent updates are always a good thing (as they're usually security updates).

Nonetheless, Linux is extremely different than MacOS. Even from OSX (which was already a big switch from pre-OSX). We've been longer with OSX than "Classic" by now!

Apple has switches processors several times. It never has needed to change OSes and if we change CPU now it won't require a change of OS either. Mac OS has been running on ARM for many years, just as OSX had been running on Intel for years and System 7 had been running on PPC for a while before we moved from 680x0.

You're still using a Mac from 2001 with OS9. That's 17 years. If Apple decides to switch from Intel all its line to ARM or something else (which I doubt, although we may see dual architecture), you can always continue using your last mac from 2018 until 2035 (17 years) :D
Post by Daniel Drijard
Hello,
Thanks for the information about extensions.
About my difficulty on using or not the extension .txt in files considered by my dialog, I have solved it by using in the dialog the filter “ALL”. Thus, now, files are accepted with the extension .txt or without extension.
To answer a question of donJ, I use APPLE computers. I have an iMac Retina with the system Sierra (OSX 10.12.6) and a MacBook Pro with El Capitan (OSX 10.11.6). These computers were bought in September 2015 and April 2009, respectively. I have as well a Titanium 15” (OSX 10.4.11) bought in December 2002, which allows me to use OS9.
The age of the second induces me to replace it.
The indecent frequency of updates from Apple induces me to switch to another brand. This is a bit annoying because I started with Apple in 1982 and, now pretty old (82), I did not consider switching for possibly only a few years (?). In addition, I heard that Apple would switch to a new processor and consequently new system (not OSX). The compatibility between successive systems that I appreciated in Apple vanished I think about 15 years ago. Thus, Apple would make a big jump. It may as well start investing money in selling apples.
I worked with colleagues in particles Physics at CERN, contributing to the software needed to analyse the very large data collected from our detectors. We created multiple publications about physics results but we do not have a series of frequent modifications (updates), as Apple does. I often wonder if the number of bugs of Apple is larger in an update than in the file it corrects ! The modifications in our software are known (they are distributed within our teams), and rare. Those of Apple are unknown and probably not transmissible.
Practically, I consider switching to Linux (evidently NOT to Windows ).
Cordially,
Daniel
Post by donJ
Post by Daniel Drijard
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
Hi Daniel,
Others can probably help you more with some of this, but maybe this will help.
There is nothing in a text file that identifies the creator. You can see this if you make a text file with a single ASCII letter in it and check the size. It will be one byte.
Permissions, dates, etc. are maintained by the file system and used by the file manager. If the .txt extension is not enough, you may have to read the first part of the files and look for some characteristic that your app will identify.
I don't know what operating system you are using, but it may be that the dialog box is using a system function to select what to include. My linux systems scan the files and if all characters can be interpreted as printable (plus a few CR, TAB, etc) characters, it will try to open the file in a text editor unless the file has executable permissions.
Don
Daniel Drijard
04 50 41 22 75
international
+33/4 50 41 22 75
Thoiry F-01710
48, rue des Savoies
Daniel Drijard
2018-04-17 17:44:01 UTC
Permalink
Eduardo,

In general, I hate updates. I certainly accept an update which corrects a clear bug, such as using Pi=2.71828 instead of Pi=3.14159, but I wonder why this could be a regular activity. I would like to avoid updates which add a comma that was forgotten in a note (I exaggerate intentionally). I would like to be told which updates are necessary ---- if this is the case for those frequently distributed by Apple, I wonder how these people can create so many software bugs. In my physicist job, I would have strongly protested against my student, and eventually fired him.

Daniel

On 17 04 2018, at 18:43, Eduardo Gutierrez de O <***@mac.com<mailto:***@mac.com>> wrote:

Hi, Daniel.

Linux has way more updates than Mac. Windows as well. Having said this, updates in Windows usually don't force you to reboot as much as on Mac. At any rate frequent updates are always a good thing (as they're usually security updates).

Nonetheless, Linux is extremely different than MacOS. Even from OSX (which was already a big switch from pre-OSX). We've been longer with OSX than "Classic" by now!

Apple has switches processors several times. It never has needed to change OSes and if we change CPU now it won't require a change of OS either. Mac OS has been running on ARM for many years, just as OSX had been running on Intel for years and System 7 had been running on PPC for a while before we moved from 680x0.

You're still using a Mac from 2001 with OS9. That's 17 years. If Apple decides to switch from Intel all its line to ARM or something else (which I doubt, although we may see dual architecture), you can always continue using your last mac from 2018 until 2035 (17 years) :D

On 17 Apr 2018, at 13:57, Daniel Drijard <***@cern.ch<mailto:***@cern.ch>> wrote:

Hello,

Thanks for the information about extensions.

About my difficulty on using or not the extension .txt in files considered by my dialog, I have solved it by using in the dialog the filter “ALL”. Thus, now, files are accepted with the extension .txt or without extension.

To answer a question of donJ, I use APPLE computers. I have an iMac Retina with the system Sierra (OSX 10.12.6) and a MacBook Pro with El Capitan (OSX 10.11.6). These computers were bought in September 2015 and April 2009, respectively. I have as well a Titanium 15” (OSX 10.4.11) bought in December 2002, which allows me to use OS9.
The age of the second induces me to replace it.

The indecent frequency of updates from Apple induces me to switch to another brand. This is a bit annoying because I started with Apple in 1982 and, now pretty old (82), I did not consider switching for possibly only a few years (?). In addition, I heard that Apple would switch to a new processor and consequently new system (not OSX). The compatibility between successive systems that I appreciated in Apple vanished I think about 15 years ago. Thus, Apple would make a big jump. It may as well start investing money in selling apples.
I worked with colleagues in particles Physics at CERN, contributing to the software needed to analyse the very large data collected from our detectors. We created multiple publications about physics results but we do not have a series of frequent modifications (updates), as Apple does. I often wonder if the number of bugs of Apple is larger in an update than in the file it corrects ! The modifications in our software are known (they are distributed within our teams), and rare. Those of Apple are unknown and probably not transmissible.

Practically, I consider switching to Linux (evidently NOT to Windows ).

Cordially,
Daniel


On 16 04 2018, at 23:37, donJ <***@gmail.com<mailto:***@gmail.com>> wrote:

On 04/16/2018 01:27 PM, Daniel Drijard wrote:
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


Hi Daniel,
Others can probably help you more with some of this, but maybe this will help.

There is nothing in a text file that identifies the creator. You can see this if you make a text file with a single ASCII letter in it and check the size. It will be one byte.
Permissions, dates, etc. are maintained by the file system and used by the file manager. If the .txt extension is not enough, you may have to read the first part of the files and look for some characteristic that your app will identify.

I don't know what operating system you are using, but it may be that the dialog box is using a system function to select what to include. My linux systems scan the files and if all characters can be interpreted as printable (plus a few CR, TAB, etc) characters, it will try to open the file in a text editor unless the file has executable permissions.

Don


Daniel Drijard
Thoiry téléphone :
04 50 41 22 75
international
+33/4 50 41 22 75
Courriel :
***@cern.ch<mailto:***@cern.ch>
Thoiry F-01710
48, rue des Savoies



Daniel Drijard
Thoiry téléphone :
04 50 41 22 75
international
+33/4 50 41 22 75
Courriel :
***@cern.ch<mailto:***@cern.ch>
Thoiry F-01710
48, rue des Savoies
Eduardo Gutierrez de O
2018-04-17 19:37:50 UTC
Permalink
Your program couldn't display an open file dialog. This was not due to a fault of yours or the program, but due to a bug in your code.

Apple Software is thousands of times more complex, and use cases are enormous. Just that is enough to have a multitude of bugs appearing no matter how much testing is done.

Nonetheless, most trivial bugs are not usually addressed in small updates. They tend to be rolled into larger point releases, which fix the big bugs that inevitably crop up when big and complex software hits the real world, where millions of individual, different configurations exist.

There's also security updates, which are not related to bugs, but circumstance. We live in a world where security is taken a lot more seriously than a couple of decades ago (also because it's a world that is a lot more connected and with several orders of magnitude the amount of malicious players).

Apple (and others) tend to make clear which updates are important and which ones are not, and from my recollection have made only one update mandatory (as in, applied without user interaction) in the last decade.

As a biochemical engineer with close ties to physicists I know as a matter of fact that errors and miscalculations are common when theory hits the real world, which is why there are many processes and methodologies to fix and correct them, both during experimentation and in real-world implementation.

Eduo
Post by Daniel Drijard
Eduardo,
In general, I hate updates. I certainly accept an update which corrects a clear bug, such as using Pi=2.71828 instead of Pi=3.14159, but I wonder why this could be a regular activity. I would like to avoid updates which add a comma that was forgotten in a note (I exaggerate intentionally). I would like to be told which updates are necessary ---- if this is the case for those frequently distributed by Apple, I wonder how these people can create so many software bugs. In my physicist job, I would have strongly protested against my student, and eventually fired him.
Daniel
Post by Eduardo Gutierrez de O
Hi, Daniel.
Linux has way more updates than Mac. Windows as well. Having said this, updates in Windows usually don't force you to reboot as much as on Mac. At any rate frequent updates are always a good thing (as they're usually security updates).
Nonetheless, Linux is extremely different than MacOS. Even from OSX (which was already a big switch from pre-OSX). We've been longer with OSX than "Classic" by now!
Apple has switches processors several times. It never has needed to change OSes and if we change CPU now it won't require a change of OS either. Mac OS has been running on ARM for many years, just as OSX had been running on Intel for years and System 7 had been running on PPC for a while before we moved from 680x0.
You're still using a Mac from 2001 with OS9. That's 17 years. If Apple decides to switch from Intel all its line to ARM or something else (which I doubt, although we may see dual architecture), you can always continue using your last mac from 2018 until 2035 (17 years) :D
Post by Daniel Drijard
Hello,
Thanks for the information about extensions.
About my difficulty on using or not the extension .txt in files considered by my dialog, I have solved it by using in the dialog the filter “ALL”. Thus, now, files are accepted with the extension .txt or without extension.
To answer a question of donJ, I use APPLE computers. I have an iMac Retina with the system Sierra (OSX 10.12.6) and a MacBook Pro with El Capitan (OSX 10.11.6). These computers were bought in September 2015 and April 2009, respectively. I have as well a Titanium 15” (OSX 10.4.11) bought in December 2002, which allows me to use OS9.
The age of the second induces me to replace it.
The indecent frequency of updates from Apple induces me to switch to another brand. This is a bit annoying because I started with Apple in 1982 and, now pretty old (82), I did not consider switching for possibly only a few years (?). In addition, I heard that Apple would switch to a new processor and consequently new system (not OSX). The compatibility between successive systems that I appreciated in Apple vanished I think about 15 years ago. Thus, Apple would make a big jump. It may as well start investing money in selling apples.
I worked with colleagues in particles Physics at CERN, contributing to the software needed to analyse the very large data collected from our detectors. We created multiple publications about physics results but we do not have a series of frequent modifications (updates), as Apple does. I often wonder if the number of bugs of Apple is larger in an update than in the file it corrects ! The modifications in our software are known (they are distributed within our teams), and rare. Those of Apple are unknown and probably not transmissible.
Practically, I consider switching to Linux (evidently NOT to Windows ).
Cordially,
Daniel
Post by donJ
Post by Daniel Drijard
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
Hi Daniel,
Others can probably help you more with some of this, but maybe this will help.
There is nothing in a text file that identifies the creator. You can see this if you make a text file with a single ASCII letter in it and check the size. It will be one byte.
Permissions, dates, etc. are maintained by the file system and used by the file manager. If the .txt extension is not enough, you may have to read the first part of the files and look for some characteristic that your app will identify.
I don't know what operating system you are using, but it may be that the dialog box is using a system function to select what to include. My linux systems scan the files and if all characters can be interpreted as printable (plus a few CR, TAB, etc) characters, it will try to open the file in a text editor unless the file has executable permissions.
Don
Daniel Drijard
04 50 41 22 75
international
+33/4 50 41 22 75
Thoiry F-01710
48, rue des Savoies
Daniel Drijard
04 50 41 22 75
international
+33/4 50 41 22 75
Thoiry F-01710
48, rue des Savoies
Jon Ogden
2018-04-17 17:50:04 UTC
Permalink
Windows updates are abysmal now. They force you to take them. And they always require a reboot - multiple reboots usually.

Daniel, updates today mainly focus on security issues. Others add refinements or new features. Still more are bug fixes.

Sent from my iPhone
Post by Eduardo Gutierrez de O
Hi, Daniel.
Linux has way more updates than Mac. Windows as well. Having said this, updates in Windows usually don't force you to reboot as much as on Mac. At any rate frequent updates are always a good thing (as they're usually security updates).
Nonetheless, Linux is extremely different than MacOS. Even from OSX (which was already a big switch from pre-OSX). We've been longer with OSX than "Classic" by now!
Apple has switches processors several times. It never has needed to change OSes and if we change CPU now it won't require a change of OS either. Mac OS has been running on ARM for many years, just as OSX had been running on Intel for years and System 7 had been running on PPC for a while before we moved from 680x0.
You're still using a Mac from 2001 with OS9. That's 17 years. If Apple decides to switch from Intel all its line to ARM or something else (which I doubt, although we may see dual architecture), you can always continue using your last mac from 2018 until 2035 (17 years) :D
Post by Daniel Drijard
Hello,
Thanks for the information about extensions.
About my difficulty on using or not the extension .txt in files considered by my dialog, I have solved it by using in the dialog the filter “ALL”. Thus, now, files are accepted with the extension .txt or without extension.
To answer a question of donJ, I use APPLE computers. I have an iMac Retina with the system Sierra (OSX 10.12.6) and a MacBook Pro with El Capitan (OSX 10.11.6). These computers were bought in September 2015 and April 2009, respectively. I have as well a Titanium 15” (OSX 10.4.11) bought in December 2002, which allows me to use OS9.
The age of the second induces me to replace it.
The indecent frequency of updates from Apple induces me to switch to another brand. This is a bit annoying because I started with Apple in 1982 and, now pretty old (82), I did not consider switching for possibly only a few years (?). In addition, I heard that Apple would switch to a new processor and consequently new system (not OSX). The compatibility between successive systems that I appreciated in Apple vanished I think about 15 years ago. Thus, Apple would make a big jump. It may as well start investing money in selling apples.
I worked with colleagues in particles Physics at CERN, contributing to the software needed to analyse the very large data collected from our detectors. We created multiple publications about physics results but we do not have a series of frequent modifications (updates), as Apple does. I often wonder if the number of bugs of Apple is larger in an update than in the file it corrects ! The modifications in our software are known (they are distributed within our teams), and rare. Those of Apple are unknown and probably not transmissible.
Practically, I consider switching to Linux (evidently NOT to Windows ).
Cordially,
Daniel
Post by donJ
Post by Daniel Drijard
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
Hi Daniel,
Others can probably help you more with some of this, but maybe this will help.
There is nothing in a text file that identifies the creator. You can see this if you make a text file with a single ASCII letter in it and check the size. It will be one byte.
Permissions, dates, etc. are maintained by the file system and used by the file manager. If the .txt extension is not enough, you may have to read the first part of the files and look for some characteristic that your app will identify.
I don't know what operating system you are using, but it may be that the dialog box is using a system function to select what to include. My linux systems scan the files and if all characters can be interpreted as printable (plus a few CR, TAB, etc) characters, it will try to open the file in a text editor unless the file has executable permissions.
Don
Daniel Drijard
04 50 41 22 75
international
+33/4 50 41 22 75
Thoiry F-01710
48, rue des Savoies
Werner Ubr
2018-04-17 17:53:50 UTC
Permalink
Post by Eduardo Gutierrez de O
Having said this, updates in Windows usually don't force you to reboot as much as on Mac.
You are kidding. Nearly any time the WIN10 developer machine requires automatically updates it reboots. My Macs normally stay some month without a reboot even when an update is done in between. Mainly this has its source in the stupid DLL architecture of Windoze
emile.a.schwarz
2018-04-17 05:43:37 UTC
Permalink
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"
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 :
   ***@cern.ch
Thoiry F-01710
   48, rue des Savoies
Eduardo Gutierrez de O
2018-04-17 18:29:40 UTC
Permalink
The dialog uses filetypes, which generally means extensions but can also define older (better, but legacy and no longer recommended) ways.

The OpenDialog function takes these filetypes as arguments, to know what to show.

This is documented in the guide.

If you've used or copied one of the common filetypes it may include already identifiers that don't use the extension.

As a side note: You should always use an extension. I don't like it but has been the recommended way by Apple for several years (it was the only way for the rest of the platforms already).

As before, it's really hard to help without sample code.

Eduo
Post by Daniel Drijard
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
04 50 41 22 75
international
+33/4 50 41 22 75
Thoiry F-01710
48, rue des Savoies
Continue reading on narkive:
Loading...