Announcement

Collapse
No announcement yet.

Msgbox in a Callback.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    You may be experiencing a re-entry problem with MSGBOX, code not shown, LOCAL variables may be being reset on re-entry
    Ditto.

    If you want to add some "display information for debugging purposes" without re-entrancy issues like this you might just want to add a STDOUT function as shown in this demo:

    Simple STDOUT for PB/DLL and PB/Win 2-13-04

    Leave a comment:


  • Olav Bergesen
    replied
    To Borje:
    Sorry, didn't work, but I got it to work now. To share an issue with someone always inspires to try harder.

    In addition to what explained I also had code to save existing values in the controls under %CBN_Setfocus, and as said before, loaded new values under %cbn_closeup. Saving for one weekday and load for a different one.

    The weekday variable is a static one and caused the problem.

    Now I have placed a control get text... in the %CBN_DropDown to fetch current weekday showing in the combobox(saving) and the same call before fetching the new values.

    Both saving and fetching data is now placed under the %CBN_SelEndOk message.

    Very odd that there was no problem without the Msgbox.

    Thanks for support.
    --




    Leave a comment:


  • Rodney Hicks
    replied
    You may be experiencing a re-entry problem with MSGBOX, code not shown, LOCAL variables may be being reset on re-entry. Borje's suggestion should work, if that's the case.

    Leave a comment:


  • Borje Hagsten
    replied
    Question is - why CBN_CLOSEUP? MS speaks, "In general, you cannot predict the order in which notifications will be sent. In particular, a CBN_SELCHANGE notification message may occur either before or after a CBN_CLOSEUP notification message."

    So maybe when focus shifts to MSGBOX, it intercepts selection / closeup notifycations. If MSGBOX is necessary, maybe can try acting on CBN_SELCHANGE instead and see if that helps.

    Leave a comment:


  • Olav Bergesen
    started a topic Msgbox in a Callback.

    Msgbox in a Callback.

    Should this be avoided?

    Hi,
    In my program, in a %CBN_CLOSEUP message, I have placed two calls in row to the same function(different parameters) and one call to a second function. The functions reads data from two files.

    Values collected from the files is then displayed in some controls, among them 3 listview controls. The controls is located on a one paged Tabcontrol with its own callback, and it all works fine until a Msgbox call is placed before call to the functions. Then no controls is updated with the new data values.

    Anyone any clue?




Working...
X