[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error on ActiveGraph class application
From: |
Frank Lin |
Subject: |
Re: Error on ActiveGraph class application |
Date: |
Wed, 8 May 1996 09:42:23 -0500 (CDT) |
HI, Manor,
Thanks for your hints. I have fixed it according to your correction.
Frank
>
> Hi Frank,
>
> In Objective-C declaring a variable to be of a particular class does not
> automatically generate an instance of that class in the variable. In other
> words the variable is initialized to nil.
>
> Therefore in your code, is initialized to nil.
>
> --------
> BLTGraph *mflowGraph;
> GraphElement *materialElement;
> ActiveGraph *mflowGrapher;
>
> StatusM *statusM;
>
> And therefore the statement:
>
> [mflowGrapher setDataFeed: statusM];
>
> is setting the DataFeed on mflowGrapher to nil. The grapher therefore
> complains since it does not have a valid feed object.
>
> You would therefore need to create the object statusM before giving it
> as a dataFeed to the grapher by (for example) inserting the statement:
>
> statusM = [StatusM create: globalZone] ;
>
> between the declaration of statusM and its use...
>
> Regards,
>
> Manor.
>