SmallBasic : List of Fremy's bugs and suggesions

Here's a maintained list of bugs and suggestion for Small Basic
If you have suggestions or bugs to repport, you can put comment on this page or use the forum of SmallBasic (when it will work, because he's down at this time).

[0.2-all] Bad Mouse.HideCursor / Mouse.ShowCursor gesture
The cursor doesn't always appear/dispear on demand. Sometimes, we need a lot of try to do the job.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
' Variables
SMouse = 0
XMouse = 0
YMouse = 0
DeltaMouseX = 0
DeltaMouseY = 0
IsMouseVisible = 0

' Init window
InitWindow()

Sub InitWindow
GraphicsWindow.MouseMove = OnMouseMove
GraphicsWindow.MouseDown= OnMouseDown
SMouse = GraphicsWindow.AddRectangle(10,10)

GraphicsWindow.FillRectangle(GraphicsWindow.Width-10,0, 10, GraphicsWindow.Height)
GraphicsWindow.FillRectangle(0,0, 10, GraphicsWindow.Height)
GraphicsWindow.FillRectangle(0,0, GraphicsWindow.Width, 10)
GraphicsWindow.FillRectangle(0,GraphicsWindow.Height-10, GraphicsWindow.Width, 10)

GraphicsWindow.Show()
EndSub

Sub OnMouseDown
GraphicsWindow.ShowMessage(IsMouseVisible,"")
EndSub

Sub OnMouseMove
CalcMousePos()
DetermineIfMouseIsVisible()
If IsMouseVisible = "True" Then
For x = 0 To 10000
Mouse.HideCursor()
EndFor
GraphicsWindow.MoveShape(SMouse, XMouse, YMouse)
Else
For x = 0 To 10000
Mouse.ShowCursor()
EndFor
GraphicsWindow.MoveShape(SMouse, -20, -20)
EndIf
EndSub

Sub CalcMousePos
XMouse = GraphicsWindow.MouseX
YMouse = GraphicsWindow.MouseY
DeltaMouseX = Mouse.MouseX - GraphicsWindow.MouseX
DeltaMouseY = Mouse.MouseY - GraphicsWindow.MouseY
EndSub

Sub DetermineIfMouseIsVisible
IsMouseVisible = "False"
If Mouse.MouseX-10 > DeltaMouseX Then
If Mouse.MouseX+10 < DeltaMouseX+GraphicsWindow.Width Then
If Mouse.MouseY-10 > DeltaMouseY Then
If Mouse.MouseY+10 < DeltaMouseY+GraphicsWindow.Height Then
IsMouseVisible = "True"
EndIf
EndIf
EndIf
EndIf
EndSub

[0.2-all] It's not possible to follow the mouse outside the window's workarea
There's no 'Mouse.*' events that apply to the whole screen, and the GWin's events are called not quickly enough, so the mouse can leave the form form a non-border position (the last onmousemove event that get called is not the last real move on the form)

Workaround :
Use a loop and watch for Mouse.MouseX/Y change

'' Endless Main Loop
' While "True"="True"
'   DetermineIfMouseIsVisible()
'   If (IsMouseVisible="False") Then
'     Mouse.ShowCursor()
'   Else
'     Mouse.HideCursor()
'   EndIf
'   Program.Delay(250)
' EndWhile
' GraphicsWindow.ShowMessage("I will never be reached","")

[0.2-all] The GraphicWindow is auto-shown when we first set a property, even if Hide() was called just before
' We ask to don't show the window
GraphicWindow.Hide()

' We make the interface ready to be shown
' PROBLEM : THE WINDOW IS SHOWN AT THE FIRST INIT THING
InitWindow()

' We ask to show the window, but the window is already shown
GraphicWindow.Show()


[0.2-all] It's not possible to add events to shapes or know which element is hovered
We have no easy way to know when the user clicked on a shape, we need to compute it manually with the coordinates of the mouse and of the shape; it's even more difficult if we're playing with ellipses...

[0.2-all] It's not possible to do actions on images
There's no way to consider an image as a shape (and then get the ability to move them, ...)

[hided function] It's not possible to compile the code in a *.exe
It would be great to have an option in saving : *.sb or *.exe (the *.exe can be easily reopened later if you put the .sb code in a resource of the .exe) EDIT : The *.exe is automatically created when you click on the 'Run' button

 

Ce post vous a plu ? Ajoutez le dans vos favoris pour ne pas perdre de temps à le retrouver le jour où vous en aurez besoin :
Publié 24 décembre 08 01:23 par FREMYCOMPANY
Classé sous : ,

Commentaires

Pas de commentaires
Les commentaires anonymes sont désactivés

About FREMYCOMPANY

François REMY est un jeune développeur belge plein d'entrain qui traite surtout des technologies du web et de DotNet dans ses articles.


Les 10 derniers blogs postés

- [SharePoint] Les sessions TechDays 2012… par Le blog de Patrick [MVP SharePoint] le il y a 4 heures et 30 minutes

- TechDays Paris 2012 : Session pleinière jour 3 par Blog Technique de Romelard Fabrice le 02-09-2012, 11:01

- Mishra Reader : un lecteur RSS très Zune Style en Open Source ! par Cyril Sansus le 02-09-2012, 08:28

- [framework 4] Les Tasks et le Thread UI par Fathi Bellahcene le 02-09-2012, 00:33

- Workflow Foundation 3 a un pied dans la tombe par Blog de Jérémy Jeanson le 02-08-2012, 22:15

- TechDays Paris 2012 : Nouvelles tendances du poste de travail - Bring Your own PC par Blog Technique de Romelard Fabrice le 02-08-2012, 19:42

- TechDays Paris 2012 : System Center Service Manager 2012 Vue d’ensemble par Blog Technique de Romelard Fabrice le 02-08-2012, 17:32

- TechDays Paris 2012 : Pleinière second jour par Blog Technique de Romelard Fabrice le 02-08-2012, 16:23

- TechDays Paris 2012 : Retour d'expérience sur la mise en place d'un Cloud Privé par Blog Technique de Romelard Fabrice le 02-08-2012, 16:04

- TechDays Paris 2012 : Comment SharePoint a sauvé mes TechDays par Blog Technique de Romelard Fabrice le 02-07-2012, 23:59




Search

Go

Ce blog

Abonnements