BR 4.18J+ Open File Dialog Box

Discussion about software products provided for the BR community and created by its members. This includes (but is not limited to): MyEdit, File IO, Screen IO, FNSnap, and Utilities written in other languages for use with Business Rules.

Moderators: Susan Smith, admin, Gabriel

Post Reply
dmeenen
Posts: 50
Joined: Mon Jun 08, 2009 8:34 pm
Contact:

BR 4.18J+ Open File Dialog Box

Post by dmeenen »

This code works on a local Windows pc with BR 4.18J+ (open file dialog box using the built in BR Facility)

Br 4.18i Windows Client/Server client crashes with a BR Assertion error.

Macintosh BR4.18J client/server also crashes with a BR assertion error.

Am I doing something incorrectly on client/server, or is this a bug?

02660 dim fil$*120,fi$*120
02665 open #98: "name=OPEN:.\*"&wsid$&".lst,recl=1",external,input ioerr cls_98 ! 12/22/09 cancel causes 622 error, open stmt crashes BR 4.18J+ Windows Client/Server client & Macintosh client/server
02666 let fil$=file$(98)
02667 CLS_98: close #98: ioerr ck_fil
02670 CK_FIL: Let FI$=fil$ : print fil$ : pause
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

You're using the BR Open File Dialog. Its a special feature triggered by opening a file with an unknown file name that causes BR to give the user a standard Open File Dialog for selecting the file to open.

As far as I know this feature is undocumented and unsupported but it works pretty well and I've been using it for some time.

In my experience the BR Open File Dialog fails under 4.18j or lower with Client Server. It causes the Assertion Failed issue you're seeing. They fixed it in 4.18i, and I have it working on both Windows and Mac under 4.18i with Client Server.

I'm not sure why its failing for you under Client Server 4.18i on Windows - I just tried it and it works for me. I didn't try your example specifically, however, I just ran one of my programs using the BR Open File Dialog.

Gabriel
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

Normally assertion failures provide some meaningful text that helps us know right where to look and the nature of the failure.

When reporting assertion failures, please include that with the report.
Thanks.
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: BR 4.18J+ Open File Dialog Box

Post by Gabriel »

Well, umm,

Appearantly J comes after I in the alphabet.. I must have been using Coalate Alternate or perhaps i simply wasn't thinking at all. I'm sorry for the confusion.

I've looked at your example a bit closer and I think I know whats going on:

When I tried using the Open File Dialog under Client Server (even in I and J) I learned a couple important points:

1) For the time being, in my experience, you can't do Open File Dialog on the Server under Client Server. It doesn't make sense because the open file dialog doesn't have access to the servers directory structure. ADS may be addressing this.

2) You must add the "@:" to your path to tell BR that you're trying to do the open file dialog on the client.


Try using the following open statement:

02665 open #98: "name=OPEN:@:.\*"&wsid$&".lst,recl=1",external,input ioerr cls_98

Notice the "@:" inserted right after the "name=OPEN:" parameter. This is the way I'm doing it where its working under both Mac and Windows, under 4.18i (and probably) 4.18j.

Good luck, sorry for the confusion, and I hope this works for you!

Gabriel


dmeenen wrote:This code works on a local Windows pc with BR 4.18J+ (open file dialog box using the built in BR Facility)

Br 4.18i Windows Client/Server client crashes with a BR Assertion error.

Macintosh BR4.18J client/server also crashes with a BR assertion error.

Am I doing something incorrectly on client/server, or is this a bug?

02660 dim fil$*120,fi$*120
02665 open #98: "name=OPEN:.\*"&wsid$&".lst,recl=1",external,input ioerr cls_98 ! 12/22/09 cancel causes 622 error, open stmt crashes BR 4.18J+ Windows Client/Server client & Macintosh client/server
02666 let fil$=file$(98)
02667 CLS_98: close #98: ioerr ck_fil
02670 CK_FIL: Let FI$=fil$ : print fil$ : pause
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: BR 4.18J+ Open File Dialog Box

Post by bluesfannoz »

Can you hear my DOH!!!!! I knew I had made this work... but couldn't remember how! Thanks Gabe! 98

