• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Warning when using NSSplitView (multiple declerations for method 'isVertical')
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning when using NSSplitView (multiple declerations for method 'isVertical')


  • Subject: Re: Warning when using NSSplitView (multiple declerations for method 'isVertical')
  • From: Nicholas Francis <email@hidden>
  • Date: Sun, 4 Jan 2004 11:59:47 +0100

The reason is probably that isVertical is defined with different return types for sliders and split views in the AppKit.

To work around it, either:
A) change your declaration of splitview in your header file from id splitView; to NSSplitView *splitView,
or B) change the if statement to read if([(NSSplitView*)splitView isVertical] == YES)

Both have the same effect.

You call to adjustSubviews is indeed correct (I would imagine that setVertical: does it for you, though)

cheers,
Nicholas Francis

On Jan 4, 2004, at 2:18 AM, Oli Donald wrote:

Hi,
This is probably really simple...
I'm writing a small app that uses a split view, and the user can toggle between horizontal and vertical splits. It works ok, but I get a warning from the compiler when I use the 'isVertical' method. Here is the code for the entire app so far:

- (IBAction)changeViewSplit:(id)sender
{
if([splitView isVertical] == YES)
{
[splitView setVertical:NO];
[splitMenuOption setTitle:@"Split View Vertically"];
}
else
{
[splitView setVertical:YES];
[splitMenuOption setTitle:@"Split View Horizontally"];
}

[splitView adjustSubviews];
}

I get three warnings
multiple declerations for method 'isVertical'
using '-(BOOL)isVertical'
also found '-(int)isVertical'

I've made sure I haven't defined any methods or instance variables with the same name. The app works fine, but its annoying having these warnings floating around! Also, is the [splitView adjustSubviews] call correct?

Cheers,
Oli
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Warning when using NSSplitView (multiple declerations for method 'isVertical') (From: Oli Donald <email@hidden>)

  • Prev by Date: NSPopUpButton trouble
  • Next by Date: Installing multiple hotkeys in app
  • Previous by thread: Warning when using NSSplitView (multiple declerations for method 'isVertical')
  • Next by thread: Re: Warning when using NSSplitView
  • Index(es):
    • Date
    • Thread