Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Mac OS X Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-08-2009, 10:32 AM   #1 (permalink)
1026 Development
 
Join Date: Jul 2008
Age: 23
Posts: 1,094
Jeremy1026 is on a distinguished road
Send a message via AIM to Jeremy1026
Default Grr!! Accessing function in another file

MainView.h

Code:
#import "GameView.h"

@interface MainScreen : NSView {
	
	GameView *gmView;
	
}
MainView.m

Code:
[gmView change];
GameView.m

Code:
- (void) change { Lala

What am I doing wrong. 'change' in GameView won't fire.

I also tried plopping
Code:
GameView *gmView = (GameView *)[NSApplication sharedApplication];
into MainView.m, and removing the line from MainView.h, same result, nothing happened.
Jeremy1026 is offline   Reply With Quote
Old 04-04-2009, 12:16 AM   #2 (permalink)
New Member
 
Join Date: Mar 2009
Location: Calgary, Alberta, Canada
Posts: 24
speasley is on a distinguished road
Default

I am having the same problem. No warnings. No errors.

From the called function, I tried:

Code:
NSLog ( @"The current date and time is: %@", [NSDate date] );
But nothing is happening. Anyone?

Last edited by speasley; 04-04-2009 at 12:56 AM.
speasley is offline   Reply With Quote
Old 04-04-2009, 07:36 AM   #3 (permalink)
Former NeXTStep Developer
 
Join Date: Mar 2009
Posts: 997
FlyingDiver will become famous soon enough
Default

Where are you allocating gmView, and in what method is the [gmView change] call?

joe
FlyingDiver is offline   Reply With Quote
Old 04-04-2009, 01:15 PM   #4 (permalink)
New Member
 
Join Date: Mar 2009
Location: Calgary, Alberta, Canada
Posts: 24
speasley is on a distinguished road
Default

Are you instantiating gmView before trying to access it? That is what I missed in mine.

In your MainView.m, try:

Code:
gmView = [[GameView alloc] init];
[gmView change];
speasley is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 468
14 members and 454 guests
alexeir, David-T, Dj_kades, foslock, iAppDeveloper, jeroenkeij, LunarMoon, Mijator, myach, pipposanta, QuantumDoja, robsmy, sacha1996, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,129
Posts: 402,928
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:25 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0