mr_suleyman
29th November 2006, 21:13
Hi All,
I have a problem with GBF (generic browser Framewrok) . I used GBF code in part of Code&Utulities. I have display session that displays BOM items and I add a button this session. When it is pressed it show GBF for this item. But When I open one GBF for one item and exit from opened GBF and press button to show second GBF for another item. GBF is not displayed. I only open GBF , when I exit display session and restart sesion .Then it works only for one item. I see problem , I think I should destroy GBF and then open new GBF for another item. How can I open one more GBF from one session at the same time? How can I destroy GBF and open new GBF for another item without exit session ?

Thank you !

mr_suleyman
5th December 2006, 11:37
Heyyy ! Nobody knows that ?????

mark_h
5th December 2006, 15:35
I doubt there are many people who use GBF. So you may have a long wait before somebody posts a reply(that is if anyone even knows the answer). I wish there was some documentation on these features.

pconde
5th December 2006, 16:59
Hello,

The help for baan Erp says that the gbf terminated wait for a new gbf.init. You can maybe recall this function before anyother GBF function

Regards
Philippe

mr_suleyman
5th December 2006, 17:53
I did it twice but it didn't work . I think that there should be way or somebody did it.



Thanks .

pconde
5th December 2006, 18:26
Hello,

I understand a bit more your problem, You want to have two browsers opened at the same time, with two bom structure? Right?.

I think that in this case you need to have a specific library with the call back functions for each browser.

The structure of the program is then more complicated.

Main program --> dll1 with call back functions for item 1
--> dll2 with call back functions for item 2

due to the DLL capability you need to have two DLLs with the same functions but with different names.

==> 2 buttons?; Complex for end user I think and what if you want to have 3 browsers open? A third DLL. Could be very complex

Regards
Philippe

mr_suleyman
6th December 2006, 08:15
I only use one button on form. When I select one item on form, I open GBF by using this one button. After that I close GBF and select another item and I press same button then GBF is not open. Your way doesn't provide to solution my case.

Thanks.

bdittmar
6th December 2006, 12:43
I only use one button on form. When I select one item on form, I open GBF by using this one button. After that I close GBF and select another item and I press same button then GBF is not open. Your way doesn't provide to solution my case.

Thanks.

Hello,

it is handled in :

function extern long init_data_gbf()

Regards

mr_suleyman
6th December 2006, 14:00
How ?????????????

NPRao
6th December 2006, 21:15
I am not sure how? but, there is some info in the latest programmer's manual-

SSA ERP LN 6.1 Programmers Guide
gbf.init()
--------------------------------------------------------------------------------
Syntax
#include <bic_gbf>

long gbf.init(const string library(), const string title(), [long default.menu, long default.button, long default.options, long standard.button, long default.context])

Description
This function must be the first to be called, it initializes the global data structures of the GBF. It is not forbidden to reactivate a new run of the GBF in a session after a previous run of the GBF has terminated, the GBF has to clear its global variables again. This cleaning of the global variables cannot be done when leaving the GBF as at that point in time it must still be possible to get some information about the settings in order for the application to save and restore some user preferences, see for example gbf.get.refresh.strategy() and gbf.get.sort.strategy() .

mr_suleyman
7th December 2006, 16:01
Thanks All I will evaluate your feedback soon. Thanks...

mr_suleyman
21st December 2006, 13:43
I tried the ways . But all of them failed. What needs to be done ?

Thanks

bdittmar
21st December 2006, 15:59
I tried the ways . But all of them failed. What needs to be done ?

Thanks


Hello mr_suleyman,

you're a BaaNboard GURU !
Maybe debugging your souce will show you the problem.

I'm not able to relate to your problem.
As shown in attachment, it is posible to open more than one graphical bom same time.

Regards

mr_suleyman
22nd December 2006, 08:13
Firstly ,Thanks Bditmarr for your comment. But I'm always open to learn and learn. It is not important whether I'am guru or not. Secondly , When I look your picture , I realize that you open two session and two GBF. This works for me too. But May be you misunderstand my problem that is to open more than GBF from one sesion. And also I checked my source. I open first GBF and second like working in background but On the screen there is no second. Although I close first GBF and run second it doesn't work or I open first and I try to open second it doesn't work. Only works for open multiple sessions then open more than GBF.
My source is that:

|******************************************************************************

table ttipcs022
table ttcmcs003
table ttibom010
table ttiitm001
table ttipcs021

#include "/baan/bse/application/tgB40_c1/itggbf/igbfdefs0"
#include "/baan/bse/application/tgB40_c1/itgcom/icomlogging0"
#pragma used dll /baan/bse/application/tgB40_c3/otggbf/ogbfsrvlib


extern domain tcitem mitm.f fixed
extern domain tcyesno txta.yn
domain tcmcs.str60 gbf_key
domain tcmcs.s215 gbf_desc
domain tcmcs.str60 head_key

long int.iconset1
long int.iconset2
long leaf.iconset1
long leaf.iconset2
extern long rc
extern long retval


function extern tibomdll0008.explode.vkgr()
{
rc = init_data_gbf()
}


