[Gambas-user] Bugs: Help Browser + GDM + Net

ron ronstk at ...239...
Sun Feb 29 00:53:17 CET 2004


On Thursday 26 February 2004 18:15, ron wrote:
> > > Click on OK and Gambas exit total.
> > > -------------------------
> > > GDM
> > > Open the tree
> > > In the tree right-click on a database icon and select Refresh in
> > > context menu A blue bar or dotted at the moment of clicking.
> > >
> > > [13] Null Object
> > > At: FMain.RefreshTable.222
> > > Click on OK and GambasDM exit .
> > > I can't figure it out how to solve this now.
> >
> > I couldn't reproduce it. Could you give me more details ?
>
> I wil later this evening try to check exact how to reproduce it.
> I'm at work now. Website programming.

It did take some time but I can reproduce it.

do: 
opend the GDM
get: 
then GDM with a connection to my MqSQL server in tree 
not expanded  yet
do:
expand the tree at the connection node.
Click on the +.
get: 
expanded with the user entry and 4 db's
do:
single click on a db icon.
get:
 the back color is blue 
do:
move the mouse to the white space below
and right click for contest menu. the dark blue disapears
Choose refrehs in the menu. 
get:
the error mesage box with the above mesage in it.

Note: 
I test the steps while writing this and right click on the selected database 
does the same.
An other strange thing is there are two different context menu's
A big one and a small one.

When there is a big menu the refresh goes ok. It are sthe small menu it fails.

After the refresh on the db with the long menu it is changed to a small menu

Found the big one come's  after the node is expanded and then collapsed
State of the db is then open. So i know now to that a refresh close all open 
data bases to.

Now I know that happens if they are not in open state (expanding the node).
Sugestion is to use different icons, with red cross if not open?

I found this bug after creating a db with phpMyadmin and at return in GDM
it was not there. It's is not dynamic add so I clicked in the white space and 
try the refreh in context menu to get the update via the connection.

I think a refresh on the table should do it for the db to get added tables, on 
the connection for the connection to get new db's.
The whitespace all connections including the open db's

Verify on the above and found after a new start the refresh is not closing 
open db's!

I read the code at that line and found 
~~~~~~~~
  aKey = Split(Mid$(sParent, 2), "/")
  hConn = CConnection.Get(CServer.All[aKey[0]], aKey[1])
  
  tvwBase[sParent].Clear
  
  IF IsNull(hConn.SystemTables) THEN RETURN '<<<<< --- error line
  bSystem = hConn.SystemTables.Count > 0
~~~~~~~~~~~~~~~~~~ 


STATIC PUBLIC FUNCTION Get(hServer AS CServer, sName AS String) AS CConnection
  DIM sKey AS String
  DIM hConn AS CConnection
  
  sKey = hServer.Key &/ sName
  
  hConn = All[sKey]
  IF NOT hConn THEN
    hConn = NEW CConnection(hServer, sName)    '<<< ----new connection
	' must there not be a hConn.Open() here ????????
  ENDIF
  
  RETURN hConn
  
END

Adding the open and the error is gone but the db is open.
Of course a refresh should not open closed db's.

I can only see a failure in the tvwBase_Menu()
In case "D"      
      $hConn = CConnection.All[Mid$(sKey, 2)]
      ' in All are the key's but not the state open/closed
      mnuCreateTable.Visible = NOT Null?($hConn)
      mnuRequest.Visible = NOT Null?($hConn)

does not work properly. 
It should not look to the connection only but also that the db is open.

CConnection.All[Mid$(sKey, 2)]
In All are the key's but not the state open/closed.

$hConn.Database[xxx].status ?

I miss Connection.Status and DB.Status (Table.Status)
enum Status:
Closed = 0 '  the object it closed
Open =1 
Ready =2 ' can accept new exex command 
Executing =3 ' is still busy
Error =4 ' has error occured
 
Ron

 





More information about the User mailing list