Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Works flawlessly
- for (int i = 0; i < Root.Count; ++i)
- {
- Console.WriteLine("Begin SectionLoop");
- for (int j = 0; j < Root[i].Count; ++j)
- {
- Console.WriteLine("Element: " + Root[i][j]);
- if (typeof(EntryElement) == Root[i][j].GetType())
- {
- if (((EntryElement)Root[i][j]).Entry != null && ((EntryElement)Root[i][j]).Entry.IsFirstResponder)
- {
- ((EntryElement)Root[i][j]).Entry.ResignFirstResponder();
- }
- }
- }
- Console.WriteLine("End SectionLoop");
- }
- // Does not even output "Begin SectionLoop", but dies with a SIGSEGV
- foreach (Section section in Root)
- {
- Console.WriteLine("Begin SectionLoop");
- foreach (Element entryElement in section)
- {
- Console.WriteLine("Element: " + entryElement);
- if (typeof(EntryElement) == entryElement.GetType())
- {
- if (((EntryElement)entryElement).Entry != null && ((EntryElement)entryElement).Entry.IsFirstResponder)
- {
- ((EntryElement)entryElement).Entry.ResignFirstResponder();
- }
- }
- }
- Console.WriteLine("End SectionLoop");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement