I just can not figure this out :
print(module)
print(Globals.sharedInstance.dataModuleName)
let kind:NSString = module[Globals.sharedInstance.dataModuleName] as! NSString
Will print this, and then crash for strange reason :
( //dic print
{
meta = no;
module = IN;
subject = LT;
variable = A2;
}
)
module // print the right field we are looking for inside the dictionary .
fatal error: unexpectedly found nil while unwrapping an Optional value
But you can see that module is valid dictionary and also dataModuleName .
Crashing on the line let kind . whats wrong with it ?
