Discussion:
Dragging a file and the max length file path
(too old to reply)
Bob Latham
2018-11-08 11:05:36 UTC
Permalink
Hi,

I've been writing a bit of code again and come across a little
mystery. If I drag a file to an application, either StrongED (with
shift key) or my application, the max length of string that seems to
work is 204 including the terminator. 205 and above just doesn't work.

However surprisingly, you can drag a file above 204 to another
directory and it will move/copy.

To me this is odd, am I missing something? Is there a way around the
problem.

Cheers,

Bob.
--
Bob Latham
Stourbridge, West Midlands
Theo
2018-11-08 16:39:38 UTC
Permalink
Post by Bob Latham
Hi,
I've been writing a bit of code again and come across a little
mystery. If I drag a file to an application, either StrongED (with
shift key) or my application, the max length of string that seems to
work is 204 including the terminator. 205 and above just doesn't work.
However surprisingly, you can drag a file above 204 to another
directory and it will move/copy.
To me this is odd, am I missing something? Is there a way around the
problem.
The maximum size of Wimp messages is 256 bytes, because that's the size of
buffer apps have to provide when calling Wimp_Poll. Therefore the maximum
size of the string is 256 minus the length of the headers, which can vary
depending on the type of message.

I don't know for sure, but I suspect dragging a file from one Filer window
to another is entirely internal to the Filer and not using the Wimp message
system, and so doesn't have the same limits.

I don't know if there's a workaround to get larger messages these days.

Theo
Bob Latham
2018-11-08 17:20:33 UTC
Permalink
Post by Theo
The maximum size of Wimp messages is 256 bytes, because that's the
size of buffer apps have to provide when calling Wimp_Poll.
Therefore the maximum size of the string is 256 minus the length of
the headers, which can vary depending on the type of message.
[Snip]

Thanks Theo.

I should have realised that myself if I'm honest.


Cheers,

Bob.
--
Bob Latham
Stourbridge, West Midlands
Matthew Phillips
2018-11-08 21:50:52 UTC
Permalink
Post by Theo
Post by Bob Latham
I've been writing a bit of code again and come across a little
mystery. If I drag a file to an application, either StrongED (with
shift key) or my application, the max length of string that seems to
work is 204 including the terminator. 205 and above just doesn't work.
The maximum size of Wimp messages is 256 bytes, because that's the size of
buffer apps have to provide when calling Wimp_Poll. Therefore the maximum
size of the string is 256 minus the length of the headers, which can vary
depending on the type of message.
I don't know if there's a workaround to get larger messages these days.
There isn't.
--
Matthew Phillips
Durham
Jim Nagel
2018-11-09 11:57:58 UTC
Permalink
Post by Theo
I don't know if there's a workaround to get larger messages these days.
Any chance that the Window Open module referred to in neighbouring thread
might be useful? (from http://armclub.org.uk/free )
--
Jim Nagel www.archivemag.co.uk
Post by Theo
"From" address is genuine but will change. Website has current one.
Steve Fryatt
2018-11-09 17:29:02 UTC
Permalink
On 9 Nov, Jim Nagel wrote in message
Post by Jim Nagel
Post by Theo
I don't know if there's a workaround to get larger messages these days.
Any chance that the Window Open module referred to in neighbouring thread
might be useful? (from http://armclub.org.uk/free )
Probably not, because this is a much more fundamental problem.
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
Loading...