1. EuGTK - get vs get conflict
- Posted by Jerry_Story Sep 16, 2010
- 1060 views
What is the best way to handle this conflict?
A namespace qualifier is needed to resolve 'get'because 'get' is declared as a global/public symbol in: ./GtkEngine.e /usr/share/euphoria/include/std/get.e filename = get(dlgSaveDiet,"filename")
2. Re: EuGTK - get vs get conflict
- Posted by alanjohnoxley Sep 16, 2010
- 1021 views
Hi,
what is the "get" reference in ./GtkEngine.e ?
3. Re: EuGTK - get vs get conflict
- Posted by mattlewis (admin) Sep 16, 2010
- 945 views
What is the best way to handle this conflict?
A namespace qualifier is needed to resolve 'get'because 'get' is declared as a global/public symbol in: ./GtkEngine.e /usr/share/euphoria/include/std/get.e filename = get(dlgSaveDiet,"filename")
As the message suggests....qualify the use of get() with a namespace.
I assume that you're trying to use the get() defined in EuGTK. If EuGTK defines a default namespace, then you could use that. Otherwise, you'll need to do something like:
include eugtk.e as gtk ... filename = gtk:get(dlgSaveDiet,"filename")
A default namespace is declared at the top of a file. It must be the first non-comment euphoria statement:
-- file foo.e namespace foo
That allows users to use the foo namespace qualifier without needing to specify their own. The standard library does this. For get.e, the namespace is stdget.
Matt
4. Re: EuGTK - get vs get conflict
- Posted by irv Sep 16, 2010
- 917 views
I suppose I should add "namespace gtk" to the GtkEngine - there's no downside to this, is there?
5. Re: EuGTK - get vs get conflict
- Posted by mattlewis (admin) Sep 16, 2010
- 951 views
I suppose I should add "namespace gtk" to the GtkEngine - there's no downside to this, is there?
Not really. Users aren't forced to use it, and the parser is fairly smart about detecting namespace qualifiers vs other symbols. BTW, default namespaces are considered to be of public scope.
Matt
6. Re: EuGTK - get vs get conflict
- Posted by jimcbrown (admin) Sep 16, 2010
- 935 views
I suppose I should add "namespace gtk" to the GtkEngine - there's no downside to this, is there?
Not really. Users aren't forced to use it, and the parser is fairly smart about detecting namespace qualifiers vs other symbols. BTW, default namespaces are considered to be of public scope.
Matt
What happens if two files have the same default namespace and thus conflict?
7. Re: EuGTK - get vs get conflict
- Posted by mattlewis (admin) Sep 16, 2010
- 977 views
I suppose I should add "namespace gtk" to the GtkEngine - there's no downside to this, is there?
Not really. Users aren't forced to use it, and the parser is fairly smart about detecting namespace qualifiers vs other symbols. BTW, default namespaces are considered to be of public scope.
What happens if two files have the same default namespace and thus conflict?
Same thing as if they have two other symbols named the same. The user of the two files will have to create his own namespaces to disambiguate (i.e., include <file> as <namespace>). The local namespace will override any default namespaces, just like other local symbols override symbols from other files.
Matt