Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7530593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:57:11+00:00 2026-05-30T04:57:11+00:00

I have a fairly simple method in a class in a separate file, which

  • 0

I have a fairly simple method in a class in a separate file, which takes in an integer, looks it up in a case select, and returns an NSURL pointer that corresponds to it. It has this method:

#import <Foundation/Foundation.h>

@interface ChangeCurrentScene : NSObject
{
    NSString *filePath;
    NSURL *url;
    int currentScene;
}

- (NSURL *)changeSceneURL:(int)toDesiredScene;

@end

I’m not 100% sure how I’m supposed to call it from outside, but I have a button hooked up in my storyboard, which definitely works, and I’m using this line to call it:

 nextURL = [sceneChanger changeSceneURL:1];

From this header file:

@interface MSViewController : UIViewController <AVAudioPlayerDelegate> {

    BOOL userInputAvailable;
    int currentScene;
    NSURL *nextURL;
    ChangeCurrentScene *sceneChanger;

}

@property (strong) AVAudioPlayer *menuPlayer;
@property (strong, nonatomic) IBOutlet UILabel *userChoiceLabel;
@property (strong, nonatomic) IBOutlet UIImageView *nowPlayingIcon;


- (BOOL) playScene : (NSURL *)fileToBePlayed;

@end

I’ve put a breakpoint on the first line of the changeSceneURL:toDesiredScene class, but it is not called at all. No crashes, but no calls either. First off, is this the correct way to use the return from a called method? nextURL is an NSURL object, and I want the returned value to be stored in it. Secondly, what reason would there be for the method not being called at all? I’m really stumped here, but I’m sure it’s something blindingly simple.

Thanks, in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:57:13+00:00Added an answer on May 30, 2026 at 4:57 am

    Chech that sceneChanger is not nil. You can send messages to nil, but the method doesn’t get called.

    Edit You should initialize sceneChanger somewhere like this:

    sceneChanger = [[ChangeCurrentScene alloc] init];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a fairly simple lazy loading proxy class, which I have documented
I have a fairly simple class that looks like this: class Person { public:
I am looking for a fairly simple image comparison method in AS3. I have
I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and
I have a fairly simple set of functionality for which I have multiple implementations,
I have a fairly simple application which downloads files in a thread. This thread
I have some fairly simple code using Protobuf.net, which is throwing a very odd
I have a fairly simple const struct in some C code that simply holds
I have a fairly simple addition to the HTTP standard. An ambitious goal I
I have a fairly simple sync problem. I have a table with about 10

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.