ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-gtk-dev
php-gtk-dev
Re: [PHP-GTK-DEV] php_gtk_parse_args problems
by Steph Fox other posts by this author
Mar 13 2007 12:59PM messages near this date
[PHP-GTK-DEV] php_gtk_parse_args problems | Re: [PHP-GTK-DEV] php_gtk_parse_args problems
Hi Arx,

You'll find everything you need in main/php_gtk_util.c (parse_arg_impl()).

"u" refers to UTF-8 encoding - you need to have a copy there to free as 
necessary following encoding. See the overrides for 
gtk_button_new_from_stock. That said, the error message implies that you 
haven't set up your enums properly somehow, but you haven't shown us any 
code that would explain why.

- Steph

----- Original Message ----- 
From: "Arx Cruz" <arxcruz@[...].com> 
To: <php-gtk-dev@[...].net> 
Sent: Tuesday, March 13, 2007 7:25 PM
Subject: [PHP-GTK-DEV] php_gtk_parse_args problems


>  Hello all,
> 
>  First all, this is my first post here, and sorry my english.
> 
>  I've trying to make a binding of VteTerminal to php-gtk2.
> 
>  Untill now things works pretty good, i could be able to create
>  vte.defs config.m4, Makefile.frag, i'm able to generate gen_vte.c.
>  But...
>  some methods couldnt be parsed to gen_vte.c and i must make it myself
>  with vte.overrides.
> 
>  vte_terminal_fork_command is the method i want to override, since
>  parse dont work.
> 
>  the sign of this method is:
> 
>  pid_t       vte_terminal_fork_command       (VteTerminal *terminal,
>                                             const char *command,
>                                             char **argv,
>                                             char **envv,
>                                             const char *directory,
>                                             gboolean lastlog,
>                                             gboolean utmp,
>                                             gboolean wtmp);
> 
>  so i put in vte.overrides this code:
> 
>  override vte_terminal_fork_command
>  PHP_METHOD
>  {
>     const char *directory, *command;
>     if(!php_gtk_parse_args(ZEND_NUM_ARGS(), "uu", &command, &directory)) {
>          return;
>     }
> 
>     vte_terminal_fork_command(VTE_TERMINAL(PHPG_OBJECT(this_ptr)),
>  (const char*)command, NULL, g_listenf(), (const char*)directory,
>  FALSE, FALSE, FALSE);
>  }
> 
>  all compile fine, but when i try to use
>  VteTerminal->fork_command("directory", "command");
>  I got a error like this:
> 
>  phpg_register_enum: assertion `g_type_is_a(gtype, ((GType) ((12) <<
>  (2))))´ failed
>  then a segment fault.
> 
>  I wonder how workis this php_gtk_parse_args (what's mean uu, s, a and
>  so on) if someone could help me, i'll be thankfull and php-gtk will
>  will a new binding :)
> 
>  Cheers!
> 
>  Arx Cruz
> 
> 
> 
>  -- 
>  "A fé remove montanhas, mas eu prefiro a dinamite"
>  

-- 
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Arx Cruz
Steph Fox
Arx Cruz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved