objective c - Can't call my #define variable -
i started playing #define
option, defined variables in global.h
file.
#define golfer_data_name @"name" #define golfer_data_union @"union" #define golfer_data_gender @"gender" #define golfer_data_junior @"junior" #define golfer_data_memno @"memno" #define golfer_data_searchmode @"searchmode" #define golfer_data_email @"e-mail"
but can't access golfer_data_name
or golfer_data_union
anywhere in code. i'm sure missed what? appreciated.
if you're importing file in pre-compiled header file (.pch
), shouldn't need re-import in other file in project (though doesn't hurt, , may future readability).
presuming xcode, when create new file in project, may not quite sync rest of project immediately. fix this, can try saving file (cmd+s), cleaning project (cmd+shift+k), or building project (cmd+b). after this, imports should working fine.
this similar when you've created new file , can't import or can't link interface builder. quick cmd+s save fixes problem me.
Comments
Post a Comment