Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Multiple non Javascript-native instance variable declarations per-line don't work

#187

Cappuccino appears to have a problem with having instance variables declared in a class where the type is non Javascriopt-native and you specify multiple variable declarations per line. For example:


@implementation NavigationBar : CPView
{
    int _type, _fieldPadding;
    id  _backButton, _forwardButton;
}
.
.
.

will result in a 'backButton not defined' error the first time backButton is referenced at runtime. There are no problems accessing either type or fieldPadding, which are int's. It also doesn't appear to matter whether the offending variables are declared as 'id's or some other non Javascript-native type.

Changing this to:


@implementation NavigationBar : CPView
{
    int _type, _fieldPadding;
    id  _backButton;
    id _forwardButton;
}
.
.
.

alleviates the problem.

Reported by Tim Henrion · December 30th, 2008 @ 07:49 AM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Francisco Tolmasky
    Francisco Tolmasky

    This is actually due to us not supporting the comma notation for multiple declarations of the same time. It's surprising that any of them worked.

    December 30th, 2008 @ 12:32 PM

  2. admin (at 280north)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.