on 02-12-2015 2:05 PM
I have a PB window which has a userobject placed on it. How can I find out the name of the library object that was placed on the window to create the user object control (which was given a different name when placed on the window).
tia
las
Go to script painter of the control to see direct ancestors. (The second from the top is half the answer to the original question) Close the object. Use the object browser to locate it. RMB -> Edit. Title tells you which library it lives in.(other half answer to the question)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not really a solution for a large, existing app, but ...
at a previous work place, we had a class header for each object. Like an event/function header, but added to the Instance Variables section of an object with the object name and brief description. Therefore each object had it's own name as a string inside of it, which would show up in a search.
I found this incredibly useful, and not only for searching for object references. Would definitely recommend this approach for a new application.
That probably won't help in your situation though, for that I agree with the other suggestions about using the object browser as a good way to find an object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use the Object Browser (Browser... under the Tools menu), user object tab, this sorts all user objects in the application alphabetically which prevents you from having to hunt for it. From the object browser you can right-click and edit the object at which point the library name and path will be displayed in the window title.
Get the name from the "inherited from..." from the top of the properties pane if you don't know the name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Laurel;
If you know the object class name you are looking for an need to know its PBL location (especially in an application that has dozens or 100+ PBLs - here is what I do:
1) Open the Object Browser from the PB IDE's main toolbar ...
2) Locate the object in the appropriate area of the Object Browser.
3) Use the RHMB and select the "Edit" option from the resulting popup menu.
4) When the object class opens in the appropriate browser - the MDI Sheet window title will tell you where its located (ie: PBL).
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another way would be to use the Object Find feature from PB Tools:
Hi Laurel;
In addition to Brad's great suggestion, here are a few other tools:
1) PBSearch: Topwiz Software - PBSearch
2) PBLPeeper: PBL Peeper (free)
3) VisualExpert: Understand & modify any PowerBuilder application
HTH
Regards .. Chris
Hi It has always been a problem for me to find an object in the big project. I begged Sybase to develop something for this problem but they didn't. And I developed "Object Find" in PBTools. You can find any object by writing some letters of object names. After listing the object names, I would like to open the object by double clicking it, but no way, there is no PB API for that. Murat Yelkovan https://myelkovan.codeplex.com
In addition to Brad's reply, in the title of the Properties window, as his example, the u_cst_myobject is the actual PB object contained in one of your PB Libraries. You can then search for that object from your libraries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neil;
There is a bug in the PB IDE "Search" feature that does not locate an object in your PBL list when you search on a Target. This is the case in PB 12.6 and I can (and have) reported this issue since at least PB the 3/4 beta's.
For example:
In the above test, the object being searched for is indeed one of the PBL's in the Target's library list.
Regards .. Chris
If you select the userobject in your window, the properties pane will show you the object name of the userobject in the title.
e.g.
Properties - uo_1 inherited from u_cst_myobject
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Edit the window source. At or near the beginning you'll see the forward declarations section (bracketed by "forward" & "end forward" lines). In this section are type declarations that should contain the information you are requesting.
For example, if the window contains a DataWindow control user object named dw_maint which is inherited from ancestor user object u_dw, you would see a type declaration that begins:
type dw_maint from u_dw within <windowclassname>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Laurel;
Are you asking about ...
1) Locating it in the PB IDE?
- or -
2) Locating this information at application run-time?
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand you right you want to know where a user object control is inherited from. You can use the Classdefinition property of your control. The classdefinition object has a property called Ancestor of type Classdefiniton. Its Name property contains the name of the class:
e.g. uo_1.Classdefinition.Ancestor.Name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.