Git Product home page Git Product logo

gtkaml's People

Contributors

b100dian avatar googlecodeexporter avatar

Watchers

 avatar

gtkaml's Issues

"Existing" widgets don't allow changing properties

If you specify <VBox class:existing="dialog.vbox" spacing="5"/>, gtkamlc
complains that 
"No attributes other than the container add parameters are allowed on
references"

This is ok if you're referencing one of your own identifiers (you should
have added there the attributes) but not that useful for external existing
widgets.

Original issue reported on code.google.com by b100dian on 5 Mar 2008 at 9:50

gtkaml (not gtkamlc) does not exits if the source is not compilable

Here's a test program to demonstrate the issue:

Window $Food using=Gtk size=320,200 {
    VBox {
        Button label="CLICK ME";
    }
-{
    public static void main(string[] args) {
        Gtk.init (ref args);
        var b = new Food();
        b.show_all ();
        Gtk.main ();
    }
}-
}

$ gtkaml a.gtkon 
a.gtkaml:2.33-2.33: error: error parsing attribute name

(never returns to the shell)

Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 8:37

custom widgets cannot be containers?

What steps will reproduce the problem?
1. Create a vala class that extends VBox
2. Re-use it as a container from another gtkaml file
3. ?? profit

What is the expected output? What do you see instead?
Expected: the class hierarchy is walked and the VBox is found as container
Instead: No matching container add method found for..



Original issue reported on code.google.com by b100dian on 5 Feb 2008 at 1:32

add support for markuphint alias

I think that it would be good to have backward compatibiliity and add support 
for class renaming in the hintsfile.

[Gtk.Box]
new = orientation={Orientation.VERTICAL};spacing=0

In case i want to use an horizontal box i have to redefine the orientation 
attribute.

The problem is that this attribute is too long and boring to type, so my plan 
was to create an alias for VBox and HBox.

Original issue reported on code.google.com by [email protected] on 29 May 2012 at 10:06

-D flag is not working on gtkaml 0.6

Looks like defines are ignored. here's a test case:

gtkamlc --pkg gtk+-3.0 -D MAIN=1 bug01.gtkon

----
VBox using=Gtk $Bug01 {
        Label label="cannot compile this";
        -{
#if MAIN
        public static void main (string[] args) {
                Gtk.init (ref args);
                var w = new Window (WindowType.TOPLEVEL);
                w.add (new Bug01 ());
                w.show_all ();
                Gtk.main ();
        }
#endif
        }-
}

Original issue reported on code.google.com by [email protected] on 29 May 2012 at 11:24

GtkAML does not supports inlined construct definitions

This simple GtkON oneliner shows the problem:

VBox $Foo { -{ construct {} }- }

error: class already contains a constructor

GtkAML should recognize if the inlined code defines a construct keyword and 
wrap it someway to chain both constructs.

Original issue reported on code.google.com by [email protected] on 6 Jan 2011 at 9:45

Additional comment-style for GtkON

Hello,
I think it would be useful to add "#" as a comment-line character to the GtkON 
parser. The rationale for this is: supporting "#", one could add a shebang line 
at the beginning (like "#!/usr/bin/gtkaml"), and use GtkON+Vala as a scripting 
language (and yes, it works! :D).

I'm attaching a patch doing this.

It would be nice if you included it in the next release :)

Thanks,
David

Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 3:22

Attachments:

examples/SimpleViewer2 compile error

while compiling gtkaml got an error:

