How To know if a Table is discardable

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Didier Tourneur

How To know if a Table is discardable

Post by Didier Tourneur » 07 Nov 2007, 15:28

 Posted by:  Didier Tourneur 

Hello

How Can I know if a table window is discardable or not.

Thanks
Didier

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: How To know if a Table is discardable

Post by Jeff Luther » 07 Nov 2007, 17:07

 Posted by:  Jeff Luther 

Take a look at the CDK tutorial sample on my link page, shown below, Didier.
(Click on the Samples link on that page, and the demos are in alpha order.)

When you run the tutorial, click the bottom radio button: Get Table Window
Cache Settings. It will show you the SAL call to make to detect if
discardable and cache size.

In this tutorial, the sample is reading itself; probably like you want to do
that as well, although you could read in another appl. if you needed to.

- Jeff/PC Design
info/samples: http://www.jeffluther.net/gupta/

Asgard

Re: How To know if a Table is discardable

Post by Asgard » 07 Nov 2007, 18:14

 Posted by:  Asgard 

Try - Old Sample

You do not have the required permissions to view the files attached to this post.

cschubert
Germany
Posts: 867
Joined: 23 May 2018, 11:26
Location: Germany

Re: How To know if a Table is discardable

Post by cschubert » 07 Nov 2007, 20:37

 Posted by:  Christian Schubert 

Didier,

the discardable feature of table windows was used to save memory in the
ancient times when memory was expensive. These times are gone. Just set
every table (class) to "discardable: no" and "max rows in memory" to
something very large (handle SAM_CacheFull if necessary) and you will always
know which discardable state your tables are in ;-)

Christian Schubert

salvi_to

Re: How To know if a Table is discardable

Post by salvi_to » 12 Nov 2007, 13:22

 Posted by:  salvi_to 

Try

Code: Select all

Call SalOutlineItemTypeText( SalOutlineCurrent( ), SalOutlineItemOfWindow(hWndItem),CDK_IT_TableDiscardable, FALSE, sOut )
If SalStrUpperX(sOut) = 'NO'
	....
note: CDK_IT_TableDiscardable = 0x00D4

salvi

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests