I have a custom “brain” class that has a custom “recipe” object as one of it’s properties.
The recipe class has four “ingredient” objects as properties.
If I try and do:
brain.myRecipe.ingredient1 = myIngredient;
self.displayLabel.text = brain.myRecipe.ingredient1.ingredientName;
The label is blank (although I get no errors)
but if I do
Ingredient * temp = myIngredient;
self.displayLabel.text = temp.ingredientName;
That one works… Are you not able to drill down through properties like that with the dot operator?
Thanks!
Yes, you can do that with the dot operator. Most likely one of those properties is nil.