Discussion:
How to "Me.Close" with "Shell" or "Exec"?
(too old to reply)
abbat
2012-04-20 10:13:56 UTC
Permalink
Hi,

Public Sub Form_Open()
Dim a As String = 4
Dim b As String = 4

If a > b Then

Else
'Shell "ls"
Exec ["ls"]
Me.Close
Endif
End

How to "Me.Close"

Thanks
--
View this message in context: http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719245.html
Sent from the gambas-user mailing list archive at Nabble.com.
GMail
2012-04-20 10:53:11 UTC
Permalink
Post by abbat
Hi,
Public Sub Form_Open()
Dim a As String = 4
Dim b As String = 4
If a > b Then
Else
'Shell "ls"
Exec ["ls"]
Me.Close
Endif
End
How to "Me.Close"
Thanks
Removing irrelevant code, I get

Public Sub Form_Open()

If True then
Exec ["ls"]
Me.Close
EndIf

End

or better

Public Sub Form_Open()

Exec ["ls"]
Me.Close

End

both of which seem to execute perfectly well (i.e. as expected) here.

Please explain your problem again.

cheers
Bruce
abbat
2012-04-20 11:06:05 UTC
Permalink
It does not CLOSE.
Just try F5

If True then
Exec ["ls"]
Me.Close
EndIf

DOES NOT CLOSE (you have to push "stop" button), AND:

If True then
'Exec ["ls"]
Me.Close
EndIf

WORKS
Post by GMail
Post by abbat
Hi,
Public Sub Form_Open()
Dim a As String = 4
Dim b As String = 4
If a > b Then
Else
'Shell "ls"
Exec ["ls"]
Me.Close
Endif
End
How to "Me.Close"
Thanks
Removing irrelevant code, I get
Public Sub Form_Open()
If True then
Exec ["ls"]
Me.Close
EndIf
End
or better
Public Sub Form_Open()
Exec ["ls"]
Me.Close
End
both of which seem to execute perfectly well (i.e. as expected) here.
Please explain your problem again.
cheers
Bruce
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
View this message in context: http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719872.html
Sent from the gambas-user mailing list archive at Nabble.com.
M. Cs.
2012-04-20 11:15:12 UTC
Permalink
What about Quit instead Me.Close?
Post by abbat
It does not CLOSE.
Just try F5
If True then
Exec ["ls"]
Me.Close
EndIf
If True then
'Exec ["ls"]
Me.Close
EndIf
WORKS
Post by GMail
Post by abbat
Hi,
Public Sub Form_Open()
Dim a As String = 4
Dim b As String = 4
If a > b Then
Else
'Shell "ls"
Exec ["ls"]
Me.Close
Endif
End
How to "Me.Close"
Thanks
Removing irrelevant code, I get
Public Sub Form_Open()
If True then
Exec ["ls"]
Me.Close
EndIf
End
or better
Public Sub Form_Open()
Exec ["ls"]
Me.Close
End
both of which seem to execute perfectly well (i.e. as expected) here.
Please explain your problem again.
cheers
Bruce
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719872.html
Sent from the gambas-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
abbat
2012-04-20 11:23:21 UTC
Permalink
Thank you very very very much ))
Now it works as i need.
Post by M. Cs.
What about Quit instead Me.Close?
Post by abbat
It does not CLOSE.
Just try F5
If True then
Exec ["ls"]
Me.Close
EndIf
If True then
'Exec ["ls"]
Me.Close
EndIf
WORKS
Post by GMail
Post by abbat
Hi,
Public Sub Form_Open()
Dim a As String = 4
Dim b As String = 4
If a > b Then
Else
'Shell "ls"
Exec ["ls"]
Me.Close
Endif
End
How to "Me.Close"
Thanks
Removing irrelevant code, I get
Public Sub Form_Open()
If True then
Exec ["ls"]
Me.Close
EndIf
End
or better
Public Sub Form_Open()
Exec ["ls"]
Me.Close
End
both of which seem to execute perfectly well (i.e. as expected) here.
Please explain your problem again.
cheers
Bruce
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719872.html
Sent from the gambas-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
View this message in context: http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719937.html
Sent from the gambas-user mailing list archive at Nabble.com.
tobi
2012-04-20 15:07:20 UTC
Permalink
Post by abbat
Thank you very very very much ))
Now it works as i need.
Post by M. Cs.
What about Quit instead Me.Close?
Post by abbat
It does not CLOSE.
Just try F5
If True then
Exec ["ls"]
Me.Close
EndIf
If True then
'Exec ["ls"]
Me.Close
EndIf
WORKS
Post by GMail
Post by abbat
Hi,
Public Sub Form_Open()
Dim a As String = 4
Dim b As String = 4
If a > b Then
Else
'Shell "ls"
Exec ["ls"]
Me.Close
Endif
End
How to "Me.Close"
Thanks
Removing irrelevant code, I get
Public Sub Form_Open()
If True then
Exec ["ls"]
Me.Close
EndIf
End
or better
Public Sub Form_Open()
Exec ["ls"]
Me.Close
End
both of which seem to execute perfectly well (i.e. as expected) here.
Please explain your problem again.
cheers
Bruce
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719872.html
Sent from the gambas-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
View this message in context: http://old.nabble.com/How-to-%22Me.Close%22-with-%22Shell%22-or-%22Exec%22--tp33719245p33719937.html
Sent from the gambas-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
One remark: According to http://www.gambasdoc.org/help/lang/quit you are strongly advised to not
call Quit in a GUI application.
Willy Raets
2012-04-20 15:18:41 UTC
Permalink
Post by tobi
Post by abbat
It does not CLOSE.
Just try F5
If True then
Exec ["ls"]
Me.Close
EndIf
If True then
'Exec ["ls"]
Me.Close
EndIf
WORKS
What version of Gambas are you on? 3.1
Because I had likewise problems with TRY Exec not closing correctly and
they are fixed a revision, post 3.1.
Fix will be in upcoming 3.1.1 release.

Your problem might be caused by the same bug if your are on Gambas 3.1.
I did not have this problem in Gambas 3.0 though.
Post by tobi
One remark: According to http://www.gambasdoc.org/help/lang/quit you are strongly advised to not
call Quit in a GUI application.
I used quit as a work around as well for now until 3.1.1 gets released.

Willy

Continue reading on narkive:
Loading...