Tips_todo   >   Misc   >   Component Store
The F3 Components Store is where you get window and report objects when designing windows and reports. The Component Store also has a host of wizards and classes which you can drag and drop into your library to speed up the design process.
You can modify the existing classes and design objects in the F3 Component Store, or add your own objects and classes. You can even add your own class group/icon to show up in the Component Store's first level toolbar.
To modify the Component Store you need to get inside of it.
1. Press F3 to open the Component Store.
2. Right-click anywhere on the Component Store > select "Show Component Store in Browser".
3. Press F2 to open the Libraries browser.
4. Double click on "Component Library" in the Libraries Browser get inside.
Now that you are inside the Component Library, there are a number of different things you can do. Read the other topics in this section for further instructions.
When you finish making your modifications to the Component Library:
1. Press F3 to open the Component Store.
2. Right-click anywhere on the Component Store > uncheck "Show Component Store in Browser".
TERMINOLOGY: "Component Store" is what you see when you press F3. "Component Library" is what you see in the F2 Browser after you've checked "Show Component Store in Browser".
GOTCHA: When a new version of Omnis Studio is released, it's a bit of a hassle saving and moving your previous Component Store to the newer version. Be careful on how much time you invest into customizing the Component Store.
SIDE NOTE: According to Pages 347-349 in the "Using OMST" manual (v2) you are able to add your own classes and class components to the Component Store. However, there is one important tip missing from the manual. After you add your own class, you must right-click on the class, select "Component Store Type..." and then set the class to "Template" or "Design Objects".
Thanks to Andreas Pffiefer for the tip! (The manual had me stumped for quite a while.)With the Component Store open in your IDE Browser: (see "Component Store" topic)
1. Drag and drop any class from your own library onto the Component Library.
2. Press F6 to open the Property Manager.
3. Set the $iconcomponent property for your class to some unique icon.
4. Right-click on the class, select "Component Store Type...", set to "Template".
To test what you've done.
1. Press F3 to open the Component Store.To add your own Design Objects (Window or Report objects) to the Component Store. (For this example we'll add our own set of window class objects.)
With the Component Store open in your IDE Browser: (see "Component Store" topic)
1. Drag and drop any window class from your own library onto the "Component Library", or create a new one in the "Component Library" and add some window objects to it. A quick way to create your own design components is to Right-click on "_Field Components" in the Components Library and > select "Duplicate".
2. Press F6 to open the Property Manager.
3. Set the $name property. The name you assign will be the tooltip in the Component Store.
4. Set the $iconcomponent property for the window class to some unique icon. It will be the icon that shows up in the Component Store's window objects toolbar.
5. Right-click on the class, select "Component Store Type...", set to "Design objects".
6. Set the properties on any of the window objects inside the window class.
To test what you've done.
1. Press F3 to open the Component Store.
2. Right-click anywhere on the Component Store > uncheck "Show Component Store in Browser".
3. Open any window in design mode.
4. Press F3 to open the Component Store. Your icon/name class should be in the Component Store's toolbar. When you click on it, your design objects should be displayed in the Component Store.
I recommend "Adding your own Design Objects" vs. "Modifying Existing Components". When Omnis Studio releases a newer version of Studio, you simply copy and paste your own field components class(es) from the Component Store in the older version to the Component Store in the newer version. Doing this is a lot easier than hunting through the "_Field Components" and "_Report Components" class and copy/pasting the individual objects from the older version to the newer version.You can add your own "Group" to the Component Store, so that it will show up with it's own icon in the Component Store's main toolbar.
With the Component Store open in your IDE Browser: (see "Component Store" topic)
1. Add/Create a new class in the Component Store. (any class will work)
2. Right-click on the new class > select "Template".
3. F6 to open the Property Manager.
4. Select $componenticon and select any icon by clicking on the droplist arrow.
5. Set the $desc property to something like, "My Group/1715~". The word(s) preceeding the "/" will be the group name, the number between the "/" and "~" is the iconid of the icon which will be displayed in the Component Store toolbar.
6. Add/create additional classes (must be of the same class type) to include in your group. Set
their $desc property to "My Group/1715~"
To test what you've done.
1. Press F3 to open the Component Store.
2. Right-click anywhere on the Component Store > uncheck "Show Component Store in Browser".
3. By Omnis Studio magic the "My Group" icon 1715 appears at the end of the Component Store toolbar.
4. Click on the "My Group" icon in the toolbar. Your class(es) should show up in the Component Store with their own icons and tooltip names.
Thanks for this tip go to: P-J Nefkens , Daniel SananŽs, and Geir Fj¾rli.With the Component Store open in your IDE Browser (see "Component Store" topic)
1. Click on the Headed list title 'Name' a couple times until the "_Field Components" window class sorts to the top section of the list.
2. Double click on the '_Field Components' window class to open it up. You will see all the window field components which you can drag out of the Component Store onto your design window.
3. Click on any window object. Press F6 to look at/change the object's Properties.
You can modify the object's property to suit your preference. You can double-click on the object and modify it's $event method, add you own $construct method, etc.
You can also duplicate a window object to create two flavours of the same object. The objects are listed in the Component Store in field order, so you should renumber the duplicate component to be next in order to the one you duplicated. That way they'll show up next to eachother in the Component Store. NOTE: The duplicate object will have the same tooltip name in the Component Store, that is the type of object which it is, so you can only tell them apart by their order in the Component Store.
To test what you've done.
1. Close the "_Field Components" window class
2. Press F3 to open the Component Store.
3. Right-click anywhere on the Component Store > uncheck "Show Component Store in Browser".
4. Open any window class in design mode, press F3, drag and drop the object you modified and confirm that the change(s) you made now show up in the object you just dragged from the Component Store.
Congratulations you just modified the Component Store to your own preferences! You can do the same thing for "_Report Components", etc., etc.
GOTCHA:If you are using multiple libraries and storing your superclasses in the 'main' library, you will have discovered that creating subclasses of your superclasses in the other libraries is a bit of a pain.
You right click on the superclass and 'Create subclass'. Name it. But then have to drag and copy the subclass to the destination library. Then go back to the main library and delete the extra copy.
Supercomponents solves the problem and makes it REALLY easy!
All you do is set the "$issupercomponent" property to "kTrue" for the superclass. You don't even have
to open the Component Library and copy your class into the libary!
Then press F3 to open the Component Store, click on the respective class in the Component Store
toolbar and there is your supercomponent! You can then drag and drop this supercomponent into any
library and 'Shazam!' just like magic, Omnis gives you a subclass of the superclass ready for you to name. Wow! Way to go Omnis!
To demonstrate this right now:
1. Press F3, click on the windows icon in the Component Store toolbar.
2. Notice the StudioTips icon? Hold your cursor over it, see the tooltip. "wBaseDemo".
3. Press F2, Double-click the TIPS library. Press Ctrl/Cmnd-A to to show all components.
4. Click on the wBaseDemo window. Press F6 to show the window properties.
You can see the "$issupercomponent" property has been set to "kTrue". You can also see that the "$componenticon" has been set to "9090", the icon ID for the StudioTips icon. "wBaseDemo" is the superclass window for the demo windows in StudioTips.