Re: [Vala] Gtk.FileChooserButton

2017-04-10 Thread Chris Daley
Hi Sascha,

FileChooserButton implements the FileChooser interface, so I believe the
method you want to use is get_current_foler_file:

https://valadoc.org/gtk+-3.0/Gtk.FileChooser.get_current_folder_file.html

Cheers
Chris D

2017-04-10 10:34 GMT-07:00 Sascha Manns :

> Hello list,
>
> i tried out to get a special folder from a Gtk.FileChooserButton.
>
> In Mono/Gtk-Sharp i used:
>
> public string RevUpdFolder { get; set; }
> [Builder.Object] private FileChooserButton FileChooserRevUpd;
> protected void OnFileChooserRevUpdFileSet(object sender, EventArgs e)
> {
> RevUpdFolder = FileChooserRevUpd.CurrentFolder;
> }
>
> In Vala i tried to port it:
>
> public string revupdfolder { get; set; }
> [Gtk.Child] private Gtk.FileChooserButton fileChooserRevUpd;
> private void on_fileChooserRevUpd_file_set () {
> revupdfolder = fileChooserRevUpd.current_folder;
> }
>
> But it looks like there is no way to get the current folder like
> Gtk-Sharp it does, or?
>
> --
> Sascha Manns
> Maifeldstraße 10
> 56727 Mayen
>
> P: +49-2651-4014045
> W: http://saigkill.tuxfamily.org
>
>
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
>


-- 
Chris Daley
Pacific Northwest

e: chebiza...@gmail.com
w: http://chrisdaley.biz
m: +1-971-703-9251
s: chebizarro
tw: chebizarro
tz: PDT
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Gtk.FileChooserButton

2017-04-10 Thread Sascha Manns
Hello list,

i tried out to get a special folder from a Gtk.FileChooserButton.

In Mono/Gtk-Sharp i used:

public string RevUpdFolder { get; set; }
[Builder.Object] private FileChooserButton FileChooserRevUpd;
protected void OnFileChooserRevUpdFileSet(object sender, EventArgs e)
{
RevUpdFolder = FileChooserRevUpd.CurrentFolder;
}

In Vala i tried to port it:

public string revupdfolder { get; set; }
[Gtk.Child] private Gtk.FileChooserButton fileChooserRevUpd;
private void on_fileChooserRevUpd_file_set () {
revupdfolder = fileChooserRevUpd.current_folder;
}

But it looks like there is no way to get the current folder like
Gtk-Sharp it does, or?

-- 
Sascha Manns
Maifeldstraße 10
56727 Mayen

P: +49-2651-4014045
W: http://saigkill.tuxfamily.org




signature.asc
Description: OpenPGP digital signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Gtk.FileChooserButton

2017-04-10 Thread Chris Daley
Sorry, I wrote my reply without reading your code thoroughly...

In Vala, what you're looking for is implemented as a method not as a
property:

https://valadoc.org/gtk+-3.0/Gtk.FileChooser.html

https://valadoc.org/gtk+-3.0/Gtk.FileChooser.get_current_folder.html

Cheers
Chris D

2017-04-10 10:42 GMT-07:00 Chris Daley :

> Hi Sascha,
>
> FileChooserButton implements the FileChooser interface, so I believe the
> method you want to use is get_current_foler_file:
>
> https://valadoc.org/gtk+-3.0/Gtk.FileChooser.get_current_folder_file.html
>
> Cheers
> Chris D
>
> 2017-04-10 10:34 GMT-07:00 Sascha Manns :
>
>> Hello list,
>>
>> i tried out to get a special folder from a Gtk.FileChooserButton.
>>
>> In Mono/Gtk-Sharp i used:
>>
>> public string RevUpdFolder { get; set; }
>> [Builder.Object] private FileChooserButton FileChooserRevUpd;
>> protected void OnFileChooserRevUpdFileSet(object sender, EventArgs e)
>> {
>> RevUpdFolder = FileChooserRevUpd.CurrentFolder;
>> }
>>
>> In Vala i tried to port it:
>>
>> public string revupdfolder { get; set; }
>> [Gtk.Child] private Gtk.FileChooserButton fileChooserRevUpd;
>> private void on_fileChooserRevUpd_file_set () {
>> revupdfolder = fileChooserRevUpd.current_folder;
>> }
>>
>> But it looks like there is no way to get the current folder like
>> Gtk-Sharp it does, or?
>>
>> --
>> Sascha Manns
>> Maifeldstraße 10
>> 56727 Mayen
>>
>> P: +49-2651-4014045
>> W: http://saigkill.tuxfamily.org
>>
>>
>>
>> ___
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
>>
>>
>
>
> --
> Chris Daley
> Pacific Northwest
>
> e: chebiza...@gmail.com
> w: http://chrisdaley.biz
> m: +1-971-703-9251 <(971)%20703-9251>
> s: chebizarro
> tw: chebizarro
> tz: PDT
>
>


