Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

 
gbf.set.open.strategy() *
By patvdv at 26 Feb 2008 - 21:57

gbf.set.open.strategy() *

gbf.set.open.child(), gbf.set.open.read(), gbf.set.open.what()

Syntax

#include <bic_gbf>

long gbf.set.open.strategy(long open.strategy)
long gbf.set.open.child(long open.strategy)
long gbf.set.open.read(long open.strategy)
long gbf.set.open.what(long open.strategy)

Description

These functions set the open or close strategy, which is what the GBF should do when an interior node is closed and opened again as well as what should be done on the Open All menu item or Ctrl+O keystroke.

gbf.set.open.child()

The function gbf.set.open.child() deals with what to do with the children when reopening an interior node. The open.strategy in this case may be one of:

GBF.OPEN.AGAIN

Open again all interior nodes which were already open when the original interior node was closed. That is restore the full state after a close &#x0096; reopen sequence.

GBF.OPEN.NONE

Do not open the interior nodes when reopening the original interior node, that is closes all these sub nodes.

GBF.OPEN.REFRESH

Delete all nodes beneath the given node, which implies that when reopening this node its children will be read again.

The default of GBF is to have the open.type set to GBF.OPEN.AGAIN.

This open and close strategy is determined at the moment when the interior node gets closed (double click on open interior node and so on.). So when closing such a node, changing the open strategy and reopening that same interior node will reveal the contents of that node using the previous strategy and not the current strategy.

gbf.set.open.read()

The function gbf.set.open.read() deals with the Open All (Ctrl+O) menu item (keystroke) action. It determines what should be done on this action. The open.strategy in this case may be one of:

GBF.OPEN.NOREAD

Open only what is already known to the GBF. In other words use only that what has already been read before.

GBF.OPEN.READALL

First performs a read all (that is: menu item: Read All or keystroke Ctrl+R) and then open all nodes.

gbf.set.open.what()

The function gbf.set.open.what() determines on which object the Open All (Ctrl+O) menu item (keystroke) action works. The open.strategy in this case may be one of:

GBF.OPEN.ALLTREE

Operate on the whole object tree

GBF.OPEN.CURSEL

When one or more objects are currently selected then operate only on these objects, otherwise operate on the whole object tree.

gbf.set.open.strategy()

For the function gbf.set.open.strategy() the open.strategy is a combination of these three. These option flags should be add (&#x0091;+&#x0092;) or bit.or()&#x0092;ed. The default of GBF for gbf.set.open.strategy() is:

GBF.OPEN.AGAIN + GBF.OPEN.NOREAD + GBF.OPEN.ALLTREE.

Take care when using gbf.set.open.strategy() in cases where only one or two of the open strategy parts has to be changed, since the other values should remain unchanged. This is in fact the reason why the other three functions are added. For example, when one wants to use the GBF.OPEN.READALL strategy the following code should be used:

 function long force.open.read()
 {
         long retval, strategy
    retval = gbf.get.open.strategy(strategy)
         if retval < 0 then      return (retval) endif
         strategy = GBF.OPEN.READALL +
    bit.and(strategy, bit.inv(GBF.OPEN.NOREAD + GBF.OPEN.READALL))
         return (gbf.set.open.strategy(strategy))
 }


Arguments

open.strategy

See above.

Return values

0

Successful completion

GBF.ILL.OPEN.TYPE

Unknown open.strategy specified

GBF.ILL.STATE

GBF is not in the right state to deal with this function

Related topics


0
No votes yet


All times are GMT +2. The time now is 12:06.


©2001-2018 - Baanboard.com - Baanforums.com