opening files without extension

From: [at]} <Violeta>
Date: Wed, 21 Apr 2004 12:23:08 +0200

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



Dear list members,

I would like to ask you if any of you has already tried to work with files
having no extension. I am trying to open such a file and it seems that
BlackBox is unable to return a view for that file.
I have added some details of the problem below.
Any help would be much appreciated.

Thank you,
Violeta Seretan - Univ. of Geneva


The following procedure opens a file interactively via a file dialog:

        PROCEDURE OpenFileNoExtension*;
                VAR loc: Files.Locator;
                                conv: Converters.Converter;
                                name : Files.Name;
                                view: Views.View;
        BEGIN
                view := Views.Old(Views.ask, loc, name, conv);
                Log.Ln; Log.String("view is NIL: "); Log.Bool(view = NIL);
                Log.Ln;Log.String("conv is NIL: "); Log.Bool(conv = NIL);
                IF conv # NIL THEN Log.Ln; Log.String("file type: " + conv.fileType$);
END;
                Log.Ln;Log.String("loc.res (0 if ok): "); Log.Int(loc.res);
                Log.Ln; Log.String("name: " + name$);
        END OpenFileNoExtension;

The procedure outputs the text below if the file I am opening has no
extension ("Fixing the finances").

view is NIL: $TRUE
conv is NIL: $FALSE
file type: odc
loc.res (0 if ok): 2
name: Fixing the finances

Everything goes fine if the same file has an extension ("Fixing the
finances.odc").

view is NIL: $FALSE
conv is NIL: $FALSE
file type: odc
loc.res (0 if ok): 0
name: Fixing the finances.odc

It seems that the problem concerns the file location & name (loc.res is 2,
"location or file not found").
Which is unintuitive as it is the user that specified an _existing_ location
and file.

res: INTEGER
Directory operations return their results in the locator's res field.
The following result codes are predefined:
res = 0 no error
res = 1 invalid parameter (name or locator)
res = 2 location or file not found
res = 3 file already exists
res = 4 write-protection
res = 5 io error
res = 6 access denied
res = 7 illegal file type
res = 8 cancelled

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.



----boundary-LibPST-iamunique-847762665_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFxwYXINClxwYXINCkRlYXIgbGlzdCBtZW1iZXJz
LFxwYXINClxwYXINCkkgd291bGQgbGlrZSB0byBhc2sgeW91IGlmIGFueSBvZiB5b3UgaGFzIGFs
cmVhZHkgdHJpZWQgdG8gd29yayB3aXRoIGZpbGVzXHBhcg0KaGF2aW5nIG5vIGV4dGVuc2lvbi4g
SSBhbSB0cnlpbmcgdG8gb3BlbiBzdWNoIGEgZmlsZSBhbmQgaXQgc2VlbXMgdGhhdFxwYXINCkJs
YWNrQm94IGlzIHVuYWJsZSB0byByZXR1cm4gYSB2aWV3IGZvciB0aGF0IGZpbGUuXHBhcg0KSSBo
YXZlIGFkZGVkIHNvbWUgZGV0YWlscyBvZiB0aGUgcHJvYmxlbSBiZWxvdy5ccGFyDQpBbnkgaGVs
cCB3b3VsZCBiZSBtdWNoIGFwcHJlY2lhdGVkLlxwYXINClxwYXINClRoYW5rIHlvdSxccGFyDQpW
aW9sZXR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SByZXBvcnRzIG9yIHF1ZXN0aW9u
cyByZWxhdGVkIHRvIHRoaXMgZW1haWwgbGlzdCB0byB0aGUgbGlzdCBvd25lciBhdFxwYXINCiAg
IG93bmVyLWJsYWNrYm94QG9iZXJvbi5jaFxwYXINClxwYXINCkN1cnJlbnQgcG9zdGluZyBwb2xp
Y3k6XHBhcg0KXHBhcg0KYSkgVG8gcG9zdCB5b3Ugc2hvdWxkIHVzZSB0aGUgc2FtZSBhZGRyZXNz
IGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCB0byB0aGUgbWFpbGluZyBsaXN0LiBUaGF0IHdh
eSwgdGhlIGxpc3Qgc2VydmVyIHdpbGwgcmVjb2duaXplIHlvdSBhcyBzdWJzY3JpYmVyIGFuZCBm
b3J3YXJkIHlvdXIgcG9zdGluZyBpbW1lZGlhdGVseSwgd2l0aG91dCBjcmVhdGluZyBhbnkgb3Zl
cmhlYWQuXHBhcg0KXHBhcg0KYikgSWYsIGZvciBzb21lIHJlYXNvbiwgeW91IGNhbm5vdCBwb3N0
IGZyb20gdGhlIGFkZHJlc3MsIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCwgeW91ciBtZXNz
YWdlIHdpbGwgYmUgbW9kZXJhdGVkIHRvIGF2b2lkIHNwYW0uIFBsZWFzZSB1bmRlcnN0YW5kIHRo
YXQgbW9kZXJhdGlvbiB3aWxsIG9mdGVuIGNhdXNlIHNvbWUgZGVsYXksIGluIHBhcnRpY3VsYXIg
b3ZlciB3ZWVrZW5kcyBvciBob2x5ZGF5fX0AQ0VEVVJFIE9wZW5G


----boundary-LibPST-iamunique-847762665_-_---
Received on Wed Apr 21 2004 - 12:23:08 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:47 UTC