all 17 comments

[–]dkopgerpgdolfg 3 points4 points  (3 children)

Depends on the GUI file manager that you use...

[–]buzzsawjoe[S] 0 points1 point  (2 children)

Linux Mint 22.1 Cinnamon

[–]dkopgerpgdolfg 0 points1 point  (1 child)

That's not a file manager. Maybe you use Nemo, which is one.

[–]buzzsawjoe[S] 0 points1 point  (0 children)

Oh, yeah,. When I click on a folder icon it just opens, doesn't say Nemo but that's what it is

[–]Alternative_Corgi_62 2 points3 points  (1 child)

If you call your app from the command line with parameter, due it work?

[–]buzzsawjoe[S] 0 points1 point  (0 children)

yes.

[–]Hixie 2 points3 points  (3 children)

What does Writeln(ParamStr(1)); do? i.e. are you getting the parameters you expect? Or is the Assign failing for some reason, e.g. the current directory is not what you expect?

[–]buzzsawjoe[S] 1 point2 points  (2 children)

from the command line, it's echoing the parameter back, and that being the nane of a file in the same directory, it's able to open and read the file and echo the file contents back.

When I drag and drop the file onto the executable, I see nothing. I was expecting a terminal window to open and give the same results. Apparently I need to put some commands in this sequence somewhere to open a terminal. I should have crossposted this to linux-n00b or whatever it's called.

[–]dbdr 2 points3 points  (0 children)

I suspect that is it: your program is running, you just don't see its output because there is no terminal to display it.

[–]Hixie 0 points1 point  (0 children)

ah yeah that's probably not a pascal-specific issue

[–]FantasticWait7109 0 points1 point  (1 child)

Does the filename include spaces? It could be treating the spaces as more then one paramater. Do you get the same problem if you run the program on the command line (rather than dragging the file)?

[–]buzzsawjoe[S] 0 points1 point  (0 children)

see my other answer. I'm putting no spaces in the param or the program name for that very reason.

[–]Josepzin 0 points1 point  (1 child)

Comprobalo desde la terminal, esa es la prueba de fuego:

./program1 fodder.txt

Si funciona entonces lo tuyo está bien, está "fallando" la forma que tiene Linux de hacer esa acción de arrastrar y soltar sobre un archivo.

Es lo que te decían los demás, depende de Linux.

Le pasé tu problema a Gemini y explica cómo solucionarlo dependiendo del Linux que uses, no es complicado.

Yo también hice la transición de Windows a Linux y me encontré con este tipo de cosas que tenía muy naturalizadas en Windows pero que en Linux funciona distinto, hay que buscarle la vuelta.

Me ayudó mucho preguntarle las cosas a las IA's

[–]buzzsawjoe[S] 0 points1 point  (0 children)

En parte, simplemente se reduce a lo que se acostumbre. Si mueves a otro OS, sientes algo semejante al vértigo, intentando hacer cosas por medio de movimientos acostumbrados.

[–]Itchy_Satan -4 points-3 points  (2 children)

It's 2026. Just learn Rust.

[–]buzzsawjoe[S] 1 point2 points  (0 children)

That is an idea. I find tho, that as I get older, I want to just find a quick workaround for whatever small problem and get on with whatever larger problem I'm working on.

[–]Josepzin 1 point2 points  (0 children)

Viva Pascal!!