[haiku-development] Question about saving list of objects.

  • From: fredrik@xxxxxxxxx
  • To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 28 Mar 2021 17:19:36 +0200

Hi 

In bluetooth pref we have a settings file, saving these values. 

struct {
bdaddr_t PickedDevice;
DeviceClass LocalDeviceClass;
} Data; 

I was thinking of adding found devices like so. 

struct {
bdaddr_t PickedDevice;
DeviceClass LocalDeviceClass;
BList Devices
} Data; 

Now this don't work (when closing the app it crashes), tried to add
Devices.BList(), didn't work ether. 

So any suggestions on how to store objects in a list, without rewriting
BluetoothSettings.. 

//Fredrik

Other related posts: