Equals – PB Docs 2021

Equals

Description

Tests for equality between the supplied PBDOM_OBJECT and the
PBDOM_ATTRIBUTE from which the method is invoked.

Syntax

Argument

Description

pbdom_attribute_name

The name of the PBDOM_ATTRIBUTE

pbdom_object_ref

A PBDOM_OBJECT to be compared

Return value

Boolean.

Returns true if the current PBDOM_ATTRIBUTE is equivalent to the
input PBDOM_OBJECT and false otherwise.

Throws

EXCEPTION_USE_OF_UNNAMED_PBDOM_OBJECT — If this PBDOM_ATTRIBUTE
does not have or has not been assigned a user-defined name.

EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE — if the input
PBDOM_OBJECT is not a reference to an object derived from
PBDOM_OBJECT.

Examples

  1. The following code uses the Equals method to test for
    equivalence between a referenced PBDOM_OBJECT and a cloned
    object.

    The SetName method names the newly created PBDOM_ATTRIBUTE,
    which is subsequently cloned with the Clone method. The
    Equals method tests for equality between the cloned PBDOM_ATTRIBUTE
    pbdom_attr_clone and the referenced PBDOM_OBJECT pbdom_attr. A
    message box displays the result returned from the
    Equals method.

    Note here that because a cloned object is never equivalent to
    the object from which it is cloned, the Equals method returns
    false.

  2. The following code uses the Equals method to test for
    equivalence between two cloned objects.

A newly created PBDOM_ATTRIBUTE is cloned, and a reference to this
clone is assigned to pbdom_attr_2. The Equals method tests for equality
between the cloned PBDOM_ATTRIBUTE pbdom_attr_clone and the reference to
it, pbdom_attr_2. A message box displays the result returned from the
Equals method.

Here the Equals method returns true.

Usage

Note that the clone of a PBDOM_ATTRIBUTE is not considered equal
to itself.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x