Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Friends? Cousins? Half-siblings?
Re: Friends? Cousins? Half-siblings? [message #54995 is a reply to message #54992] Sun, 04 October 2020 09:50 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
jimlef wrote on Sun, 04 October 2020 07:06
I believe I overthink things too much - someone (several someones actually) told me that before...

My solution to this issue is to override the Open function for each affected table/class thus:
void InvoicesWindow::Open(Ctrl* owner)
{
	InvoicesArray.ReQuery();
	InvoicesArray.GoBegin();
	
	TopWindow::Open(owner);
}


That way I don't need to expose extra access, pass pointers etc...

I haven't found any issues with this yet... Rolling Eyes Thanks all!


Uh, not sure that is the best approach either, but it certailny works.

The reason why it is not the best approach is that generally we want widgets "decoupled" from the gui.

Why don't you just call that ReQuery before you open the window? Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: double click
Next Topic: sqlarray and sqlite
Goto Forum:
  


Current Time: Fri May 24 00:50:06 CEST 2024

Total time taken to generate the page: 0.02741 seconds