Gabriel wrote:Well, umm,

Appearantly J comes after I in the alphabet.. I must have been using Coalate Alternate or perhaps i simply wasn't thinking at all. I'm sorry for the confusion.

I've looked at your example a bit closer and I think I know whats going on:

When I tried using the Open File Dialog under Client Server (even in I and J) I learned a couple important points:

1) For the time being, in my experience, you can't do Open File Dialog on the Server under Client Server. It doesn't make sense because the open file dialog doesn't have access to the servers directory structure. ADS may be addressing this.

2) You must add the "@:" to your path to tell BR that you're trying to do the open file dialog on the client.


Try using the following open statement:

02665 open #98: "name=OPEN:@:.\*"&wsid$&".lst,recl=1",external,input ioerr cls_98

Notice the "@:" inserted right after the "name=OPEN:" parameter. This is the way I'm doing it where its working under both Mac and Windows, under 4.18i (and probably) 4.18j.

Good luck, sorry for the confusion, and I hope this works for you!

Gabriel


dmeenen wrote:This code works on a local Windows pc with BR 4.18J+ (open file dialog box using the built in BR Facility)

Br 4.18i Windows Client/Server client crashes with a BR Assertion error.

Macintosh BR4.18J client/server also crashes with a BR assertion error.

Am I doing something incorrectly on client/server, or is this a bug?

02660 dim fil$*120,fi$*120
02665 open #98: "name=OPEN:.\*"&wsid$&".lst,recl=1",external,input ioerr cls_98 ! 12/22/09 cancel causes 622 error, open stmt crashes BR 4.18J+ Windows Client/Server client & Macintosh client/server
02666 let fil$=file$(98)
02667 CLS_98: close #98: ioerr ck_fil
02670 CK_FIL: Let FI$=fil$ : print fil$ : pause
Steve Koger
Computer Specialist
SEKESC-MACS Division
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

Well, i would never have figured it out initially without your help getting Client Server running on a Mac last summer.

Thank you for that!

Gabriel
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: BR 4.18J+ Open File Dialog Box

Post by bluesfannoz »

Yes I hope they are addressing this and also the ability to pick a folder rather than just a file, plus the ability to do this without having to use a file channel would be very helpful.

Gabriel wrote:

1) For the time being, in my experience, you can't do Open File Dialog on the Server under Client Server. It doesn't make sense because the open file dialog doesn't have access to the servers directory structure. ADS may be addressing this.
Steve Koger
Computer Specialist
SEKESC-MACS Division
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: BR 4.18J+ Open File Dialog Box

Post by Gabriel »

I would love to see a "Folder Select" option!! Right now I get around this by forcing the user to select a file inside the folder they want to select and in code I strip off the filename. Its ugly and unprofessional looking but it works for my internal software. It would be much better to just be able to select a folder in the first place!

Gabriel
bluesfannoz wrote:Yes I hope they are addressing this and also the ability to pick a folder rather than just a file, plus the ability to do this without having to use a file channel would be very helpful.

Gabriel wrote:

1) For the time being, in my experience, you can't do Open File Dialog on the Server under Client Server. It doesn't make sense because the open file dialog doesn't have access to the servers directory structure. ADS may be addressing this.
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Re: BR 4.18J+ Open File Dialog Box

Post by bluesfannoz »

Digging up this old thread to show how long ago a Folder/Media selection box was requested. Seems now that I am playing with 4.3 I see its still not available. Being able to provide a user the ability to pick media/folders to write a created file to would be extremely useful. I resolved this back in 2009 by writing an external utility. Would really like to get rid of having to use it!


bluesfannoz wrote:Yes I hope they are addressing this and also the ability to pick a folder rather than just a file, plus the ability to do this without having to use a file channel would be very helpful.

Gabriel wrote:

1) For the time being, in my experience, you can't do Open File Dialog on the Server under Client Server. It doesn't make sense because the open file dialog doesn't have access to the servers directory structure. ADS may be addressing this.
Steve Koger
Computer Specialist
SEKESC-MACS Division
Post Reply