Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Classes can't contain Image #103

Closed
abakobo opened this issue Nov 3, 2016 · 1 comment
Closed

Global Classes can't contain Image #103

abakobo opened this issue Nov 3, 2016 · 1 comment

Comments

@abakobo
Copy link
Contributor

abakobo commented Nov 3, 2016

The following code gives a memory acces violation:

#Import ""
#Import ""

Using std..
Using mojo..

Global FOO:=New FooGlob() 'IS NOT OK

Class FooGlob
Field img:Image
Method New()
img=New Image (64,64)
End
End

Function Main()
Local FOOB:=New FooGlob() 'IS OK
Print "test"
End

@blitz-research
Copy link
Owner

No, in general globals can't be initialized with 'complex' objects like images, because globals are initialized before the app even begins, at which point stuff like OpenGL/SDL etc haven't even been initialized yet (this stuff is initialized by New AppInstance).

blitz-research pushed a commit that referenced this issue Mar 8, 2018
43463bbc Merge branch 'dev'
0aa04b88 Updated 3d template file.
2c72b18b Added patron info (#115)
9f8950c9 Changed SourceCodePro.ttf to SourceCodePro.otf due to missing 'missing' glyph.
30b71654 Merge branch 'dev'
a5e6ac96 Improved removing whitespaced trailings.
bd606b5e Added "Remove lines trailing" feature (enabled by default).
fde8e555 Bump app version.
814ecffd Improved support of array type in code completion and code tree view.
1bf57792 Now storing latest opened tab in prefs dialog.
c14b7280 Added "Rename folder", and open a *folder* by "open file on desktop".
a80fe7e2 Updated special thanks.
d40bf4d4 Added shortcut (Ctrl+Shift+D) for duplicate line or selection (#90)
e32dfab7 Added some preprocessor directives.
799ef412 Improved "fix indentation" logic.
8b747870 Added shortcut text for "Stop process" button in status bar.
652924fa Completion list - some colors added into theme file (#103)
7ab83d27 Removed IRC stuff (#105)
ab276f07 Improved "spaces as tabs" convertion. (#98)
2476c50b More work on tabulation.
2d7a16b6 New feature - using spaces as tabs! (almost done)
64219e7c Disabled tabs undocking until there is no support for multi-window apps.
8fb4bf2d Merge branch 'master' into dev
a21bf249 Themes fixes by Hezkore.
cad986d0 Fix wrong View size afer restart and reload Undock Window (#112)
3599a22a Merge branch 'v2.8.1' into dev
86369138 Fixed tabs moving after drag-n-drop them.
c67124bc Undock tabs v2 (#109)
b82b1c29 View Mod (#108)
ba39705c Fixed text.
8e6d4cf4 Fixed #101 - make locked latest file just opened by double-click (via extension association).
052102d7 Updated mojo3d app template.
846935d1 Added ".glb" support to ted2go.
1267a050 Fixed SceneDocument to work with new mojo3d.
4d2d9577 Added a record to console about building cancellation.
720be2dc Close pop-up parameter hints by Escape.
d580b2ae Fixed #92 - minor focus issue.
da00ab0b Added jumping to error line right from Console view.

git-subtree-dir: src/ted2go
git-subtree-split: 43463bbcb22a7ad759e82972a9bacd317d3bcc86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants