TOPIC: Saving access from outside accesscontrol
#1451
Saving access from outside accesscontrol 11 Months, 4 Weeks ago
I am try to make dialog OK button save result of accesscontrol that is part of dialog, but get error:
recordcontrol.Handlefocus uninitialized member:#window. Seems can only save record from buttons in accesscontrol not from outside. what is missing?
 
 
#1457
Re:Saving access from outside accesscontrol 11 Months, 3 Weeks ago
You should be able to save the AccessControl from outside the control using its Save method. Usually that kind of error happens when you have a reference to a control that is already destroyed and you try to access it. If you wanted to post the code for what you are trying to do someone could probably help you figure out the problem.
 
 
Jeff Ferguson
Suneido Software
 
#1458
Re:Saving access from outside accesscontrol 11 Months, 3 Weeks ago
Think you are right, in tabscontol nonactive page is destroyed then? think i should use constructall:true, no error anymore now. Thank you :laugh:
 
 
#1459
Re:Saving access from outside accesscontrol 11 Months, 3 Weeks ago
By default TabsControl only constructs a tab's control when the tab is selected. You could also use the TabsControl Select method to make sure the tab is constructed before you access it, but then you need to Select the original tab the user was on again and it can cause the screen to flicker. There is a new TabsControl method called ConstructAndSetTab that will construct the tab without the screen flicker (doesn't actually select the tab), but I don't know if it is available in the release version yet. The constructall option is fine if you don't have a lot of tabs and resources aren't an issue.
 
 
Jeff Ferguson
Suneido Software