-- 
Chris Daley
Pacific Northwest

e: chebiza...@gmail.com
w: http://chrisdaley.biz
m: +1-971-703-9251
s: chebizarro
tw: chebizarro
tz: PDT
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Gtk.FileChooserButton

2017-04-10 Thread Al Thomas via vala-list
> From: Sascha Manns 

> Sent: Monday, 10 April 2017, 18:35
> Subject: [Vala] Gtk.FileChooserButton

> In Vala i tried to port it:

> public string revupdfolder { get; set; }
> [Gtk.Child] private Gtk.FileChooserButton fileChooserRevUpd;
> private void on_fileChooserRevUpd_file_set () {
> revupdfolder = fileChooserRevUpd.current_folder;
> }

> But it looks like there is no way to get the current folder like

> Gtk-Sharp it does, or?

It is likely to be:
revupdfolder = fileChooserRevUpd.get_current_folder ();

Valadoc shows that FileChooserButton implements FileChooser:
https://valadoc.org/gtk+-3.0/Gtk.FileChooserButton.html
On that Valadoc page there is a sub-section "All known members
inherited from interface Gtk.FileChooser". One of those is the
method get_current_folder (). It doesn't look like there is a
similar property.

Regards,

Al
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] cannot locate ITS rules for org.gnome.Publisher.appdata.xml.in

2017-04-10 Thread Sascha Manns
Hi Al,

thank you very much for helping out. I'll try this out.

Greetings
Sascha

-- 
Sascha Manns
Maifeldstraße 10
56727 Mayen

P: +49-2651-4014045
W: http://saigkill.tuxfamily.org




signature.asc
Description: OpenPGP digital signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Sascha Manns
Hello list,

i created a class what contains:

// Properties
public string doctype { get; set; }

// GUI Elements
[GtkChild] private Gtk.ComboBoxText cboDocType;

// on_cboDocType_changed gets the chosen document type
[GtkCallback]
private void on_cboDocType_changed () {
doctype = cboDocType.get_active_text;
}

The compiler says:
ui/create_publication.vala:45.2-45.37: error: Assignment: Cannot convert
from `Gtk.ComboBoxText.get_active_text' to `string'
doctype = cboDocType.get_active_text;


But as far as i know the combobox text is a string. So it should work.

What can i do?

Greetings
Sascha

-- 
Sascha Manns
Maifeldstraße 10
56727 Mayen

P: +49-2651-4014045
W: http://saigkill.tuxfamily.org




signature.asc
Description: OpenPGP digital signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Jonathan Moerman
get_active_text looks like a method  to me, did you try doctype =
cboDocType.get_active_text(); ?

Op 10 apr. 2017 4:22 p.m. schreef "Sascha Manns" :

Hello list,

i created a class what contains:

// Properties
public string doctype { get; set; }

// GUI Elements
[GtkChild] private Gtk.ComboBoxText cboDocType;

// on_cboDocType_changed gets the chosen document type
[GtkCallback]
private void on_cboDocType_changed () {
doctype = cboDocType.get_active_text;
}

The compiler says:
ui/create_publication.vala:45.2-45.37: error: Assignment: Cannot convert
from `Gtk.ComboBoxText.get_active_text' to `string'
doctype = cboDocType.get_active_text;


But as far as i know the combobox text is a string. So it should work.

What can i do?

Greetings
Sascha

--
Sascha Manns
Maifeldstraße 10
56727 Mayen

P: +49-2651-4014045
W: http://saigkill.tuxfamily.org



___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Sascha Manns
Hi Jonathan,

yeah that works. Thank you :-)

Greetings
Sascha

-- 
Sascha Manns
Maifeldstraße 10
56727 Mayen

P: +49-2651-4014045
W: http://saigkill.tuxfamily.org




signature.asc
Description: OpenPGP digital signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Ulink
Damit, too late ;-)

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Ulink
Hi Sascha,

> doctype = cboDocType.get_active_text;

You are assigning a function (a delegate, means a pointer to a function)
to an string, thats not possible, use

  doctype = cboDocType.get_active_text();

instead (parantheses on right side) to CALL the get_active_text()
function, which returns a string.

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Ulink
Note 1: If get_active_text is a PROPERTY instead of a FUNCTION, your
code would have been ok.

Note 2: Much often, getter/setter functions also have a corresponding
property doing the same job. Use whatever you like.

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list