Re: [Vala] access static method
- From: Wolfgang Mauer <wolfgang mauer kabelmail de>
- To: Miguel Miranda <phastmike gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] access static method
- Date: Tue, 26 Mar 2019 17:07:33 +0100
Thanks for your answer...
That's what i thought
but if i try to use "valaDevelop.get_text" inside method mymethod in
class abc
the compiler say:
/home/wolfgang/Projekte/vDevelop/valaDevelop/completion_provider.vala:59.80-59.99:
error: The name `get_text' does not exist in the context of
`valaDevelop.valaDevelop'
_symbol_match =
_symbol_finder.find_symbol_by_name(word.strip(), _fullpath,
valaDevelop.get_text((SourceBuffer)currentIter.get_buffer()),
currentIter.get_line()+1, currentIter.get_line_offset());
^^^^^^^^^^^^^^^^^^^^
Can that be a Bug?
:-(
Am 26.03.19 um 16:56 schrieb Miguel Miranda:
Namespace static method:
Namespace.staticmethodname ()
Class method:
Namespace.class.staticmethodname ()
On Tue, Mar 26, 2019, 15:25 Wolfgang Mauer
<wolfgang mauer kabelmail de <mailto:wolfgang mauer kabelmail de>> wrote:
How can i access a static method(Methods in Namespace are
static?!) from
a method inside a class that contains a method with the same name?
namespace valaDevelop
{
public string get_text(TextBuffer buffer, bool
include_hidden_chars
= true)
{
...
}
public class abc
{
public void mymethod()
{
----> //now i want to access the static method above not
the one inside the class
}
public string get_text()
{
...
}
}
}
I have already tried a few options, but it did not work
"global.get_text", "valaDevelop.get_text", "::get_text" :-(
Thanks for Help
Wolfgang
_______________________________________________
vala-list mailing list
vala-list gnome org <mailto:vala-list gnome org>
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]