[Gambas-user] Stumped by .99

Craig Packard cpackard at ...626...
Tue Sep 21 02:25:45 CEST 2004


On Sun, 19 Sep 2004 16:19:02 +0200, Benoit Minisini
<gambas at ...1...> wrote:
> On Sunday 19 September 2004 03:47, Craig Packard wrote:
> > 1. I can't get the 'watch' window to work at all.  I can't even get
> > the window to 'undock' from the project window?  This makes it very
> > difficult to read the current value of the varable(s) I'm watching.
> > Can I make this a seperate window still?  Everything I try to watch
> > just tells me: "ERROR: Cannot load class 'TextBox5: Unable to load
> > class file"  When I watch TextBox5.Text or for that matter any
> > textbox. . . Is anyone else using the watch window?
> 
> This is a problem with the included debugger. He thinks that an identifier is
> a class if it begins with an uppercase letter! So as a workaround type
> "textBox5.Text", it should work.


Still not working. I can't get watches or the console windows to tell
me anything.  Please see the simple attached screen shot.  I'm sure
you can correct me.

> > 3. I'm having a lot of trouble with MySQL.  I can't get the moveto
> > function of the result object to work at all.  I'll try something
> > like:
> >
> >   Conn.Open
> >   rData = Conn.Edit("customers")
> >   i = rData.MoveTo[CInt(txtRecNumber.Text)]
> >
> > And it constantly throws an error: "Not an object"
> 
> MoveTo is a method, so you must use braces and not brackets.

Bingo, moveto is working thanks to ( ).  However I can not get an
update to actually update anything.  This would be MUCH easier to
troubleshoot if I had the watch window to see what I was doing wrong! 
:)

<CODESNIP>
  WITH Conn
    .Type = frmMain.strType
    .Host = frmMain.strHost
    .Login = frmMain.strLogin
    .Password = frmMain.strPassword
    .Name = frmMain.strDataBase
  END WITH
  Conn.Open
  Conn.Begin 'Is this and commit needed with MySQL?
  IF txtRecNumber.Text = "*" THEN
    rData = Conn.Create("customers")
  ELSE
    rData = Conn.Edit("customers")
  END IF
  rData.MoveTo(Val(txtRecNumber.Text))
  rData["name"] = textbox1.Text
  rData["contact"] = textbox2.Text 
  rData["address1"] = textbox3.Text
  rData["address2"] = textbox4.Text
  rData["city"] = textbox5.Text
  rData["state"] = textbox6.Text
  rData["zip"] = textbox7.Text                   
  rData["terms"] = textbox8.Text 
  rData.Update()
  Conn.Commit
  rData.Connection.Close
  Conn.Close
</CODESNIP>

Also note in my screen shot that my Watch window is 'docked' or stuck
to the project window.  That wasn't like that before. I must admit I
hate it being docked.  It makes me stretch my project window real wide
so I can read the watch messages.

Thanks again for any help.


           - Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot1.png
Type: image/png
Size: 77885 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20040920/a5bebcaa/attachment.png>


More information about the User mailing list