Home » Developer & Programmer » Forms » To attach a library in a Form
icon6.gif  To attach a library in a Form [message #111938] Mon, 21 March 2005 23:49 Go to next message
tsilav
Messages: 22
Registered: September 2004
Junior Member
how to attach object library to form ?In other wise how reuse it because i don't understand forms Developer help of the way to reuse an library or a .olb or .pll.
please help me
Re: To attach a library in a Form [message #111965 is a reply to message #111938] Tue, 22 March 2005 02:05 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Well....
An object librariy means the library of objects (e.g: Data Blocks, Items, Canvases, Windows etc....).
A PlSql library means the library of the codes (e.g: Procedure, Functions, Packages etc....)
Now how to use them?
Create a new Form in Form Builder. Create a control Block and place some items on this block and change the properties of the block and items....e.g: change the background color, foreground color, fonts etc...of text items.
Change the properties of Canvas ...
Now you have a modified Block, modified items in the block, modified canvas, window, etc...
Now come to the node Object Libraries.
Create a new object library by clicking on the Create New Icon.
An Object Library will be created.
First of All, save this library. Then Open this library by double clicking on it.
Drag the objects from your form into this library(Drag from form and drop into the library.
(e.g: drag and drop data block, canvas, window)
Save the Object library.
Now close this form and create a new form.
Don't create anything in the new form.
Drag Datablock from the library and drop it in the newly created form. Here it will ask you "You want to copy the object or subclass"
I hope you know the meanings of copy and subclass.
You subclass the object. Do the same with Canvas.
You can see now that objects which you modified inherited the properties.
This is the use of Object Libraries and how you can attach it to the form. The benefit of these libraries is that we have the standard objects (Templates) and if we develop a new module, standards can be maitained.
Now PLSql library is the same as object library but the is that Object library contains objects and PlSql library contains only the coding.
To create a PlSql Library:
Click on PL/SQL Libraries node.
Click on Create Button.
Click on Program Units.
Create a function, procedure, or package.
Save the library.
Open any form module.
Click the node, Attched Libraries.
Click on the Create Button.
A dialogue Box will appear.
Give the path and attach the library.
Click on Attach.
A message will appear.
Click on Yes.
Now the library is attached.
Now say you have a Procedure in your library called proc_test.
You need to define a new trigger in your module to which you attached the library. And in your trigger, you need to call the procedure proc_test which is in your library.
You can just write in the trigger code
Trigger Code:
proc_test;
This will call your procedure in the attached library.
You saw that you have defined your code in the libray and you can freely use this code in your forms.
I hope that you'r clear now with the benefits and use of these Object and Pl/SQL libraries.
Cheers!
Re: To attach a library in a Form [message #112263 is a reply to message #111965] Thu, 24 March 2005 00:27 Go to previous messageGo to next message
tsilav
Messages: 22
Registered: September 2004
Junior Member
thanks a lot, that's help me better
Re: To attach a library in a Form [message #324182 is a reply to message #111938] Sat, 31 May 2008 05:17 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Ya,

Sorry i want to subscripe this
Thank and more helpful it is

kanish
Re: To attach a library in a Form [message #324816 is a reply to message #324182] Wed, 04 June 2008 03:45 Go to previous messageGo to next message
misragopal
Messages: 125
Registered: June 2005
Location: New Delhi, india
Senior Member

Quote:
Click on Attach.
A message will appear.
Click on Yes.
Now the library is attached.

with reference of above line, can you please suggest what is difference if we press 'YES' or 'N'. In other means what will be difference if we add pll with path and without path.?
Re: To attach a library in a Form [message #324947 is a reply to message #111938] Wed, 04 June 2008 10:19 Go to previous messageGo to next message
mandeepmandy
Messages: 79
Registered: May 2008
Location: USA
Member

By clicking Remove path to 'No',the form will store the path to the library and it always search library on that path while running.
Buy clicking Remove path 'Yes' the form will only save the name of the library and it will search library on default form path.

'Yes' is always recommended
Re: To attach a library in a Form [message #339913 is a reply to message #111965] Sat, 09 August 2008 12:54 Go to previous message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
That was great, thanks..
Previous Topic: LOV Item
Next Topic: how to inherit list item
Goto Forum:
  


Current Time: Wed Dec 07 16:37:08 CST 2016

Total time taken to generate the page: 0.13839 seconds