FROM : JArod Wen
DATE : Tue Jul 01 20:48:15 2008
I need to make some clearance on this problem: the biggest issue is
that MovieDocument is instantiated by IB, since it is the FileOwner of
the MovieDocument.nib. So the problem should be: is there a way to
access a class from a method of another class when the
first class is instantiated from a NIB file.
I am now trying to set an IBOutlet in the other classes for
MovieDocument. It is the only way I can find from my brain... Frankly
say, I am a real newbie...
sorry for any confusion... If there were any repeated posts, please
forgive me...
On Jul 1, 2008, at 12:35 PM, <email_removed> wrote:
> Message: 8
> Date: Tue, 1 Jul 2008 12:05:43 -0400
> From: JArod Wen <<email_removed>>
> Subject: How to make the FileOwner of a nib file accessible globally
> in whole project
> To: <email_removed>
> Message-ID: <<email_removed>>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Hi Jedis,
>
> Here is my problem: my application now have a main nib file
> MovieDocument.nib with its FileOwner MovieDocument.mm(We used
> AVCVideoServices which requires to be in a c++ source file). I need to
> send messages to the methods in MovieDocument.mm from other classes in
> the project(I have many other windows and also corresponding
> controllers), so i need a way to access the movieDocument globally.
>
> One example: there is another controller VideoController.m which
> contains some measurement methods on the movie loaded in
> movieDocument. Once we finish the measurement in VideoController, we
> need to update the movie in MovieDocument, where we need to send
> message to the methods in MovieDocument.
>
> This is from VideoController.m
>
> - (void)writeMeasureOutput:(MeasureView *)sender
> {
> // Some measurement code here...
>
> object = [[movieDocument measureView] whatsNext];
>
> NSLog(@"Next measurement: %@",object);
>
> }
>
> Such calls should be used in many other controllers in the projects.
> So the instant of MovieDocument should be accessed globally.
>
> I have tried to instantiate MovieDocument in MovieDocument.h, but it
> is clearly wrong since when the header file is imported, the instant
> will be created once.
>
> So any suggestion on this problem? Thanks in advance!
>
> ---------------
> JArod Wen
---------------
JArod Wen
DATE : Tue Jul 01 20:48:15 2008
I need to make some clearance on this problem: the biggest issue is
that MovieDocument is instantiated by IB, since it is the FileOwner of
the MovieDocument.nib. So the problem should be: is there a way to
access a class from a method of another class when the
first class is instantiated from a NIB file.
I am now trying to set an IBOutlet in the other classes for
MovieDocument. It is the only way I can find from my brain... Frankly
say, I am a real newbie...
sorry for any confusion... If there were any repeated posts, please
forgive me...
On Jul 1, 2008, at 12:35 PM, <email_removed> wrote:
> Message: 8
> Date: Tue, 1 Jul 2008 12:05:43 -0400
> From: JArod Wen <<email_removed>>
> Subject: How to make the FileOwner of a nib file accessible globally
> in whole project
> To: <email_removed>
> Message-ID: <<email_removed>>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Hi Jedis,
>
> Here is my problem: my application now have a main nib file
> MovieDocument.nib with its FileOwner MovieDocument.mm(We used
> AVCVideoServices which requires to be in a c++ source file). I need to
> send messages to the methods in MovieDocument.mm from other classes in
> the project(I have many other windows and also corresponding
> controllers), so i need a way to access the movieDocument globally.
>
> One example: there is another controller VideoController.m which
> contains some measurement methods on the movie loaded in
> movieDocument. Once we finish the measurement in VideoController, we
> need to update the movie in MovieDocument, where we need to send
> message to the methods in MovieDocument.
>
> This is from VideoController.m
>
> - (void)writeMeasureOutput:(MeasureView *)sender
> {
> // Some measurement code here...
>
> object = [[movieDocument measureView] whatsNext];
>
> NSLog(@"Next measurement: %@",object);
>
> }
>
> Such calls should be used in many other controllers in the projects.
> So the instant of MovieDocument should be accessed globally.
>
> I have tried to instantiate MovieDocument in MovieDocument.h, but it
> is clearly wrong since when the header file is imported, the instant
> will be created once.
>
> So any suggestion on this problem? Thanks in advance!
>
> ---------------
> JArod Wen
---------------
JArod Wen
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

