May 10, 2024, 03:07:20 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


FileRequest Syntax

Started by jerryclement, August 30, 2007, 05:51:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jerryclement

 ???

I need help!  I'm trying to have FileRequest open to a particular directory. Initdir looks like it should do this: (from help file)

FILEREQUEST

STRING = FILEREQUEST(title as STRING,parent as POINTER,nOpen as INT,OPT filter as STRING,OPT ext as STRING,OPT flags as INT,OPT initdir as STRING)

Description
Opens the standard file dialog and returns a string containing the fully qualified pathname to the user-selected file. For a â€ËÅ"Save as’ dialog nOpen should be 0. For an â€ËÅ"Open’ type dialog nOpen should be 1.

Parameters
title - Title of the file dialog
parent - Parent window or dialog, can be NULL
nOpen - Open dialog specifier.
filter - Filter string
ext - Default extension
flags - Additional style flags
initdir - Initial directory

================================================
I have tried all types of syntax methods and all I get is syntax error.

This is the last one I tried copied from someone's coding:
Filter$ = "Dictionary files|*.dic||"
filename = filerequest("Load DICTIONARY",win,1,Filter$,"",(),"C:\\Program files")

I don't want a multi-file dialog if possible.

Thanks ahead for anyone helping.

Jerry C.
Jerry - Newbie from TN

Ionic Wind Support Team

filename = filerequest("Load DICTIONARY",win,1,Filter$,"",0,"C:\\Program files")

You were close.  Don't know where the ( ) came from for "flags". 
Ionic Wind Support Team

jerryclement

 ;D
Thanks Paul, the zero did it - must have been my lousy eyesight!

Question:  Whenever there is an "OPT" parameter, can we directly substitute a null or no OPT desired by inserting a nothing for the DATATYPE?

I'm not clear when to or not, sometimes I see just ,, double commas to bypass a parameter and sometimes just omit the parameter?

Jerry C.
Jerry - Newbie from TN

Ionic Wind Support Team

In Emergence you need the parameter if you are specifying a later optional parameter.  "" works for strings and NULL for other parameters if you want to skip them.
Ionic Wind Support Team

jerryclement

Jerry - Newbie from TN