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 8370849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:00:51+00:00 2026-06-09T14:00:51+00:00

I have a hash with values that build into following structure: string type1_name ->

  • 0

I have a hash with values that build into following structure:

string type1_name -> Hash(
              string name_member -> DataStruct,
              string name_member -> DataStruct,
              string name_member -> DataStruct,
              string name_member -> DataStruct
            ),
string type2_name -> Hash(
              string name_member -> DataStruct,
              string name_member -> DataStruct,
              string name_member -> DataStruct,
              string name_member -> DataStruct
            ),
/// etc

the problem is I have 3 views: 2 TreeViews (extended actual tree showing all columns in hierarchial way and brief as ListStore showing only type icon and name of DataStruct, those views are owned by different parents and maybe shown at the same time) and 1 ListView with icon representation of same data. ATM I have a class managing data (validations, serialization, deserialization, …) and 3 models for each of those views, so every time I update/delete/create item I must update all 3 models and that doesn’t look good 🙁

What I thought about is creating a class implementing Gtk.TreeModel and providing common data source that can be used as model for all 3 views, but I can’t find any documentation on how to implement gtk.TreeModel. I’ve tried to look through GtkListStore (native C implementaion) and I see it reimplements really lots of methods. Isn’t there any easier way?

  • 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-06-09T14:00:52+00:00Added an answer on June 9, 2026 at 2:00 pm

    No, there isn’t an easier way, but it’s really not too difficult. Looking at the C code can be intimidating, but there are really only about a dozen methods which you need to implement. They are marked as abstract in gtk+-3.0.vapi (and in valadoc.org’s Gtk.TreeModel docs)., and the implementations are usually pretty trivial. If you want an example SQLHeavyGtk.Model is the only one I can think of.

    The methods which are marked as virtual don’t generally require an implementation, though you can provide one if you want (often used for optimizations, and I’m guessing Gtk.ListStore provides a lot of them).

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

Sidebar

Related Questions

I have a python program that takes the md5 & sha1 hash values of
How do I swap keys and values in a Hash? I have the following
I have a hash table that contains values of a^j. j is the key
I have written a simple Java class to generate the hash values of the
I have a Hash Map (many-to-one relationship between texts and boolean values): name flag
Why two object's hash code is not same even though they have similar values.
I have @hash that looks like this: [1, {:clid=>1, :nvz=>4, :tip=>IP, :name=>Mark, :record=>some text}]
I have a hash that looks like this h1 = {4c09a0da6071a593f051de32=>[4c09a0da6071a593f051de32, Cafe Bistro, 37.78458803130115,
If I have a hash in Perl that contains complete and sequential integer mappings
I do the following my_hash = Hash.new my_hash[:children] = Array.new I then have a

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.