Re: [BLACKBOX] Pre-loading "Open File" dialog box

From: [at]} <Chris>
Date: Mon, 10 May 2010 10:21:30 +0930

----boundary-LibPST-iamunique-830933670_-_-
Content-type: text/plain

In addition, you can specify the desired directory (folder) to startup in by
initialising the value of loc before calling GetIntSpec.

e.g.

  loc := Files.dir.This(folderName);
  GetIntSpec("txt", loc, name);

where folderName is ARRAY OF CHAR

Regards,
Chris Burrows

CFB Software
http://www.cfbsoftware.com

________________________________

        From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Dorta
        Sent: Monday, 10 May 2010 9:58 AM
        To: BLACKBOX{([at]})nowhere.xy
        Subject: Re: [BLACKBOX] Pre-loading "Open File" dialog box
        
        
        For a "pre-load" call to an Open File Dialog, you have this friendly
procedure in MODULE Dialog:

        PROCEDURE GetIntSpec (defType: Files.Type; VAR loc: Files.Locator;
OUT name: Files.Name)

        Ask the user for a file specification (loc, name). defType indicates
which file type is desired ("" stands for any file type; other types are
platform-specific, e.g., "txt" for Windows Ascii files or "TEXT" for Mac OS
Ascii files). loc # NIL indicates a valid file specification.

        Greetings: René Dorta

        On Sat, May 8, 2010 at 8:57 PM, Stephen R. Troy
<stroy{([at]})nowhere.xy
        

                                Hello Listers,
                At your suggestion I have read Hanspeter Mössenböck's book
Object-Oriented Programming in Oberon-2. I also read Stan Warford's book
Computing Fundamentals: The Theory and Practice of Software Design with
BlackBox Component Builder, which I found especially helpful because it
explains some of the operational quirks of BlackBox Component Builder which
are not covered in the documentation, at least not that I could find.

                Now I have a more mundane question. Can anyone suggest a
way using BlackBox to "pre-load" a call to an "Open File" dialog box in
Windows XP, such that the dialog box opens up already in the desired
directory (folder), and shows only the desired file type, i.e. with "all
files" in the "Files of Type" box and "*.xxx" in the "File Name" text box,
so that all and only the files with ".xxx" extension appear? Obviously
there are Windows API calls to do this -- can anyone suggest how to access
these from inside BlackBox? I am writing a program for use by
unsophisticated users, and the simpler I can make it, the better. I have
tried the "Open File" dialog box in BlackBox, which works fine except for
the two above desired features. The "PathtoFileSpec" function in ObxAscii
may work fine in Unix or Linux but does not appear to be compatible with
Windows. Thanks for any help.
                Steve Troy
                
                
                ---- To unsubscribe, send a message with body "SIGNOFF
BLACKBOX" to LISTSERV{([at]})nowhere.xy


        ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-830933670_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBJbiBhZGRpdGlvbiwgeW91IGNh
biBzcGVjaWZ5IHRoZSBkZXNpcmVkIGRpcmVjdG9yeSAoZm9sZGVyKSB0byBzdGFydHVwIGluIGJ5
XHBhcg0KaW5pdGlhbGlzaW5nIHRoZSB2YWx1ZSBvZiBsb2MgYmVmb3JlIGNhbGxpbmcgR2V0SW50
U3BlYy5ccGFyDQpccGFyDQplLmcuXHBhcg0KXHBhcg0KICBsb2MgOj0gRmlsZXMuZGlyLlRoaXMo
Zm9sZGVyTmFtZSk7IFxwYXINCiAgR2V0SW50U3BlYygidHh0IiwgbG9jLCBuYW1lKTtccGFyDQpc
cGFyDQp3aGVyZSBmb2xkZXJOYW1lIGlzIEFSUkFZIE9GIENIQVJccGF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lcHQgZm9yXHBhcg0KdGhlIHR3byBhYm92ZSBkZXNpcmVk
IGZlYXR1cmVzLiAgVGhlICJQYXRodG9GaWxlU3BlYyIgZnVuY3Rpb24gaW4gT2J4QXNjaWlccGFy
DQptYXkgd29yayBmaW5lIGluIFVuaXggb3IgTGludXggYnV0IGRvZXMgbm90IGFwcGVhciB0byBi
ZSBjb21wYXRpYmxlIHdpdGhccGFyDQpXaW5kb3dzLiAgVGhhbmtzIGZvciBhbnkgaGVscC5ccGFy
DQpcdGFiIFx0YWIgU3RldmUgVHJveVxwYXINClx0YWIgXHRhYiBccGFyDQpcdGFiIFx0YWIgXHBh
cg0KXHRhYiBcdGFiIC0tLS0gVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9k
eSAiU0lHTk9GRlxwYXINCkJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0ggXHBh
cg0KXHBhcg0KXHBhcg0KXHRhYiAtLS0tIFRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3
aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvXHBhcg0KTElTVFNFUlZATElTVFMuT0JFUk9O
LkNIIFxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1l
c3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVS
T04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-830933670_-_---
Received on Mon May 10 2010 - 02:51:30 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:32 UTC