>Using CodeMine version 6.1.19, I'm trying (and apparently failing) to disable the Toolbar Delete button in certain circumstances. I understand how to create new states, my question is, how can I obtain an object reference to the Toolbar Delete button to use in the RequestRefresh method? Any help anyone can offer would be greatly appreciated.
Gary,
This might not be what you’re looking for, but in situations like this (for example, not data bound controls, ActiveX controls etc.), I had to trigger the refresh manually. This is what I did:
Whenever a state is changed, that isn’t picked up by Codemine, I call my own RefreshAll method which looks like this:
IF NOT ISNULL(THISFORM.oStatemanager)
THISFORM.SetChanged()
THISFORM.oStatemanager.RefreshAll('Form')
ENDIF
(I don’t run the form’s RefreshAll method, because this method also includes the native Refresh method, and I don’t want this.)
Then, in the IsEnabled method of the form, I have code that check for other conditions than Method/cWorkArea and return .T./.F. based on this instead.
This works fine for me, but I wouldn’t be surprised if there are better ways of doing it.
Jens Erik