Re: [orca-list] Help with Accerciser iPython console




Thank-you very much, Chris - that was my problem!
I am now able to test my code with Accerciser's iPython console - and the correct parameter order - and it is all working well.

Thanks very much for the lesson you have taught me: "when using python, always look at the python wrappers, and don't expect the C interface to be the same".
It turns out that the parameter ordering for AccessibleEditableText_insertText (http://library.gnome.org/devel/at-spi-cspi/unstable/at-spi-cspi-AccessibleEditableText-Interface.html#AccessibleEditableText-insertText)
is indeed different from atk_editable_text_insert_text (http://library.gnome.org/devel/atk/unstable/AtkEditableText.html#atk-editable-text-insert-text).
In fact, they have even changed the position parameter to a plain int and not a pointer to an int, so I didn't even need to use Python's ctypes library.
If anyone ever does need to do that, the folks on the python list sent me this great link: http://docs.python.org/library/ctypes.html#passing-pointers-or-passing-parameters-by-reference

For those that are interested, the correct iPython call to do what I needed to do was simply:
   t.insertText(10, "brown", 5)

Thanks again,
Carolyn



From: Christopher Brannon <chris the-brannons com>
To: Carolyn MacLeod/Ottawa/IBM IBMCA
Cc: orca-list gnome org, orca-list-bounces gnome org
Date: 08/10/2010 02:13 PM
Subject: Re: [orca-list] Help with Accerciser iPython console





Carolyn MacLeod <Carolyn_MacLeod ca ibm com> writes:

>    Your suggestion looked really good and I had high hopes,

Carolyn,
>From what I can tell, insertText should be called like this:
t.insertText(position, string, length),
not like this:
t.insertText(string, length, position).
The arguments were transposed in the example calls that you posted
yesterday.

-- Chris
[attachment "attvldh4.dat" deleted by Carolyn MacLeod/Ottawa/IBM]




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]