Sv: list of DAM properties
Daniel Sananes
daniel.s at kopparbergs.se
Sun Mar 5 00:29:08 UTC 2023
Hi Kelly
Your code does not give any new info that does not already exists after $makelist.
This for test on the postgres object and a $cwind.
I think I am not understanding the eval() part.
Do $cwind.$attributes.$makelist($ref.$name) Returns #L1. This gives me 74 $attributes.
When having typed Do $cwind.$ ,the method editor shows the dropdown window with possible attributes or methods to choose from.
There are 86 to choose from.
7 of them are $objs, $tvars etc. and 1 is $inherited (context sensitive notation). These are not in the $makelist.
The $makelist has $add, $addafter etc. but these does not exist when typing.
Do $sessions.KPB.$attributes.$makelist($ref.$name) Returns #L4. This gives 66 lines or $methods. No $properties, like $hostname etc., are in the list.
Suggestion while typing gives 111 $attributes and $methods.
Seems $attributes does not give back attributes/properties for a current session.
Do tPostgres.$hostname Returns #S1. Value 'localhost'.
Do $sessions.KPB.$attcount Returns #10. Gives 47.
Calculate #S1 as $sessions.KPB.$att(12) gives 1. att(5) gives 0. I don’t know what is returned.
Funny it is not possible to figure out how to get $apiversion, $hostname etc. in to the $makelist.
/Daniel
-----Ursprungligt meddelande-----
Från: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> För Kelly Burgess
Skickat: den 4 mars 2023 23:09
Till: OmnisList <omnisdev-en at lists.omnis-dev.com>
Ämne: Re: list of DAM properties
Hi Daniel,
I have some old code I used to explore the properties of window/report objects -- maybe it'd work for object instances, haven't tried.
Kelly
Set reference ref to pItem.$ref ;; some window or report object
Do ref.$attributes.$makelist($ref.$name,$ref.$desc,$ref.$canassign,$ref.$obj,$ref.$name) Returns attList Do attList.$redefine(propertyName,description,canAssign,propsObject,propValue)
Do attList.$sort(canAssign,kFalse)
For i from 1 to attList.$linecount step 1
If attList.[i].propertyName<>''
Calculate theProperty as con('pitem.',attList.[i].propertyName)
Calculate attList.[i].propValue as eval(theProperty)
End If
End For
Breakpoint {attList}
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
VARNING: Det här e-postmeddelandet kommer från en extern avsändare. KLICKA INTE på länkar eller bilagor om du inte känner igen avsändaren och vet att innehållet är säkert.
More information about the omnisdev-en
mailing list