Author Topic: Strange behavor with updating listview  (Read 7055 times)

TheodorosGR

  • Guest
Strange behavor with updating listview
« on: February 19, 2009, 02:19:54 PM »
Ok,i have figure out what went wrong with my application(based on WCLDEMO).
I will explain:
When i was plug-out my Bluetooth adapter and plug-in it again,the first scan was not showing anything(no devices found and populated in lvdevices,from the WCLDEMO-6.0).The next scans were ok.
This was happening because i had removed the line
Code: [Select]
MessageBox.Show("Async discovery complete success on radio " + Adr, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
So everytime i was starting the application for the first time,no devices were populating,until the 2nd,3rd and so on scans.
The problem was solved by inserting the above line again.But i cant understand why this is happening.Does the messagebox right before
Code: [Select]
lvDevices.BeginUpdate(); was making the lvdevices to populate?
Any solution or ideas on how to make it work without the messagebox.
PS:kind of hard to understand what i am saying but hope i have explained well.


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Strange behavor with updating listview
« Reply #1 on: February 19, 2009, 02:45:34 PM »
I think it is because OnDiscoveryStarted even clears list view after Message box.

P.S. WCL .Net Lite 6.5 is availbale. It is native .NET version without any OCX/COM written on managed C++ (C++/CLR). Source cde is available as well. Mey be you should take a look on it? :)

TheodorosGR

  • Guest
Re: Strange behavor with updating listview
« Reply #2 on: February 19, 2009, 03:15:12 PM »
Thanks for the solution!
About the new version,ofc i  have looked at it and for sure i will buy it!But first i need to release a new version of my application and later i will migrate to the new library.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Strange behavor with updating listview
« Reply #3 on: February 19, 2009, 03:19:55 PM »
Of course :) Thank you for your interest

 

Sitemap 1 2 3 4 5 6 7