SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    Won't that just print the last message in the list since i is equal to the count?

    There is a ListPrint(lsList) method that will print out your list of string.

    ------------------

  2. #2
    Junior Member
    Join Date
    Aug 2001
    Location
    california
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    getting status messages from a status dialog

    What's the best way to handle this? I have a status dialog that has a progress bar and a listbox where status messages are being logged. Now, I was hoping to retrieve those status messages.

    [-] while StatusDialog.Exists()
    [ ] sleep (1)
    [ ] LIST OF STRING lsStatusMsg = StatusDialog.StatusMessages.GetContents()
    [ ]
    [ ] print (lsStatusMsg)

    Here's what I want to do just want to get the last complete log of all status messages before the dialog disappears automatically after it has completed the processs. how do i do this?

    any ideas on how to better this.

    ------------------

  3. #3
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    after the while loop:

    int i = ListCount(lsStatusMsg)
    print(lsStatusMsg[i])

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  4. #4
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    Your right. I read the post wrong. I thought he/she was wanting the just the last message.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  5. #5
    Member
    Join Date
    Jun 2000
    Location
    CA
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    i have a similar application. ListPrint() worked. But the problem, I am having is that the next time i do a GetContents(), the dialog already closed so how do I workaround this? i tried tweaking on the sleep times but that didn't help. any ideas. thanks!

    ------------------

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    I can't dream of a foolproof method for this, but seemingly you can set you Sleep value at a pretty low tick count. Just playing around with it, I set it at 0.005 and it accpeted that as a valid value. I don't know... It may default to a higher setting.

    Here's the little test I did...
    I'm guessing it took longer to print the statement each time than it did to actally sleep for 0.005 seconds.

    Anyway, with this, you can do a GetContents just about a rapidly as you computer can grab them. Like I said, it isn't foolproof, but I imagine it will grab the last bit of data written before the dialog goes away.

    ------------------

  7. #7
    Member
    Join Date
    Jun 2000
    Location
    CA
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    DJGray,
    I tried .05 and not .005 Let me try that. Thanks.

    ------------------

  8. #8
    Member
    Join Date
    Jun 2000
    Location
    CA
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    i tried .005 and somehow, i sometimes hit the timing wherein the dialog is already gone by the time a GetContents() is attempted.

    i tried going as fast as .001 and the problem i am seeing is the SilkTest hangs and doesn't respond and i had to kill SilkTest.


    ------------------

  9. #9
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    set the value really low, and do a do/except around the GetContents

    ------------------

  10. #10
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting status messages from a status dialog

    You might consider leaving the Sleep statement out entirely. Grab the data with a GetContents(), then process the captured text after the while loop ends.


    while (...exists())
    lsText = ...GetContents()

    // do what you want here with lsText


    Note that you may have to wrap this in a do/except loop because Silk will report an error if the dialog closes between the Exists and GetContents calls.

    As an seemingly relevant side issue, would you consider this dialog's behavior to a usability issue for a human user? If so, write it up.

    John


    ------------------

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:58 PM.

Copyright BetaSoft Inc.