Home » Developer & Programmer » Forms » Problem opening a file with Webutil (Forms 10g, XP)
Problem opening a file with Webutil [message #364404] Mon, 08 December 2008 05:23 Go to next message
svsig
Messages: 7
Registered: November 2008
Location: Norway
Junior Member
Hi.

I am in the process of converting from Forms 6i to Forms 10g, and now I am stuck with a form that is trying to read an ordinary text file. I get an error message when my form tries to open the file. The environment seems to be OK. I have tried the demo form wu_test_106, and this seems to work, so the error must be somewhere in the form that I am working on.

I have done the following in my form:

    Subclassed the Webutil object from webutil.olb.
    Attached library webutil.pll and removed path.
    Changed references to TEXT_IO in my form to CLIENT_TEXT_IO.

When I run the form I get the error message "oracle.forms.webutil.file.FileFunctions bean not found. CLIENT_TEXT_IO.fopen will not work".

The mentioned bean is there in my form, in the subclassed block WEBUTIL, so I feel a bit lost now. Is there something more I need to do with my form to make it work?

Regards,
Sveinung
Re: Problem opening a file with Webutil [message #364534 is a reply to message #364404] Tue, 09 December 2008 00:35 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a search of this forum for 'oracle.forms.webutil.file'. There are numerous threads. From memory you need to drag an object into your form.

David
Re: Problem opening a file with Webutil [message #364799 is a reply to message #364404] Wed, 10 December 2008 01:40 Go to previous messageGo to next message
svsig
Messages: 7
Registered: November 2008
Location: Norway
Junior Member
I have found the error. I was trying to read a file in a WHEN-NEW-FORM-INSTANCE trigger, the form was called by another form and the file name was placed in a global parameter. It seems that I can't use Webutil functionality in WHEN-NEW-FORM-INSTANCE and PRE-FORM triggers.

I could use a timer here, but I have been strongly recommended not to use timers in Forms 10g. So I ended up placing a new button in the canvas to read the file. The functionality is not as good as it should be, but at least it works.

Does anybody know anything about this? Is it a bug or is it intended behavior?

Regards,
Sveinung
Re: Problem opening a file with Webutil [message #365113 is a reply to message #364799] Thu, 11 December 2008 00:42 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
You definitely can't use 'webutil' in the 'Pre-Form' trigger. Test whether it works if you just use it in the WNFI.

Search this forum for 'when-new-form-instance webutil' and see how other people have got on using this combination. For example, http://www.orafaq.com/forum/m/343842/67467/?srch=%27when-new-form-instance+webutil#msg_343842

David
Previous Topic: form customization
Next Topic: where can i download sql loader
Goto Forum:
  


Current Time: Mon Dec 05 02:31:22 CST 2016

Total time taken to generate the page: 0.15115 seconds