TD-16147: CDK: How clear Error Output window?

Missing or incomplete OpenText Gupta product features? Discuss it here!
Zephy

TD-16147: CDK: How clear Error Output window?

Post by Zephy » 23 Aug 2011, 08:22

In my small CDK utility i write result into Error Output Window.
(function: cdkItem.OutputItemMessage)

How can I clear previous contents in Error Output Window?

Jeff Luther

Re: TD-16147: CDK: How clear Error Output window?

Post by Jeff Luther » 23 Aug 2011, 22:58

cdkItem.OutputItemMessage( '' ) ! just write an empty string

Zephy

Re: TD-16147: CDK: How clear Error Output window?

Post by Zephy » 24 Aug 2011, 07:36

This not work :( .
Now i have only new empty row, but i need clear list.
See screen.
Is possible get a window handle of the Output window?
clear_ow.png
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: TD-16147: CDK: How clear Error Output window?

Post by Jeff Luther » 24 Aug 2011, 16:45

Is possible get a window handle of the Output window?
I do not know. Put together a small TD test case showing what you have and are trying to do with the CDK. Then I can look at it and hopefully better answer your question.

Zephy

Re: TD-16147: CDK: How clear Error Output window?

Post by Zephy » 25 Aug 2011, 08:02

Here i send little example.
This UserTool show in Outline Output Window selectted row in Outline.
When is Write button pushed repeatedly is new result append at the end previous.
So i need clear Outline Output Window before I insert new text.
See example.

For test you set in TD:
1) CLEAR_OW.EXE file in UserTools with
Parameters: $Outline -MTX
Menu text: Test
2) Show Output window in TD Outline (ALT+1)
3) Select any row in outline
4) Click in User tools 'Test' button
5) Click repeatedly in Write button
clear_ow.zip
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: TD-16147: CDK: How clear Error Output window?

Post by Jeff Luther » 29 Aug 2011, 18:57

I don't have a solution but am asking internally about this.

Jeff Luther

Re: TD-16147: CDK: How clear Error Output window?

Post by Jeff Luther » 31 Aug 2011, 22:11

Sorry, but the conclusion is that there is no interface to CDK/SAL code in TD that would allow you to do that now. I've added enhancement request TD-16147 for a new CDK cdkItem.OutputClear() method to do this.

Only workaround I can think of now is to keep all errors down to 1 at a time (that's optimistic!) and before the next error, clear that single line by writing '' to it.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3388
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-16147: CDK: How clear Error Output window?

Post by Dave Rabelink » 01 Sep 2011, 07:39

Well, just a quick brainstorm on this and maybe a workaround for the time being.

The output window is a listbox.
I have tried to clear the listbox by sending

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Code: Select all

Number: LB_RESETCONTENT = 0x184
Call SalSendMsg( hWndListbox, LB_RESETCONTENT, 0, 0 )
And that works ! The listbox is cleared.

I quickly tested this using Windows Spy tool to manually get the listbox window handle which I used to send the message to.

So maybe you can try to dynamically get the listbox handle by enumerating the windows and childs within the CDK app.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Zephy

Re: TD-16147: CDK: How clear Error Output window?

Post by Zephy » 01 Sep 2011, 12:35

2 Jeff: Thanks, this new CDK method will be useful :wink: .

2 Dave: I thinking about this. But this way is complicated. So I try it, thanks.

Return to “Enhancement suggestions”

Who is online

Users browsing this forum: [Ccbot] and 0 guests