Didn't I say it right at the top that all three forms are modeless? Otherwise why would I have a problem detecting when form is no longer here? <g>
Though even in modal case I still need to figure out the idea to update the information. Perhaps I need to pass the cursor (as XML) back and forth.
>>Hi everybody,
>>
>>I have the following three forms:
>>
>>Search Criteria ->Search Results -> Tickets
>>
>>All forms are non-modal, so you can have multiple Tickets form opened at the same time.
>>
>>The select happens in Search Criteria form and the Search Results form just simply showing the results and it only has code in its SelectRecord method.
>>
>>Now, I didn't program this functionality (perhaps found that difficult at the moment), which seems to be a requirement - if the user changed something in Tickets form, the grid should display the changed information.
>>
>>We're done this in MereMortals framework using subject/observer mechanism, but there is no framework here, so I have to invent something myself.
>>
>>First of all, I'm thinking, that even if the record now doesn't satisfy the original search criteria I still would want to show it, just show the right information (say, see a resolution date if the problem is resolved).
>>
>>So, I just want to discuss some ideas. One problem is how would I know that my modeless form finished execution in the following code:
>>
>>* Invoke Tickets form in Edit mode
>>LOCAL loParameter
>>loParameter = CREATEOBJECT('oParameter')
>>loParameter.cMode = 'Edit'
>>loParameter.lChanged = .f.
>>loParameter.iTicket_ID = crsSearchResults.iTicket_ID
>>DoForm('frm_Ticket', m.loParameter)
>>
>>** This is I just put, but I'm not sure this would work if we have multiple frm_Ticket opened
>>IF NOT WEXIST('frm_Ticket') AND m.loParameter.lChanged
>> ** We need to refresh the grid
>>endif
>>*thisform.Release()
>>
>>
>>Thanks a lot in advance.
>
>Is Ticket form modal or modeless?
If it's not broken, fix it until it is.
My Blog