sb / smallbasic-editor

Home to the Small Basic editor (beta)
https://smallbasic-publicwebsite-code.azurewebsites.net/
MIT License
101 stars 34 forks source link

GraphicsWindow.Title causes syntax error #69

Closed nonkit closed 5 years ago

nonkit commented 5 years ago

Setting title like following code causes syntax error in SBO v1.0 but does nothing in SBO v0.91 (https://smallbasic-publicwebsite.azurewebsites.net/Program/Editor.aspx).

GraphicsWindow.Title = "Hello!"
nonkit commented 5 years ago

GraphicsWindow.Left and GraphicsWindow.Top have the same behavior. Sample code:

GraphicsWindow.Left = 0
GraphicsWindow.Top = 0
GraphicsWindow.DrawText(10, 10, GraphicsWindow.Left + ", " + GraphicsWindow.Top)
OmarTawfik commented 5 years ago

Because there are no windows in a browser, not a title to set :) This was valid in the desktop editor, because a separate program is launched, not a part of your webpage.

OmarTawfik commented 5 years ago

Please feel free to reopen if you have thoughts on how this action can be feasible in a browser.

nonkit commented 5 years ago

Reason why I report this issue is that SBO v0.91 doesn't have this issue.

OmarTawfik commented 5 years ago

@nonkit but what would such a utility do in a browser? what is the proposal here? :)

nonkit commented 5 years ago

@OmarTawfik my proposals is that do nothing but be able to set/get GraphicsWindow.Title/Left/Top. This will be allow to run many existing SBD programs.

(SBO v0.91 can set/get GraphicsWindow.Left/Top and can set GraphicsWindow.Title. Silverlight version of SB can set/get GraphicsWindow.Left/Top/Title and work well like below.)

Sample GW Title Left Top

OmarTawfik commented 5 years ago

That makes sense. There is a few other tiny libraries that might work like that as well. I'll have to look into the rest.