Re: GtkSheetRange constructor problems
| From: | Andrei Zmievski | Date: | Fri, 14 Jan 2005 18:20:12 +0000 |
| Subject: | Re: GtkSheetRange constructor problems | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-879@lists.php.net to get a copy of this message | ||
Please try the attached patch.
On Fri, 14 Jan 2005, Ivan Rodriguez wrote:
> Hi Steph
>
> I try to do what you say, I include:
>
> #define GTKSHEET_RANGE GTK_SHEETRANGE
>
> In the header of extra.overrides but not work :-(
>
> The problem is in the struct generation, I don't know why the generator
> no creates gtksheetrange function, all objects has two constructor
> functionsm the first GtkWindow for example and the second gtkwindow,
> there are two functions but the second has lower letters, and in the
> GtkSheetrange no :-(. In this case, the generator don't generate the
> second function and this is the error, the generator generates
> gtksheet_range function and I don't know why, I read the code of
> generator and If I changed something like '_' in the structs generation
> the C code crash, the problem is this, why generator generate
> gtksheet_range function?
>
>
> this code is the responsable :-(
>
> /* write the initializer */
> fwrite($fp, sprintf($struct_init_tpl,
> $struct_module . '_' . $struct_lname,
> $struct->in_module . $struct->name,
> $struct->ce, implode('', $init_prop_code)));
>
> /* write getter */
> fwrite($fp, sprintf($struct_get_tpl,
> $struct_module . '_' . $struct_lname,
> $struct->in_module . $struct->name,
> $struct->ce, implode('', $get_prop_code)));
>
> /* write the constructor */
> fwrite($fp, sprintf($struct_construct_tpl,
> strtolower($struct->c_name),
> $var_list->to_string(),
> $specs,
> implode(', ', $parse_list),
> implode('', $construct_prop_code)));
> $functions_decl = sprintf($functions_decl_tpl, $struct_module . '_' .
> $struct_lname);
> $functions_decl .= sprintf($function_entry_tpl,
> $struct->in_module . $struct->name,
> strtolower($struct->c_name),
> 'NULL');
> $functions_decl .= sprintf($function_entry_tpl,
> $struct_module . $struct_lname,
> strtolower($struct->c_name),
> 'NULL');
> $functions_decl .= $this->functions_decl_end;
>
> Any sugestion?
> --
> Ivan Rodriguez <epplestun@gmail.com>
- Andrei
Index: generator/generator.php =================================================================== RCS file: /repository/php-gtk/generator/generator.php,v retrieving revision 1.43.2.1 diff -u -p -r1.43.2.1 generator.php --- generator/generator.php 7 Aug 2004 06:49:35 -0000 1.43.2.1 +++ generator/generator.php 14 Jan 2005 18:19:52 -0000 @@ -460,7 +460,7 @@ class Generator { strtolower($struct->c_name), 'NULL'); $functions_decl .= sprintf($function_entry_tpl, - $struct_module . $struct_lname, + strtolower($struct->in_module . $struct->name), strtolower($struct->c_name), 'NULL'); $functions_decl .= $this->functions_decl_end;
Index: generator/generator.php =================================================================== RCS file: /repository/php-gtk/generator/generator.php,v retrieving revision 1.43.2.1 diff -u -p -r1.43.2.1 generator.php --- generator/generator.php 7 Aug 2004 06:49:35 -0000 1.43.2.1 +++ generator/generator.php 14 Jan 2005 18:19:52 -0000 @@ -460,7 +460,7 @@ class Generator { strtolower($struct->c_name), 'NULL'); $functions_decl .= sprintf($function_entry_tpl, - $struct_module . $struct_lname, + strtolower($struct->in_module . $struct->name), strtolower($struct->c_name), 'NULL'); $functions_decl .= $this->functions_decl_end;