Re: Array
| From: | Barry Mitchelson | Date: | Mon, 12 Mar 2001 13:29:00 +0000 |
| Subject: | Re: Array | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-696@lists.php.net to get a copy of this message | ||
On Mon, Mar 12, 2001 at 10:19:45AM -0300, Alexander Benatti wrote:
> How can i convert this array to PHP?
>
> my @menu_items = ( { path => '/_File',
> type => '<Branch>' },
> { path => '/File/_New',
> accelerator => '<control>N',
> callback => \&print_hello },
> { path => '/File/_Open',
> accelerator => '<control>O',
> callback => \&print_hello },
> { path => '/File/_Save',
> accelerator => '<control>S',
> callback => \&print_hello },
> { path => '/File/Save _As' },
> { path => '/File/sep1',
> type => '<Separator>' },
> { path => '/File/Quit',
> callback => sub { Gtk->exit( 0 ); } },
>
> { path => '/_Options',
> type => '<Branch>' },
> { path => '/Options/Test' },
>
> { path => '/_Help',
> type => '<LastBranch>' },
> { path => '/_Help/About' } );
>
is this for use with an ItemFactory menu ?
if so, then use :
$menu_items = array(
array("/_File","",NULL,0,"<Branch>"),
array("/File/_New","<control>N",print_hello,0,""),
array("/File/_Open","<control>O",print_hello,0,"")
);
etc...
HTH
barry
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
http://www.theshining.org