...
Making all in examples/SimpleViewer2
make[2]: Entering directory
`/usr/src/RPM/BUILD/gtkaml-0.2.7/examples/SimpleViewer2'
../../src/gtkamlc -C  --implicitsdir ../../data --pkg gtk+-2.0
SimpleViewer2.gtkaml
SimpleViewer2.vala:98.55-98.64: error: Argument 3: Cannot convert from
`ulong' to `int'
make[2]: Leaving directory
`/usr/src/RPM/BUILD/gtkaml-0.2.7/examples/SimpleViewer2'
make[1]: Leaving directory `/usr/src/RPM/BUILD/gtkaml-0.2.7'
make: Leaving directory `/usr/src/RPM/BUILD/gtkaml-0.2.7'


RPM build errors:
make[2]: *** [SimpleViewer2.stamp] Segmentation fault
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


When run gtkamlc under strace:
...
gettimeofday({1245265585, 609018}, NULL) = 0
write(2, "SimpleViewer2.vala:98.55-98.64: "...,
88SimpleViewer2.vala:98.55-98.64: error: Argument 3: Cannot convert from
`ulong' to `int'
) = 88
open("/usr/src/RPM/BUILD/gtkaml-0.2.7/examples/SimpleViewer2/SimpleViewer2.vala"
,
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault
...

When added option --save-temps to gtkamlc:

../../src/gtkamlc --save-temps -C  --implicitsdir ../../data --pkg gtk+-2.0
SimpleViewer2.gtkaml
SimpleViewer2.vala:98.55-98.64: error: Argument 3: Cannot convert from
`ulong' to `int'
      FileUtils.get_contents (filename, out contents, out length);
                                                      ^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
make: *** [SimpleViewer2.stamp] Error 1


get_contents() expect that `length' is ulong. This patch fix issue:

--- a/examples/SimpleViewer2/SimpleViewer2.gtkaml
+++ b/examples/SimpleViewer2/SimpleViewer2.gtkaml
@@ -94,9 +94,9 @@
     int err = 0;
     try
     {
-       string contents; int length;
+       string contents; ulong length;
       FileUtils.get_contents (filename, out contents, out length);
-      textview1.buffer.set_text (contents, length);
+      textview1.buffer.set_text (contents, (int) length);
     }
     catch(Error e)
     {

Original issue reported on code.google.com by [email protected] on 18 Jun 2009 at 6:54

Attached properties do not work for custom widgets

Source code example: 

<Notebook>
      <OrganizerPage>
        <tab-label>
          <Label label="Lundi" />
        </tab-label>
      </OrganizerPage>
</Notebook>

OrganizerPage is a custom widget that should be added to the Notebook with
the tab-label parameter set to new Label("Lundi"). 

The error is: 
No class tab-label found

Original issue reported on code.google.com by b100dian on 2 Jun 2008 at 3:28

*.implicits resolution order (for e.g. ScrolledWindow)

an entry like 

[ScrolledWindow]
adds = add_with_properties;add_with_viewport

in Gtk.implicits would solve the issue of picking add_with_viewport () first.
Unfortunately, this cannot be done currently as the add_with_properties
isn't searched through the class hierarchy

Temporarily, ScrolledWindow is not listed at all and
Container.add_with_properties is picked by default


Original issue reported on code.google.com by b100dian on 3 Mar 2008 at 11:44

gtkamlc-0.6beta1 compile phase fail on natty and oneric.

mymas@ubuntu:~/gtkaml/src$ make
make  all-am
make[1]: Entering directory `/home/mymas/gtkaml/src'
  CCLD   gtkamlc
../libgtkaml/.libs/libgtkaml.so: undefined reference to `g_file_read'
../libgtkaml/.libs/libgtkaml.so: undefined reference to 
`g_data_output_stream_put_string'
../libgtkaml/.libs/libgtkaml.so: undefined reference to 
`g_data_output_stream_new'
../libgtkaml/.libs/libgtkaml.so: undefined reference to 
`g_data_input_stream_new'
../libgtkaml/.libs/libgtkaml.so: undefined reference to `g_file_query_exists'
../libgtkaml/.libs/libgtkaml.so: undefined reference to 
`g_data_input_stream_read_byte'
../libgtkaml/.libs/libgtkaml.so: undefined reference to `g_file_new_for_path'
../libgtkaml/.libs/libgtkaml.so: undefined reference to `g_file_create'
collect2: ld returned 1 exit status
make[1]: *** [gtkamlc] Error 1
make[1]: Leaving directory `/home/mymas/gtkaml/src'
make: *** [all] Error 2

I try to latest gtkaml in ubuntu 11.04, 11.10.
But occur weired linker error.
http://osdir.com/ml/commits.gnome/2010-12/msg06863.html
g_data_input_stream_read_byte is supported since gio-1.0 > 2.28
Any related?

Sorry, I don't know why happened in this error.
Thanks.

Original issue reported on code.google.com by [email protected] on 3 Jan 2012 at 11:51

signals in interfaces are not detected

Gtk.Entry implements Gtk.Editable which has "changed" as signal.
Gtkaml does not recognize it, however.

Original issue reported on code.google.com by b100dian on 26 Aug 2009 at 8:53

gtkaml:name and gtkaml:namespace are used as fields

What steps will reproduce the problem?
gtkaml:name on the root tag generates the line 
this.name="ClassName"

What is the expected output? What do you see instead?
no this. fields should be initialized. The gtkaml prefix is only for metadata




Original issue reported on code.google.com by b100dian on 5 Feb 2008 at 2:14

primitives as fields/properties

What steps will reproduce the problem?
<VBox xmlns:class="http://gtkaml.org/" class:name="Panel" xmlns="Gtk"
xmlns:GLib="GLib" >
    <Label label='{"this is the panel "+title}' />
    <string class:public="title" />
</VBox>

The <string> tag is ignored.
Expected: the string is published as field/property
It is not added to the container (as it isn't a widget)


Original issue reported on code.google.com by b100dian on 5 Feb 2008 at 1:33

Don't include packaging scripts

Hello,
when doing my Debian packaging, I had to remove your debian/, since, sorry, it 
was not of Debian quality :)

I'd suggest to either remove debian/ from your SVN (since I'm going to maintain 
the packaging elsewhere [0]), or to only exclude it from generated tarballs.

If you prefer the latter, please remove debian/* from EXTRA_DIST (in 
./Makefile.am); that should do it.

Thank you,
David

[0]: http://git.debian.org/?p=collab-maint/gtkaml.git

Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 3:07

gtkaml -V attempts to execute a non-existent temporary file

The following command line fails with error code 127:

astralstorm@destiny /usr/src/gtkaml-read-only/examples/gtkon $ LANG=C gtkaml -V 
gtk-hello.gtkon --pkg gtk+-2.0; echo $?
/bin/sh: /tmp/gtk-hello.gtkon.C7L8LV: No such file or directory
127

Obviously the temporary file shouldn't be executed, as it isn't generated.

gtkaml trunk revision 744.

Original issue reported on code.google.com by [email protected] on 16 Nov 2010 at 11:29

existing vbox missing spacing

When marking a vbox as g:existing (such as in Dialog), the spacing
attribute is not taken into account (probably because constructor
parameters pick it)

Original issue reported on code.google.com by b100dian on 26 Aug 2009 at 8:57

Container.add instead of add_with_parameters

Currently when adding to a Container, or Bin, or other subclass that
doesn't have its own add functions listed in Gtk.implicits, the choice made
by gtkaml is to call add_with_properties ().

This has two downsides: it's not what it's meant, and second, it warns
about missing sentinels (code is incorrect too)

Original issue reported on code.google.com by b100dian on 3 Mar 2008 at 11:56

Literals don't work for unknown types, even if an {} expression is used

Even if gtkaml can't work out the type of an expression, if it's {} it
should still work.
e.g:

<AboutBox authors="{ new string[] {"abc", "def"} }"/>

should work even if we don't know the types of 'authors'

Original issue reported on code.google.com by b100dian on 8 Jun 2008 at 7:26

default argument values with explicit creation method/add method

when using for example 

<ImageMenuItem from-stock="true" stock-id="gkt-new" />

the defaulted argument accel-group (from Gtk.implicits) isn't found.
However, if you leave from-stock out, it works as expected

Original issue reported on code.google.com by b100dian on 3 Mar 2008 at 11:47

Invalid UTF-8 handling in gtkaml trunk

The following gtkon code and generated correct gtkaml code produce invalid vala.
(save in UTF-8 encoding)

GtkON:
Label label="Dane wejściowe";
Generated GtkAML:
<Label label='Dane wejściowe'>      </Label>
Resulting Vala code:
_label0 =  new Gtk.Label ("Dane wej\305\233ciowe");

Vala complains about the obviously invalid escape sequence - there should be no 
escaping at all, as the input is UTF-8.

Vala version: 0.11.2
Gtkaml version: trunk revision 744

Original issue reported on code.google.com by [email protected] on 16 Nov 2010 at 11:45

Segfault compiling gtkon examples

When i try to compile the gtkon examples it fails with a segfault, but the 
gtkaml generated code by gtkon doesnt fail.

Example:

examples/gtkon $ make
../../src/gtkamlc --pkg gtk+-2.0 --implicitsdir ../../data --save-temps 
gtk-hello.gtkon
make: *** [gtk-hello] Segmentation fault
exmples/gtkon $ ../../src/gtkamlc  --pkg gtk+-2.0 --implicitsdir ../../data 
--save-temps gtk-hello.gtkaml
exmples/gtkon $

Update gtkaml and vala repo version.
libxml2-2.7.8 version

Gdb's backtrace:
Program received signal SIGSEGV, Segmentation fault.
vala_collection_get_size (self=0x0) at collection.c:216
216             return VALA_COLLECTION_GET_CLASS (self)->get_size (self);
(gdb) bt
#0  vala_collection_get_size (self=0x0) at collection.c:216
#1  0x00007ffff68465b8 in vala_code_context_get () at valacodecontext.c:544
#2  0x00007ffff6842825 in vala_class_real_add_method (base=0x33c9b80, 
m=0x3507ca0) at valaclass.c:1316
#3  0x00007ffff68ed107 in vala_parser_parse_method_declaration (self=<value 
optimized out>, parent=0x33c9b80, attrs=<value optimized out>, 
error=0x7fffffffd7c8)
    at valaparser.c:15421
#4  0x00007ffff68f10b2 in vala_parser_parse_declaration (self=0x64f110, 
parent=0x33c9b80, root=0, error=0x7fffffffd868) at valaparser.c:13204
#5  0x00007ffff68f21d3 in vala_parser_parse_declarations (self=0x64f110, 
parent=0x33c9b80, root=0, error=0x7fffffffd908) at valaparser.c:13350
#6  0x00007ffff68f2cc5 in vala_parser_parse_class_declaration (self=0x64f110, 
parent=0x63c000, attrs=<value optimized out>, error=0x7fffffffd9d8) at 
valaparser.c:13931
#7  0x00007ffff68f0ec1 in vala_parser_parse_declaration (self=0x64f110, 
parent=0x63c000, root=<value optimized out>, error=0x7fffffffda78) at 
valaparser.c:13012
#8  0x00007ffff68f21d3 in vala_parser_parse_declarations (self=0x64f110, 
parent=0x63c000, root=1, error=0x7fffffffdaf8) at valaparser.c:13350
#9  0x00007ffff68f2740 in vala_parser_parse_file (self=0x64f110, 
source_file=<value optimized out>) at valaparser.c:3041
#10 0x0000000000411031 in gtkaml_parser_real_parse_gtkaml_file (self=0x64f110, 
gtkaml_source_file=0x644e60) at GtkamlParser.c:559
#11 0x00000000004114fd in gtkaml_parser_parse_gtkaml_file (self=0x64f110, 
gtkon_source_file=0x644e60) at GtkamlParser.c:598
#12 gtkaml_parser_parse_gtkon_file (self=0x64f110, gtkon_source_file=0x644e60) 
at GtkamlParser.c:418
#13 0x00007ffff68487a7 in vala_code_context_accept (self=0x6390a0, 
visitor=0x64f110) at valacodecontext.c:1120
#14 0x000000000040b907 in gtkaml_compiler_run (self=0x637000) at 
GtkamlCompiler.c:927
#15 0x000000000040d022 in gtkaml_compiler_main (argc=<value optimized out>, 
argv=<value optimized out>) at GtkamlCompiler.c:1672
#16 main (argc=<value optimized out>, argv=<value optimized out>) at 
GtkamlCompiler.c:1681

Original issue reported on code.google.com by [email protected] on 26 May 2011 at 12:12

Error reporting is ugly

Whenever there's an error reported, several warnings and null errors show up.
Just display the error and quit!

Original issue reported on code.google.com by b100dian on 7 Apr 2008 at 9:39

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.