rookie problem: problem with LNew function 
Author Message
 rookie problem: problem with LNew function

void ListHandleFunction ( WindowPtr *myWindow )
{
   Rect myRect;
   Rect myDataBoundsRect;
   Point myCellSize;
   Handle MyList;

   SetRect ( &myRect, 100, 200, 300, 400 );
   SetRect ( &myDataBoundsRect, 0, 0, 0, 0 );
   SetPt ( &myCellSize, 0, 0 );
   myRect.right = myRect.right - kScrollBarWidth;

   MyList = LNew ( &myRect, &myDataBoundsRect, myCellSize, 0, &myWindow,
kDoDraw, kNoGrow, !kIncludeScrollBar, kIncludeScrollBar );

Quote:
}

when i try to compile this program, i get the following error
"argument #5 to function 'LNew' does not match prototype "

argument five is a pointer to the window in which to install the list.
what is wrong??



Sun, 20 Jun 1999 03:00:00 GMT  
 rookie problem: problem with LNew function

Quote:

>void ListHandleFunction ( WindowPtr *myWindow )
>{
>   Rect myRect;
>   Rect myDataBoundsRect;
>   Point myCellSize;
>   Handle MyList;

>   SetRect ( &myRect, 100, 200, 300, 400 );
>   SetRect ( &myDataBoundsRect, 0, 0, 0, 0 );
>   SetPt ( &myCellSize, 0, 0 );
>   myRect.right = myRect.right - kScrollBarWidth;

>   MyList = LNew ( &myRect, &myDataBoundsRect, myCellSize, 0, &myWindow,
>kDoDraw, kNoGrow, !kIncludeScrollBar, kIncludeScrollBar );
>}

>when i try to compile this program, i get the following error
>"argument #5 to function 'LNew' does not match prototype "

>argument five is a pointer to the window in which to install the list.
>what is wrong??

argument 5 is a pointer to a pointer to a pointer.  Remove the & in front of
myWindow.

Jim Dalsimer



Mon, 21 Jun 1999 03:00:00 GMT  
 rookie problem: problem with LNew function

Quote:

> void ListHandleFunction ( WindowPtr *myWindow )
> {
>    Rect myRect;
>    Rect myDataBoundsRect;
>    Point myCellSize;
>    Handle MyList;

>    SetRect ( &myRect, 100, 200, 300, 400 );
>    SetRect ( &myDataBoundsRect, 0, 0, 0, 0 );
>    SetPt ( &myCellSize, 0, 0 );
>    myRect.right = myRect.right - kScrollBarWidth;

>    MyList = LNew ( &myRect, &myDataBoundsRect, myCellSize, 0, &myWindow,
> kDoDraw, kNoGrow, !kIncludeScrollBar, kIncludeScrollBar );
> }

> when i try to compile this program, i get the following error
> "argument #5 to function 'LNew' does not match prototype "

> argument five is a pointer to the window in which to install the list.
> what is wrong??

Hard to say without seeng the prototype. I would guess that you
don't need the '&', as myWindow is already defined as type
(WindowPtr*)

As I say though, we really need to see the prototype....

--

<\___/>
/ O O \
\_____/  FTB.



Mon, 21 Jun 1999 03:00:00 GMT  
 rookie problem: problem with LNew function


Quote:

>void ListHandleFunction ( WindowPtr *myWindow )
>{
>   Rect myRect;
>   Rect myDataBoundsRect;
>   Point myCellSize;
>   Handle MyList;

>   SetRect ( &myRect, 100, 200, 300, 400 );
>   SetRect ( &myDataBoundsRect, 0, 0, 0, 0 );
>   SetPt ( &myCellSize, 0, 0 );
>   myRect.right = myRect.right - kScrollBarWidth;

>   MyList = LNew ( &myRect, &myDataBoundsRect, myCellSize, 0, &myWindow,
>kDoDraw, kNoGrow, !kIncludeScrollBar, kIncludeScrollBar );
>}

>when i try to compile this program, i get the following error
>"argument #5 to function 'LNew' does not match prototype "

>argument five is a pointer to the window in which to install the list.
>what is wrong??

Not that this has anything to do with comp.lang.c, but myWindow is
already a pointer (declared WindowPtr *myWindow) so the fifth
argument should be myWindow, not &myWindow


Mon, 21 Jun 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Rookie at VC++ - linking problem

2. CGI Problem???? (Rookie)

3. rookie's got some problems with vc and #include

4. rookie's got some problems with vc and #include

5. Rookie EVC question - exporting functions

6. One Problem in Calling Static function from Non static function

7. Problem assigning function to function pointer

8. C++ function pointers versus C function pointer problem

9. strange problem occur while trying to access member function through static function

10. DLL function calling problems (explicit - only knowing function name at runtime)

11. problems problems problems

12. Problems, problems, problems!

 

 
Powered by phpBB® Forum Software