Indigo Rose Software
  #1  
Old 10-23-2004
csd214 csd214 is offline
Forum Member
 
Join Date: Oct 2001
Location: Norway
Posts: 939
StatusDlg.SetStatusText()

I am running a Status Dialog; I do not want any Status Text.

Problem: The Status Text from a previous Status Dialog is displayed.

I have tried StatusDlg.SetStatusText(""), but it does not help.

[I have previously posted: Sometimes the Status Text is indented (as to make room for the icon whish is NOT used), sometimes not.]

I have a test project demonstrating this problem (it includes SUF6NEWBIE's function SystemInfo). If somebody wants this project, please tell me.
Reply With Quote
  #2  
Old 10-23-2004
SUF6NEWBIE
Guest
 
Posts: n/a
CSD.. if you hav'nt (I hav'nt tried it) however ...

"StatusDlg.SetStatusText(""), but it does not help."

try:

StatusDlg.SetStatusText(" "); --one or two spaces
Reply With Quote
  #3  
Old 10-24-2004
Jason Pate Jason Pate is offline
Forum Member
 
Join Date: Jan 2002
Location: Nashville TN
Posts: 328
Check out this posting I think it might help


http://www.indigorose.com/forums/showthread.php?t=9075



--Get the Localized string to set it back later
strLocString = SetupData.GetLocalizedString("MSG_COPYING");

--Change the localized string to your title
SetupData.SetLocalizedString("MSG_COPYING","Instal ling"..clinicname);

StatusDlg.Show(MB_ICONNONE, false);
File.Copy(SessionVar.Expand("%AppFolder%\\*.*"), appfolder, true, true, false, true, nil);

--Reset the localized string
SetupData.SetLocalizedString("MSG_COPYING",strLocS tring);
Reply With Quote
  #4  
Old 10-24-2004
csd214 csd214 is offline
Forum Member
 
Join Date: Oct 2001
Location: Norway
Posts: 939
The length of this post equals my frustration…

SUF6NEWBIE & Jason Pate;
Thanks a lot for trying to help me. Sorry, none of your suggestions solved the problem.

It is only a test project I am working with, but the intention is to learn all of "SUF70's secrets". When I am going to convert the rest of my SUF60 projects I should KNOW what possibilities SUF70 has...

My project is now well commented (to remember what I was working with):

-- PROGRESS METER
-- We don't want any progress meter
StatusDlg.ShowProgressMeter(false); -- we don't want the progress meter
--[[
If we run this code as the FIRST option, everything is OK. BUT: If we run this code after another task (btn01) where we use the status dialog with a progress meter, we now will have the Status Text from Btn01 displayed!!
HOW TO GET RID OF THAT TEXT?
Suggestions:
1: StatusDlg.SetStatusText(nil); = Not allowed
2: StatusDlg.SetStatusText(""); = No, does not work
3: [SUF6NEWBIE]
StatusDlg.SetStatusText(" "); = No, does not help
If you have StatusDlg.SetStatusText("My new text") this is never displayed, even when this code is run as the first task. The Status Text is associated with the progress meter; AND WE DON'T USE ANY PROGRESS METER HERE!
4: [Jason Pate]
strLocString = SetupData.GetLocalizedString("MSG_COPYING");
Does not help in this case. The MSG_COPYING value is used when you use File.Copy() function together with the status dialog.
]]


What does the help doc tell?
There are several actions in Setup Factory that automatically use this dialog to show their progress (if you wish to show it):
File.Copy, File.Delete, File.Move, File.Find, Folder.DeleteTree, Folder.Find, HTTP.Download
However in some cases you may need further control over what, and how it is displayed. in this situation you can pass a function as the CallbackFunction parameter (you will need to consult the action being used for the required parameters of the function). You can find an example illustrating this method in the article, Create a custom callback function.
Until this point, the Status Dialog has been described in relation to specific actions in Setup Factory. However due to its flexibility and power, it can be used in many other ways. The Status Dialog contains it's own category of actions called StatusDlg and can be used to provide a representation for any type of progress you need.


Quote Lorne (an answer to Jason Pate): "There must be a difference between the SF7 in my head and the SF7 that actually exists."

Yes, to day I feel it that way.

The example in the help doc tells me that this should be simple:
StatusDlg.SetMessage("Please wait while we process your request.");
Sets the built-in status dialog's main description to the string, "Please wait while we process your request."


But obviously it is not. I studied Brett's screen "Download File Progress". Is there a ControlID I could access? The answer is NO (I think).

What about the reference to the article "Create a custom callback function"?
After acting like Sherlock Holmes I concluded with:
This is a topic in the AMS50 Help doc "How do I ...?". There is no "How do I...?" in the Setup Factory help doc.
(BTW: The AMS topic was not to any help in this case.)

May be a walk in fresh air was the right thing to do. In any case, afterwards I found the solution:

In the code snippet where I use (and want) the Status Text it is important to add:
StatusDlg.SetStatusText("");
This action MUST be BEFORE StatusDlg.Hide(); NOT AFTER!

This was indeed a secret!

Now I can run SUF6NEWBIE's GetSystemInfo() with a proper status dialog:
Please wait, Running SysInfo.cmd...
without the meaningless subtext "Searching for file Winword.exe on drive C:\"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 01:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software