Alpha Video Training
Results 1 to 4 of 4

Thread: {progress}

  1. #1
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,699

    Default {progress}

    I am trying, unsuccessfuly, to use the {progress} xdialog directive to add a progress robot to my pack tables routine.

    The example in the A5 documentation is for a modal dialog. The dialog needs to be modeless so underlying processing continues, but when I do that, the body of the dialog does not display.

    Here is the code.

    function test as V (Show = .t., Label = "")

    if show = .f.
    if ui_modeless_dlg_exist("Processing")
    ui_modeless_dlg_close("Processing")
    end if
    exit function
    end if


    num = 0
    caption = ""

    ' as a modal dlg, other processing stops- so it can't be used for 'progress'
    'ui_dlg_box("Progress",""%dlg%
    ui_modeless_dlg_box("Processing",""%dlg%
    {text=80caption};
    {interval=0.1}
    {timer=timer}
    {progress=80num};
    {line=1};
    "reset" "Done"
    %dlg% , ""%code%
    if a_dlg_button = "timer" then
    a_dlg_button = ""
    if num " 100 then
    num = num+1
    ui_modeless_dlg_refresh("Processing")
    caption = "Progress ("+num+"%)"
    else
    caption = "Done"
    end if
    else if a_dlg_button = "reset" then
    a_dlg_button = ""
    num = 0
    end if
    %code%)

    END FUNCTION

    Bill.

  2. #2
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: {progress}

    Hi Bill,

    I am a little surprised that a modeless dialog stops other things from continuing as I spent most of today trying to get things to stop while a modeless box was on display. (I then wanted the box to close itself without user intervention and make something else happen.)

    So I do not know what is hanging you up. One thing, though:
    if a_dlg_button = "timer" then
    a_dlg_button = ""
    is a holdover from the modal box code as you do not have to set a_dlg_button to "" to keep your modeless box open-as I'm certain you know.

    Not that I'm pointing to this as the cause of your problem.

    I'll be interested in what others have to say.

    Best,
    Bill

  3. #3
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,699

    Default RE: {progress}

    Bill,

    The modeless dialog does not stop other processes. My problem is that the modal dialog displays correctly, but stops other processes. Same code run as a modeless dialog lets other processes run, as it should, but the body of the dialog does not display - only the title displays as it should.

    The example in the doc uses a modal dialog, but in practice it would always need to be modeless if you are showing progress of a running operation.

    Bill.

  4. #4
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: {progress}

    Hi again,

    I see what you are saying.

    Based on what I was doing yesterday I can assure you that a modeless box's timer continues to fire concurrently with other processes so perhaps the problem is {progress}.

    But that cannot be right as Jim Chapman's shutdowntimer function has a progress bar. Are you familiar with that code? It incorporates much of what you are trying to do.

    Bill

Similar Threads

  1. lazy progress
    By Steve Wood in forum Alpha Five Version 6
    Replies: 7
    Last Post: 09-17-2005, 12:52 AM
  2. Progress Bar
    By Mike Thomson in forum Code Archive
    Replies: 0
    Last Post: 08-26-2005, 02:51 PM
  3. Progress Report
    By dik_coleman in forum Alpha Five Version 5
    Replies: 3
    Last Post: 08-04-2004, 12:10 PM
  4. Progress Bar
    By alexmuir in forum Alpha Five Version 5
    Replies: 3
    Last Post: 02-06-2004, 04:46 AM
  5. Progress bar
    By brett s in forum Alpha Five Version 5
    Replies: 2
    Last Post: 10-04-2002, 03:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •