Page 1 of 2

Win7 (64.bit): December Version Upgrade

PostPosted: Tue Dec 27, 2011 12:10 pm
by Kenko
The following observations are submitted for clarification.

Project: Loan Calculator

This Event no longer works in the the December 2011 version but did in the June 2011 version

Event Init()
ExecAfterMSec(10, on_ProjectOpen)
End Event

Signal on_ProjectOpen()
' Simple example to use the statusbar
StatusBar.ShowMessage("Ready to enter data")
End Signal


Project: AddressBook - frmInput.QDialog.q7b

This Function no longer works in the the December 2011 version but did in the June 2011 version. The following error is displayed “types incompatible in line 6 in file frmInput.QDialog.q7b”

Function getControl(sName As String)
Dim groupBox As QWidget = Me.Child("groupBox") ’ This is line 6 indicated by the error message
'MsgBox(groupBox)
Return groupBox.Child(sName)
End Function

What is the significance of some but not all Keywords being in RED, especially following the Keyword End i.e. End Event, or End Signal or other code being in Red. The compiler does not show an error so will it be a run time error?

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Tue Dec 27, 2011 2:38 pm
by Henning
Have you tried:

ExecAfterMSec(10, "on_ProjectOpen") ' as SignalName is defined As String

I got a similar error as your second error, worked in prev. version...
'B' will surely come in and explain the difference. :)

/Henning

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Tue Dec 27, 2011 8:07 pm
by Slowdown
Project: Loan Calculator

Forget the ExecAfter . . . .
not needed anymore for starting-up the project the function itself can stille be used.
What is the significance of some but not all Keywords being in RED, especially following the Keyword End i.e. End Event, or End Signal or other code being in Red.

Normal it will indicate an error while typing wach out for uppercase and lowercase or when using reserved words.
The compiler does not show an error so will it be a run time error?

Probably a bug, reported this already to 'B'
'B' will surely come in and explain the difference.

Yup, he is the one to clarify ;)
hase to change here some code in my latest project to get it working in the release of December, but it works :D

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Tue Dec 27, 2011 9:05 pm
by Henning
hase to change here some code in my latest project to get it working in the release of December, but it works

:)

Still not able to solve my QPushButton arrays... Keep on trying...

/Henning

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Wed Dec 28, 2011 7:30 pm
by Slowdown
@Henning,
Show some code perhaps we can help u 8-)

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Wed Dec 28, 2011 8:42 pm
by Henning
I did in Compiler Error 2 ;)

http://www.q7basic.org/forum/viewtopic.php?f=1&t=157

There are 17 8-button groups, so don't be confused by MX1[]...MX11[].

/Henning

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Thu Dec 29, 2011 4:48 pm
by Henning
The problem is to get a reference to a QPushButton by Name and insert it (prefereably as a pointer to the 'real' button) in a QPushButton array.

/Henning

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Thu Dec 29, 2011 8:39 pm
by Slowdown
I did in Compiler Error 2

Yup, i see
I tried several way's to create Button array's but still keeping error's 'Null pointer error'
But the next problem will be MX1.AddButton(.......)
This one will create the error,
next error.png
next error.png (7.91 KiB) Viewed 601 times

This one also appear in the examples you made earlier.
If you ask me this one is to solve by 'B'

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Thu Dec 29, 2011 11:34 pm
by Henning
Thanx to Kenko asking about the Addressbook example, I tested it and I see that includes the same sentence.
Line# 6: Dim groupBox As QWidget = Me.Child("groupBox")
And throws the same 'Incompatible types' error I get... So lets wait for 'B' to be back.

/Henning

Re: Win7 (64.bit): December Version Upgrade

PostPosted: Sun Jan 01, 2012 4:04 pm
by Kenko
Three further possible Anomalies in December Version of Q7Basic

1. When a compiler error is reported the effected error line is no longer selected

2. In the Signal on_btnExit Signal below there is no Exit Sub, the program remains open if the No pushbutton is clicked, and closes if the Yes button is clicked. I can understand that n = vbNo, but cannot understand why it works without the use of Exit Sub.

Signal on_btnExit_clicked(Checked As Boolean)
Dim n
n = MsgBox("Are you sure you wish to close down", vbYesNo, "Closing Down")
If n = vbNo Then
ledAmount.Text = ""
ledRate.Text = ""
ledDuration.Text = ""
lblPaymentsDue.Text = ""
lblRepayments.Text = ""
Else
Application.Quit()
End If
End Signal

3. When in QT Designer, no help files are available