I hate it when the docs are missing information and I waste an hour or so of time (this is in Version 6), But when I finally have the sense to load Version 9 DP3 and the docs are even terser and actually missing what little information was in the original I start speaking "French" (or is it Anglo Saxon)
here are the important parts of the two dictinaries
Version 6
Code: Select all
answer file with type
Type: command
Syntax:
answer file[s] prompt [with defaultPath] [with type types [or type types ...]] windowTitle] [as sheet]
.
.
.
Summary:
Displays a standard file dialog for the user to select a file.
Examples:
answer file "Select a file to delete:"
answer files "Select the files you wish to process:"
answer file "Input:" with "/Macintosh HD/"
answer file (field "Prompt") with type "LiveCode Stacks|rev|RSTK"
answer files "Select the images you wish to view:" with type "JPEG Images|jpg|JPEG"
Code: Select all
Type :command
Syntax
answer file[s] prompt [with defaultPath] [titled windowTitle] [as sheet]
SummaryDisplays a standard file dialog for the user to select a file.
.
.
.
Examples
answer file "Select a file to delete:"
if the result is not "Cancel" then
put it into tChosenFile
-- Use the file path as required
end if
answer files "Select the files you wish to process:"
if the result is not "Cancel" then
put it into tChosenFiles
repeat for each line tFile in tChosenFiles
end repeat
end if
answer file "Input:" with "/Macintosh HD/"
And while I'm at it I was going to buy the printed manuals bundle when they were finally printed ... until I read this in the off topic section.
Here it is to save you the time - I would have asked for my money back without compunction.
viewtopic.php?f=5&t=29177&p=154124&hili ... ed#p154124
Code: Select all
Re: Printed Dictionary Book Bundle
Report this post Quote
Post by exheusden » Tue May 16, 2017 12:53 pm
I have read just the first 40 pages of the printed "LiveCode User Guide" and am sorry to say that I am disappointed.
Not only is there no table of contents, there is no index, so looking up topics is impossible.
If the book has bee proofread, there is little evidence of this. Just look, for example, at pages 19 and 20, where the reader is directed to "section 1.6.3 above," when there are no section numbers; the reader is further directed to various websites, whose addresses are presumably hidden under hotlinks to those sites, but, of course, hotlinks don't work from print and the actual addresses are not shown. Setting errors are rife: ""Use the LiveCode mailing list is also possible," " Tip: tip: you can use the Google search engine… using this link;" note the two "tips" and "this link" which is all you get, no actual URL.
The topic header, "Alignment & Layering" ends page 26 and this is followed by almost half a page of nothingness: an illustration of the Size & Position Inspector starts the following page, but how this window is achieved is not explained.
On page 39, an illustration is shown on the second half of the page, whereas the caption for the illustration (Figure 30…) is printed at the top of page 40.
The reader is regularly told to, "see the section on" a particular topic, but without section numbering, without an index, or without a TOC (at the very least), this is a difficult task.
[b]I am sure that I shall continue to read the User Guide, but it does not display the care it demands. I believe, too that it is of little use to a newcomer to LiveCode.[/b]
A chance missed.
I am sure that I shall continue to read the User Guide, but it does not display the care it demands. I believe, too that it is of little use to a newcomer to LiveCode.
Turns out if I had scrolled a bit more in my V6 dictionary I would have found this - 8 Years later and that information is not only Not in the dictionary but even less in the latest.
Code: Select all
benr_mc@cogapp.com
2009-04-30 at 10:50:19
Not explicit in the docs above is that the effect of specifying extensions and filetypes in a filter is additive not subtractive: the user will be offered any file matching the extensions, and any file matching the filetype, not just the files that match both. So using a filter of "Image files|png|JPEG" would match any files with a ".png" extension, regardless of filetype; and any files with a "JPEG" filetype, regardless of extension.
Not noted in the docs above is that you can use multiple comma-delimited items in the 'extensions' part of a file types filter. So for example you could use the filter "JPEG files|jpg,jpeg|JPEG,JFIF" to catch files that match at least one of four tests: extension either ".jpg" or ".jpeg", type either "JPEG" or "JFIF".
Finally, note that whereas "*" in the extension list literally matches files with the extension ".*", "*" in the filetype list is a wildcard that matches any file. So for example you could use the following filter list to ask the user to select a JPEG file matching some broad criteria - with the option to let them select any file if they think it might work:
answer file "Select an image" with type ("JPEG files|jpg,jpeg|JPEG,JFIF" & return & "Any file||*")
You can also use a wildcard "*" in the filetypes section - however, this appears to override
Oh My problem was that I needed to put commas between multiple file types (jpg, png) rather than my assumption of using the or with syntax given in the dictionary - maybe i'm thick but don't make me think especially when I'm RTFM (reading the fine manual).
The documentation was probably the main reason a friend of mine was reticent to use LIvecode. He went with XOJO - but I managed to get him to have another look when the community plus edition came out.
Not a happy Bunny
<End of RANT>