Please explain the difference between using ~> and -> ?? When do you use ~> or ->?
I looked at some Skill codes and I see both are used
Thanks for your explanation..
The basic answer is that "~>" should be used for database objects (and CDF, techfiles, constraints...) whereas the "->" operator is for "everything else" such as windows, menu structures, form structures, disembodied property lists, tables etc. Often they can be used interchangeably but with one big difference: the ~> operator can handle a list on its left hand side (input) and expand the query for each of the elements on the left. Here's a brief example:
cv = geGetEditCellView()
=> (db:0x16fcba12 db:0x16fcba13 db:0x16fcba14 db:0x16fcba15 ...)
=> ("Out" "net9" "A" "vss!" "B" ...)
In the example the second ~> (in red) has a list as its input and it queries the "name" attribute for each of the members and returns the list of results. If you tried "->" for the second query ("name") it will return nil, but if you used it for the "cv~>nets" query it would work since there is only one thing in its input on the left.
Hopefully this clarifies the main differences. Generally speaking you should use the "~>" for database objects, techfile access, constraint object access and so on, and use "->" for everything else.