Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 396333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:32:31+00:00 2026-05-12T16:32:31+00:00

I am playing a little with drag and drop under gtk#. When calling protected

  • 0

I am playing a little with drag and drop under gtk#.
When calling

protected virtual void OnDragDataGet (object o, Gtk.DragDataGetArgs args)
{
    byte[] data = GetSomeData();
    args.SelectionData.Set(args.Context.Targets[0], 0, data);
}

an error occurs:

Gtk-CRITICAL **: _gtk_selection_request: assertion `(data.format >= 8) && (data.format % 8 == 0)' failed

however setting the format to 8 works fine:

protected virtual void OnDragDataGet (object o, Gtk.DragDataGetArgs args)
{
    byte[] data = GetSomeData();
    args.SelectionData.Set(args.Context.Targets[0], 8, data);
}

I have found some examples on drag and drop, all use 8 as the format for sending the data. (Using 0 was acually a typo.) However I have not found what this format does, or why 8 works, whereas 0 does not.

Can someone explain what “fomat” does ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:32:32+00:00Added an answer on May 12, 2026 at 4:32 pm

    From

    http://www.go-mono.com/docs/index.aspx?link=M%3aGtk.SelectionData.Set%28Gdk.Atom%2cSystem.Int32%2cSystem.Byte%5B%5D%29:

    format (number of bits in a unit) – set this to 8 and encode your data as UTF-8

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am playing a little with fulltext indexes in Sql Server 2008. I created
I'm playing a little bit with WML with PHP, then I want to know
i'm playing a little with Haskell and i'm stuck with this error, using the
I'm playing around a little with dividing up a MVC-site into several assemblies (ran
As a long time Eclipse user, I'm playing around a little bit with IntelliJ
I have been playing with objective C a little and am finding it a
I am playing about just now trying to teach myself a little bit about
I have been playing with CouchDB and CouchApp for a little while now. I
I've been playing around with Scalaz to get a little bit of the haskell
I am playing around with jQuery and thought I would build a little css

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.