Re: [g-a-devel]Why does AccessibleEditableText_insertText require a length argument?
- From: "Padraig O'Briain" <Padraig Obriain Sun COM>
- To: gnome-accessibility-devel gnome org, mlang delysid org
- Subject: Re: [g-a-devel]Why does AccessibleEditableText_insertText require a length argument?
- Date: Thu, 17 Jul 2003 14:49:12 +0100 (BST)
The prototype for AccessibleEditableText_insertText seems to be based on
gtk_editable_insert_text.
I think strlen(str) should be sufficient. I would expect specifing -1 will also
work.
Padraig
> Hello.
>
> I'd like to understand why AccessibleEditableText_insertText
> requires a length argument, whereas AccessibleEditableText_setTextConents
> does not. Here are the two prototypes from cspi/spi.h:
>
> SPIBoolean
> AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
> const char *newContents);
>
> SPIBoolean
> AccessibleEditableText_insertText (AccessibleEditableText *obj,
> long int position,
> const char *text,
> long int length);
>
> The fact that AccessibleEditableText_setTextContents does
> not need a length argument somewhat indicates that it assumes
> a 0-byte terminated standard C string. OTOH, the length argument
> of AccessibleEditableText_insertText makes me thing it would require
> some Unicode string.
>
> Can anyone explain why the second function does require
> a length argument, and if strlen(str) is sufficient to suppply this?
>
> --
> Thanks,
> Mario | Debian Developer <URL:http://debian.org/>
> | Get my public key via finger mlang db debian org
> | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
> _______________________________________________
> Gnome-accessibility-devel mailing list
> Gnome-accessibility-devel gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]