After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 437528 - StateSet.equals fails
StateSet.equals fails
Status: RESOLVED FIXED
Product: pyatspi2
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Peter Parente
Li Yuan
Depends on:
Blocks: 326516
 
 
Reported: 2007-05-10 19:06 UTC by Ariel Rios
Modified: 2019-03-27 20:11 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Test case 1. (3.28 KB, text/plain)
2007-05-10 19:08 UTC, Ariel Rios
  Details
fixes equals (412 bytes, patch)
2007-05-11 00:33 UTC, Peter Parente
committed Details | Review

Description Ariel Rios 2007-05-10 19:06:11 UTC
Please describe the problem:
Working on collection I have found some problems using StateSet both on the "C" libspi implementatin and on th Pyorbit one. I have found these two things:

1- 
 

Steps to reproduce:
1. If i do s=obj.getState() ; s.equals(s) ==> I get False This happens both on C and Python
2. If I create a State in python then when I try to get it from C( get_atk_state_from_servant()) the program crashes.


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ariel Rios 2007-05-10 19:08:35 UTC
Created attachment 87979 [details]
Test case 1.

This script shows the use of stateset using calls from both python and C and the results. You need to have gcalctool running.
Comment 2 Peter Parente 2007-05-10 20:10:31 UTC
The equals bug is my fault in Python. The crash could be how we're implementing the state set object. I'm grasping at straws about how to do it in Python.
Comment 3 Peter Parente 2007-05-10 20:15:41 UTC
Possibly a problem with calling methods on the Python implementation. Look at http://bugzilla.gnome.org/attachment.cgi?id=85914&action=view where the methods are invoked on the _this() object instead.
Comment 4 Ariel Rios 2007-05-10 20:30:07 UTC
Doing:

ss = StateSetImpl()

poa = orb.resolve_initial_references("RootPOA")

ss._this().add(a.STATE_VISIBLE)

seems to solve the crash problem. I will test on Collection.

Still pending the equals...

thans
ariel
Comment 5 Peter Parente 2007-05-11 00:33:30 UTC
Created attachment 87990 [details] [review]
fixes equals
Comment 6 Peter Parente 2007-05-11 01:01:04 UTC
Ariel,

I'm closing this bug as the problem with equals and opening a new one about the crashing problems.