Bug 12943 - Dialog search all sections lose reference to their parent root element
Summary: Dialog search all sections lose reference to their parent root element
Alias: None
Product: iOS
Classification: Xamarin
Component: MonoTouch.Dialog ()
Version: 6.9.3.x
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2013-06-28 15:26 UTC by stremblay
Modified: 2018-04-12 01:38 UTC (History)
3 users (show)

Is this bug a regression?: No
Last known good build:

Suggested change (971 bytes, text/plain)
2013-07-02 12:25 UTC, stremblay

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description stremblay 2013-06-28 15:26:54 UTC
In the PerformFilter method in the DialogViewController Class. sections are added to a list if their elements are matches to the searched text. But instead of using the RootElement Add method, the list of sections just overwrites the internal Sections list. Since the Add method is not called, then the Parent property on the Sections is not set. So all my sections in the root have a null Parent property value after I type a character into the search bar.

I would suggest changing the following line in the PerformFilter method.

this.Root.Sections = lists;



or something along those lines.
Comment 1 stremblay 2013-07-02 12:25:34 UTC
Created attachment 4257 [details]
Suggested change

this is the suggested change to the performfilter method in the dialogviewcontroller class
Comment 2 Alex Soto [MSFT] 2018-04-12 01:38:01 UTC

I have tested this change and ends up crashing anytime you use the search bar. That said, I do not fully understand why this is needed, I have tested some samples using the search bar including the one here https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/Sample/DemoIndex.cs and works fine without said change.

I know way some time has passed but if you are still interested in having this done, could you provide an scenario where this is needed? and if you do could you file said test case here instead? https://github.com/migueldeicaza/MonoTouch.Dialog/issues we are now tracking all MT.D issues there.