# Question binding gtk\_text\_mark\_new

**URL:** <https://www.ruby-forum.com/t/question-binding-gtk-text-mark-new/109219>\
**Category:** Ruby-Gnome 2\
**Created:** [July 12, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/question-binding-gtk-text-mark-new/109219 "2007-07-12T14:50:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 12, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/question-binding-gtk-text-mark-new/109219/1 "2007-07-12T14:50:12Z")

</div>

[http://developer.gnome.org/doc/API/2.0/gtk/GtkTextMark.html#id3010285](http://developer.gnome.org/doc/API/2.0/gtk/GtkTextMark.html#id3010285)

This function looks like a good candidate for a mandatory argument and  
an optional argument: the name can be NULL, so should be optional in  
Ruby constructor, and there is no real good default for the  
left\_gravity parameter, so it makes sense to have it mandatory.

However, in the C form the optional argument comes first (name) and  
the mandatory comes second (left\_gravity). So it might be confusing to  
reverse the parameters order in the Ruby constructor (first: mandatory  
left\_gravity; second: optional name).

WDYT?

–  
Guillaume C. - [http://zarb.org/~gc/](http://zarb.org/~gc/)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)

---

<div class="post-metadata">

**Author:** ![blueprint](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@blueprint](https://www.ruby-forum.com/u/blueprint)\
**Post date:** [July 13, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/question-binding-gtk-text-mark-new/109219/2 "2007-07-13T14:42:24Z")

</div>

Hi,

I think Gtk::TextMark.new(nil, true) is not bad idea.

“name” is more important than left\_gravity, but if you  
want to use it as anonymous, can use nil instead.

So I think we don’t need to change the parameter in this case.

On Thu, 12 Jul 2007 14:49:46 +0200  
“Guillaume C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> left\_gravity; second: optional name).  
> [http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> removed\_email\_address@domain.invalid  
> [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

This [SF.net](http://SF.net) email is sponsored by DB2 Express  
Download DB2 Express C - the FREE version of DB2 express and take  
control of your XML. No limits. Just data. Click to get it now.  
[http://sourceforge.net/powerbar/db2/](http://sourceforge.net/powerbar/db2/)
