On Thursday 27 January 2005 14:47, Michael Gale wrote:

>  I am trying to start a small php ncurses app but the documenatation is
> not helping.

OK, I've never used the ncurse functions before, but cursory glance at the 
manual results in the following observations:

> What does the following mean:
>
> PHP Warning:  Call-time pass-by-reference has been deprecated - argument
> passed by value;  If you would like to pass it by reference, modify the
> declaration of ncurses_getmaxyx().  If you would like to enable
> call-time pass-by-reference, you can set allow_call_time_pass_reference
> to true in your INI file.  However, future versions may not support this
> any longer.  in /home/michael/gsmenu/gsmenu on line 10
>
>
> Here is my code:
>
> #!/usr/local/bin/php
> <?php
>
> $y=0;
> $x=0;
>
>
> $ncurses_session = ncurses_init();
> $main = ncurses_newwin(0,0,0,0);

OK, you've created a zero-sized window.

> ncurses_getmaxyx (&$main,$y,$x );

It is $y & $x that ought to be passed by reference, why are you using &$main? 
In any case as the above error message says you should be simply doing:

  ncurses_getmaxyx ($main, $y, $x);

> ncurses_border(1,1,1,1, 1,1,1,1);

You've specified not to draw any borders around your zero-sized window.

> ncurses_wrefresh($main);
> ncurses_end();
>
> ?>
>
> If I remove the "&" from main nothing happens at all,

So what did you expect to see?

> the php 
> documentation says that the variables should be passed from reference.

That bit of the documentation could be made clearer. It should probably say 
something along the lines of "... the variables *will* be passed by 
reference ...". I'm assuming that the function definition has defined $y & $x 
to be passed by reference.

> Any help would be appreciated.

I suggest you start by giving some dimensions to your window and possibly some 
borders as well.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to