function long read.bom010(domain tcitem myitem, domain tcmcs.str3 level)
{
select tibom010.*
from tibom010
where tibom010.mitm = :myitem and (tibom010.exdt= 0 or (tibom010.exdt between date.num()-365 and date.num()))
order by tibom010._index4
selectdo
gbf_key(1;4) = edit$(tibom010.pono,"9999")
gbf_key(5;6) = " "
gbf_key(11;16) = tibom010.sitm(1;16)
gbf_desc(1;4)=edit$(tibom010.pono,"9999")
gbf_desc(5;1) = " "
gbf_desc(6;6)=" "
gbf_desc(12;2) = " "
gbf_desc(14;16)=tibom010.sitm(1;16)
gbf_desc(30;2)=" "

select tiitm001.* from tiitm001
where tiitm001.item = :tibom010.sitm
as set with 1 rows
selectdo
gbf_desc(32;30) = tiitm001.betr(1;30)
gbf_desc(62;8) = " "
gbf_desc(70;15) = "Q:" & str$(tibom010.qana)

if tiitm001.kitm = tckitm.manufacture then
rc = gbf.add.object(gbf_key, gbf_desc, 1, false, int.iconset2) |node
else
rc = gbf.add.leaf(gbf_key, gbf_desc, 0) | leaf
endif
endselect
endselect
return(0)
}

function extern long init_data_gbf()
{

long def.options
long ret_start



head_key(1;6) = mitm.f(1;6)
head_key(8;16) = mitm.f(1;16)

retval = gbf.init(gbf.current.library(), head_key,
bit.or(GBF.MENU.ALL , GBF.MENU.FILE.OPEN),
bit.or(GBF.BUTTON.ALL, GBF.BUTTON.FILE.QUIT),
def.options)

int.iconset1 = gbf.set.interior.icon( "bom",
"specm.normal", |unselected.closed
"specm.open", |unselected.open
"specm.closed", |selected.closed
"specm.open", |selected.open
true ) |Défault
int.iconset2 = gbf.set.interior.icon( "bom",
"standm.normal", |unselected.closed
"standm.normal", |unselected.open
"standm.select", |selected.closed
"standm.select", |selected.open
false )
leaf.iconset1 = gbf.set.leaf.icon( "bom",
"purs.normal",
"purs.select",
TRUE)
leaf.iconset2 = gbf.set.leaf.icon( "bom",
"pursp.normal",
"pursp.select",
false)


retval = gbf.set.key.desc.length(60, 215)

retval = gbf.set.sort.strategy( GBF.SORT.DESC
+ GBF.SORT.ASCENDING
+ GBF.SORT.INSENSITIVE)

retval = gbf.set.open.strategy( GBF.OPEN.AGAIN
+ GBF.OPEN.CURSEL
+ GBF.OPEN.READALL)

ret_start = gbf.start(1, 1)

return (0)
}


function long find.bom(const string key.c())
{
long retval
domain tcitem item.c
domain tccprj cprj.c
domain tcmcs.str4 level


level(1;4) = key.c(1;4)
item.c = key.c(11;16)
if not isspace(mitm.f) then
retval = read.bom010(item.c,level)
endif
return (0)
}

function extern long gbf.get.top.level()
{
head_key(11;16) = mitm.f(1;16)
return (find.bom(head_key))
}

function extern long gbf.get.children(const string key(),
long value,
long level)
{
return (find.bom(key))
}

function extern long gbf.save(
const long object.id,
const string object.key(),
const long object.value,
const long menu.value)
{
return (0)
}



THANKS...

george7a
22nd December 2006, 11:36
Hi,

I have some questions:

1) When the first gbf is opened check it's PID (using the ps command in client Baan shell). After you close the first gbf does the process still exists in the shell?
2) When you try to activate the second gbf (and it does not open), can you check if there is a new process started in the shell?

- George

mr_suleyman
22nd December 2006, 13:14
Hi,
When I look at process Baan doesn't open any new process for GBF. It runs in sessions process. That's why we couldn't look processes.

Thanks

mr_suleyman
22nd December 2006, 13:39
I discovered something. I controlled return value of gbf.start value. In first step for GBF 1 it returned 0 second GBF it returned -64. When I looked at return values of gbf.stat function there are 0, F.NO.MEMORY,GBF.ILL:STATE return values. Does any anyone know what equals -64 .


Thanks.

mr_suleyman
22nd December 2006, 14:13
And Also gbf.init returns -74 in second GBF.

george7a
22nd December 2006, 14:15
74:
http://www.baanboard.com/programmers_manual_baanerp_help_errors_74_ENOBUFS

64:
http://www.baanboard.com/programmers_manual_baanerp_help_errors_64_EOPNOTSUPP

mr_suleyman
22nd December 2006, 15:15
Thanks George but There is no extra information for solution. I don't belive that this is memory error because it opens more than GBF from multiple sessions. I researched the DLL information. There is no extra information.

george7a
4th January 2007, 11:17
HI,

I hope this link will help you, It includes all error codes and return values of GBF:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_generic_browser_frameworkf_error_codes_and_return_values

- George