Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic BLOCK Display

594488Oct 3 2007 — edited Nov 15 2008
Hi,

I want to know if this option is do able, with code?

here's the scenario:

1) user enters the form.
2) select what he wants to SEARCH for (radio button).
3) Then a block will be drawn (displayed) in the form bassed on what he selected.

Now, when I code the form, I would define the BLOCKS needed.

Is it possible (with the help of SET_BLOCK_PROPERTY) to display (draw) the block that the user selected?

Thanks in advance,

Marc.

Comments

User_64CKJ
dineshbajaj wrote:
Re: The foolproof way of finding application's directory(folder) ?
...
State the goal or program feature you are trying to achieve, rather than the (flawed) strategy that you are currently pursuing in efforts to achieve the feature.
..Thanks for any advice that you can offer.
You're welcome.
843810
Hi Andrew,

Thanks for your response.

Let me state my goal: There are Reports and Database folders under my application folder. I try to connect to the database by specifying its path as System.getProperty("user.dir") + File.separator + "Database". Similarly, I try to access a report by specifying its path as System.getProperty("user.dir") + File.separator + "Reports" + File.separator + reportFileName.

In order to achieve the above-stated objectives, it is imperative that every single time the code returns the correct path to the application folder. However, this doesn't happen always. Say, the application is installed in the folder : c:\program files (x86)\ABC; then, the property "user.dir" is found to be retuning "c:\program files (x86)\ABC\Database", "c:\program files (x86)\Reports", or "c:\program files (x86)\ABC\ABC". This erratic behavior causes the application to fail.

Hope the problem description is clear.
User_64CKJ
dineshbajaj wrote:
..Let me state my goal: There are Reports and Database folders under my application folder. ..
How do they get there? Do you use an installer of some type? If so, get the installer to put the reports/DB folder into a sub-directory of user.home. Or better, store a String in the same location, representing the directory where the user chose to install the reports/DB, then use that as the path.
..I try to connect to the database by specifying its path as System.getProperty("user.dir") + File.separator + "Database". Similarly, I try to access a report by specifying its path as System.getProperty("user.dir") + File.separator + "Reports" + File.separator + reportFileName.

In order to achieve the above-stated objectives, it is imperative that every single time the code returns the correct path to the application folder. However, this doesn't happen always. Say, the application is installed in the folder : c:\program files (x86)\ABC; then, the property "user.dir" is found to be retuning "c:\program files (x86)\ABC\Database", "c:\program files (x86)\Reports", or "c:\program files (x86)\ABC\ABC". This erratic behavior causes the application to fail.
Or if the user drags an app. shortcut to the desktop, the path will point to the desktop. ... I could add more 'corner case' modes of failure, but I think you get the idea. The user.dir is not really good for much.
Hope the problem description is clear.
Yes. Much more clear, thanks.
843810
Many thanks for your quick response.
How do they get there? Do you use an installer of some type? If so, get the installer to put the reports/DB folder into a sub-directory of user.home. Or >>better, store a String in the same location, representing the directory where the user chose to install the reports/DB, then use that as the path.
Yes, I do use Winamp installer script to create an installer. I like your idea of putting the reports folder into a sub-directory of "user.home". I would though avoid putting database folder into that directory as it is in the same drive where the OS is installed, and that drive is often formatted by the users.

I am not too conversant with the NSIS script and so I am not confidant that I will be able to tweak the existing script to create another dialog to prompt for the database location. I instead intend to ask for this location through my application, and then creating the database in runtime there.
Or if the user drags an app. shortcut to the desktop, the path will point to the desktop. ... I could add more 'corner case' modes of failure, but I think you >>get the idea. The user.dir is not really good for much.
Agree that user.dir is not really good for much; however, it is smart enough to not point to the shortcut location as I launch the application through the desktop shortcut only and have noticed that it never points to that shortcut.

Thanks again for all your input.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 31 2007
Added on Oct 3 2007
5 comments
688 views