Re: [Vala] using liststore objects



On Fri, 2009-05-29 at 09:49 +0200, Joss 4 wrote:
Hi Yu,

I believe you forgot to cc the message to me. :)
Thanks again,
With your post I began to understand something abou the name convention 
and style settings.  Now I try to do some test.
In order to set GTK properties do you think it always be this way for 
ever?  I was asking why one can't set properties directly like code  :
widget.backcolor = clRed;
widget.Font = new Font( "Arial", 8, style.regular);

It is so simply and natural. Is there some unknown thing  under X11 or 
whatever else we don't know ? . 
Those style-properties aren't properties. Properties are associated with
object instances, whereas style-properties, when they are invented, are
targeting at classes of widgets. The GTK model is different from our
intuition here. That's why they are so awkward to use. I've never found
any easier way of using them.


I remember when I learned about objects 
and properties ....  
and so what is the definition of GTK+ ?.
For regular properties, you can definitely do so. For example,

Gtk.Label label = new Gtk.Label("hola");
label.text = "hello";


Scuse me , I am a little critic , but I spent 12 days to fight whit GTK  
to make a little form with 2 TreeView-Listview and some buttons. 
TreeView is the most difficult widget in GTK. Given the fact you are not
yet familiar with the GLib stuff at all, I would say you were choosing
the steepest cliff. Did you read the GTK tutorial? I would recommend you
translate several examples with Vala to make sure you are familiar
enough with the language and the toolkit first.

http://library.gnome.org/devel/gtk-tutorial/2.17/

With 
this time with sharpdevelop on windows I realized a whole report 
designer with property editor and browser field.

There is one powerful tool. It is called Glade-3. Then you gonna take a
grab of GtkBuilder and the XML(GMarkup). 

That said, I like vala  because  I think it is a good bridge from 
windows to linux  without any runtime level  between. I agree with your 
sentence : "you might have to settle with this situation" ,  in order to 
vala, but I understend people  at scribus that decided to convert  all 
from GTK+ to QT.
Freedom is not free... It costs one hour oh five.

If you are prototyping for a company, I would sincerely suggest you
should also take a look at Mono(Sharp on Linux); it is also promising.
MonoDevlop is mono's IDE; not productive yet as I learned from the net.
but I do think they already have auto-completion: it is a must for a
product toward the professionals.

Okay , I still have to solve :

- ListStore Header column resize
Refer to http://markmail.org/message/xdemlbkhpls6v5u2

it is written in Gtkmm though.

- ListStore grid visible , thikness and color.
- ListStore invisible columns
- ListStore  background image or background color
- Widget border width and color
The trilogy of GtkTreeView GtkTreeModel and GtkTreeStore definitely has
confused you. Refer to 
http://en.wikipedia.org/wiki/Model-view-controller
and
http://blog.riff.org/2006_10_15_grokking_phpgtk_gtktreeview_and_friends

gtk-app-list will have the people that can answer you these questions
about TreeView. To me, TreeView is VERY frustrating to work with in
either C or VALA, because of the very complicated nature of visualizing
a multi-column tree.

Looks like you are trying to make a highly decorated GTK app. Most of
the GTK apps I use have no background image, nor customized background
color, nor customized widget border width or color.


... and last but not least  Code completion and list of available 
packages in valide.
Sorry but I am a vim. There is plenty of valide users here though.


Can you suggest some specific code snippet of people that already did 
it. 

I did write some simple tree view half a year ago but I did never go
into that deep. I don't know if any other people used TreeView with
VALA. Nautilus, Evolution, RhythmBox, Epiphany all have fancy treeviews.
They are all very well written in C; it shouldn't be difficult to
convert any of their code into vala.

Good luck!

Yu
Thansk  a lot.


  
 

_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




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