Omnis 'appflags' used in FILEOPS for things like $getFileName - any insight for multiple file types

Doug Easterbrook doug at artsman.com
Fri Jan 9 19:11:21 EST 2015


hi Lou.

I was getting myself half resigned to think about doing at -- allow all files .. and then test after.    ...   I was just hoping to support filters..


Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 536-1205    Fax (403) 536-1210

> On Jan 9, 2015, at 3:43 PM, Lou Picciano <LouPicciano at comcast.net> wrote:
> 
> Not an answer to your specific question, but a 'bit off to the side'...
> 
> We've handled this here by testing internals of the various file formats and - ultimately - ignoring the suffixes. Because, clients can - and do - do anything. More granular: There are various oddities within jpg, for example, which constitute different 'formats' in some contexts.
> 
> Granted, not at all directly applicable to the problem as framed - and certainly doesn't matter if you're 'just storing files'.
> 
> Lou Picciano
> 
> ----- Original Message -----
> 
> From: "Doug Easterbrook" <doug at artsman.com>
> To: "OmnisDev List - English" <omnisdev-en at lists.omnis-dev.com>
> Sent: Friday, January 9, 2015 4:55:40 PM
> Subject: Re: Omnis 'appflags' used in FILEOPS for things like $getFileName - any insight for multiple file types
> 
> hi mike:
> 
> yes (as your next note mentions). ... what you propose I can do -- the downside for the user is that they must pick the file type before they can select the file.
> 
> I was looking for a way to lump all the pictures and perhaps all the text formats into one... eg
> 
> "any text file|*.txt,*.utxt,*.rtf|any picture|*.bmp,*.jpeg,*.png|"
> 
> 
> 
> I could allow everything, then I could check the file types after if need be .... but... there's got to be a way to have multiple filters .... at least thats my thinking.
> 
> 
> 
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 536-1205 Fax (403) 536-1210
> 
>> On Jan 9, 2015, at 2:16 PM, Michael Mantkowski <michaelj at clientrax.com> wrote:
>> 
>> Hi Doug,
>> 
>> I do this:
>> 
>> Do FileOps.$getfilename(theFileName,"Select file","Text Files (*.txt)|*.txt|RTF Files (*.rtf)|*.rtf|JPEG Image (*.jpg)|*.jpg|Portable Network Graphic (*.png)|*.png|PCX Image (*.pcx)|*.pcx") Returns ok
>> 
>> Mike
>> 
>> *********************************************************************
>> Michael Mantkowski
>> ClienTrax Software
>> 1-614-875-2245
>> *********************************************************************
>> 
>> 
>> -----Original Message-----
>> From: omnisdev-en-bounces at lists.omnis-dev.com [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Doug Easterbrook
>> Sent: Friday, January 09, 2015 3:41 PM
>> To: OmnisDev List - English
>> Subject: O$: Omnis 'appflags' used in FILEOPS for things like $getFileName - any insight for multiple file types
>> 
>> 
>> hi all.
>> 
>> I’ve searched omnis docs and google for this (honourable mention to kelly for an answer long ago) to try to figure out how to put multiple items in the ‘appflags’ parameter in the fileops functions that accept it.
>> 
>> 
>> for example, I know this will let me open files
>> 
>> Do FileOps.$getFileName(pathName,FilePrompt,appflags,LocalPath)
>> 
>> if appflags is
>> 
>> Rich Text Format (*.rtf)|*.rtf| —— that will let me open only files that have an rtf extension
>> 
>> or I can make it allow multiple files, selectable by name by using the following. The user will be required to pick the file type, then the dialog will limit only rtf or txt to be selected.
>> 
>> Rich Text Format (*.rtf)|*.rtf|Text Only (*.txt)|*.txt|
>> 
>> 
>> so, I’d like to do something more complicated. I’d like to allow pictures. those can have various suffixes, so I’d like to have a line that says
>> 
>> Pictures|*.jpg,*.jpeg,*.png,*.gif|
>> 
>> meaning — allow it is its any of those file types. At this time, all I can seem to do is allow specifics as in
>> 
>> jpeg|*.jpg|other jpeg|*.jpeg|PNG|*.png|gif|*.gif|
>> 
>> meaning I’ll have 4 lines on my file dialog that allow file selection … I’d really only like one, if that is possible
>> 
>> 
>> 
>> has anybody run into this before??? and have a solution??
>> 
>> 
>> Doug Easterbrook
>> Arts Management Systems Ltd.
>> mailto:doug at artsman.com
>> http://www.artsman.com
>> Phone (403) 536-1205 Fax (403) 536-1210
>> 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com



More information about the omnisdev-en mailing list