Compatibility: Version: 6.7.x and 6.8.x
The command "Last Object" returns a pointer to the last enterable object. This is quite useful if you want to implement a button which will populate the last enterable object the cursor was in with data when clicked. (field, variable, etc.)
You should be able to do this:
The problem with this under Windows, is that Windows buttons by default are enterable objects; Hence, instead of returning the field or variable object, "Last Object" returns a pointer to the button.
A quick fix to this is simply to create the pointer yourself. In the object method for the field, create a pointer to the object:
In the object method for the button, use the pointer created:
Note: make sure you enable the "on getting focus" event for the field object.