Forum Replies Created
-
AuthorPosts
-
Questions:
there’s a way to change/to get the size of a widget? I’ve looked at View and there are some Property (Rect, Frame etc) – but I get always ‘0’ as result.
Secondly, ProgressBar widget, well, it isn’t a ‘real’ progress bar… I haven’t found any ‘value/position’ field in View. I think it should be renamed in something else and a ‘proper’ progress bar should be implemented (… I’m thinking to create it as exercise, once I’ll understand better mojox/MX2)
@Jessi: MMM… I don’t understand your question!
Found a possible solution using Lambda() and a Global ref to txt_result! (this was the problem!)
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166#import "<std>"#import "<mojo>"#import "<mojox>"Using std..Using mojo..Using mojox..Global map_keys:=New StringMap<Button>Class MyWindow Extends Windowglobal txt_result:LabelFunction CreateMyButton:Button(_key:String,_title:String,view:DockingView)Local bn:=New Button(_title)map_keys.Set(_key,bn)'bn.Layout="float"bn.TextGravity=New Vec2f(.5,.5)'use Layout 'float'bn.Offset=New Vec2i(2,2)view.AddView(bn,"left",60)bn.Clicked=Lambda()If bnLocal vi:=Int(bn.Text)Local addv:=txt_result.TextLocal skip:IntSelect bn.TextCase "CE"txt_result.Text="0"skip=1Case "<-"addv=txt_result.Texttxt_result.Text=addv.Left(addv.Length-1)If txt_result.Text="" txt_result.Text="0"skip=1End selectIf skip=0If vi>=0 And vi<=9If addv="0" addv=""addv=addv+bn.Texttxt_result.Text=addvEnd IfEnd IfEnd IfEndReturn bnEndMethod New()Super.New( "Calculator",320,200,WindowFlags.Center )#remresultx % 1 /7 8 9 *4 5 6 -1 2 3 ++ 0 , =#endLocal mainView:=New DockingViewLocal v_display:=New DockingViewLocal v_command:=New DockingViewLocal v_num3:=New DockingViewLocal v_num2:=New DockingViewLocal v_num1:=New DockingViewLocal v_num0:=New DockingViewmainView.MaxSize=New Vec2i(320,480 )CreateMyButton("+-","+-",v_num0)CreateMyButton("0","0",v_num0)CreateMyButton(".",".",v_num0)CreateMyButton("=","=",v_num0)CreateMyButton("1","1",v_num1)CreateMyButton("2","2",v_num1)CreateMyButton("3","3",v_num1)CreateMyButton("+","+",v_num1)CreateMyButton("4","4",v_num2)CreateMyButton("5","5",v_num2)CreateMyButton("6","6",v_num2)CreateMyButton("-","-",v_num2)CreateMyButton("7","7",v_num3)CreateMyButton("8","8",v_num3)CreateMyButton("9","9",v_num3)CreateMyButton("*","*",v_num3)CreateMyButton("CE","CE",v_command)CreateMyButton("C","C",v_command)CreateMyButton("<-","<-",v_command)CreateMyButton("/","/",v_command)txt_result=New Labeltxt_result.Text="0"txt_result.Layout="float"txt_result.TextGravity=New Vec2f(.99,.5) '<---- no working :/txt_result.Style.SkinColor=Color.Greyv_display.AddView(txt_result,"left")mainView.AddView(v_display,"top")mainView.AddView(v_command,"top")mainView.AddView(v_num3,"top")mainView.AddView(v_num2,"top")mainView.AddView(v_num1,"top")mainView.AddView(v_num0,"top")' mainView.Layout="fill-x"ContentView=mainViewEndEndFunction Main()New AppInstanceNew MyWindowApp.Run()EndOk, it’s not very ‘beautiful’ code, just written it to test if the logic works.
Now it’s time to sleep, thanks again!
Oh! Thanks!
I didn’t noticed that folder!
Just a question: how many times this new computer should be faster then the actual one you are using?
The ‘incremental’ power (in CPU/GPU/HD speed/Memory speed) in the last years is getting lower and lower…
I still have an AMD Phenom II X4 955+4GB RAM+gfx Radeon HD5700, and an ‘old’ HD – and sometimes I get the ‘monkey’ to change everything… then ask myself for what and stop thinking
ps: just read that AMD has shown its last ZEN CPU (no sure when it is sold, maybe at the start of the next year). I would way just a moment only to see an hoped fall in the price and a little bit more competition on the CPU field (Intel prices are just a little too high for my tastes!).
Cheers
Found the problem: a (damned!) typo in the env_windows.txt file for the MINGW path (!)
Now everything is working (no need to change other MINGW parameters around).about the idea of different version (of a module):
it would be possible (of course this means a *little* rewriting of the tools …) having – for each module – a subdir (like 100) that represents a specific version.
Monkey123456789101112mojox100mojox.monkey2action.monkey2console.monkey2...103mojox.monkey2action.monkey2console2.monkey2...If there’s no the required version, the compiler uses the current one (ie: 103) otherwise what needed from the user.
The main advantage is that the ‘first’ level of the module structure (emscripten, freetype, gles20 ecc) is like the actual one, only internally could be different version available.
Sure there is the risk of duplication in files.Moreover ‘beta’ version could just be downloaded & installed in the ‘current’ MX2 folder (unless – of course of big changes in mx2 itself).
@Mark
I will try to remove any other refer to MinGW in path, BUT as I’m using Bmax I suspect it will break things somewhere
About Ted2:
It would be useful some ‘info’ report:
- mx2cc version
- Ted2 version
- MinGW version / path
etc
Just to know what user is using.
Another question: maybe I’m wrong, but I remember you are thinking about some info about ‘internal version’ for each modules. Is still a valid thing or not?
In this way (refering to AdamStrange) anyone could use a ‘determinated’ version of that module (ie:mojox.101 when the latest one is mojox.103)
No idea how to implement it in the parser/compiler!Ok
- I download and installed MX2 v103.
- Copied the ‘devtools’ (from MX2 v100) into the new one.
- Launched the rebuildall.bat
I did point 3 many times… too many!
At the end I found the ‘ted2’ v.2 (the new one), mx2cc reports v.1.0.3… but once I try to compile everything (in this case the hello-world.monkey2 example) I get a mountain of errors!
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111Linking E:/mx2-103/hello-world.buildv1.0.3/desktop_debug_windows/hello-world.exeBuild error: System command 'g++ -static -m32 -mwindows -o "E:/mx2-103/hello-world.buildv1.0.3/desktop_debug_windows/hello-world.exe" -Wl,@tmp/lnkFiles1.txt' failed.g++ -static -m32 -mwindows -o "E:/mx2-103/hello-world.buildv1.0.3/desktop_debug_windows/hello-world.exe" -Wl,@tmp/lnkFiles1.txtE:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(mojo_0input_02device.cpp.o): duplicate section `.rdata$_ZTV8bbObject[__ZTV8bbObject]' has different sizeE:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(mojo_0input_02device.cpp.o): duplicate section `.rdata$_ZTV8bbGCNode[__ZTV8bbGCNode]' has different sizeE:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o): duplicate section `.rdata$_ZTVN10bbFunctionIFvvEE3RepE[__ZTVN10bbFunctionIFvvEE3RepE]' has different sizeE:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o): duplicate section `.rdata$_ZTV8bbObject[__ZTV8bbObject]' has different sizeE:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o): duplicate section `.rdata$_ZTV8bbGCNode[__ZTV8bbGCNode]' has different sizeE:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o): duplicate section `.rdata$_ZTV7bbArrayI8bbStringLi1EE[__ZTV7bbArrayI8bbStringLi1EE]' has different sizeE:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o): duplicate section `.rdata$_ZTV8bbGCRoot[__ZTV8bbGCRoot]' has different sizeE:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o): duplicate section `.rdata$_ZTV8bbGCNode[__ZTV8bbGCNode]' has different sizeE:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1fiber_2native_2fiber.cpp.o): duplicate section `.rdata$_ZTVN10bbFunctionIFvvEE3RepE[__ZTVN10bbFunctionIFvvEE3RepE]' has different sizeE:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbstring.cpp.o): duplicate section `.rdata$_ZTV7bbArrayI8bbStringLi1EE[__ZTV7bbArrayI8bbStringLi1EE]' has different sizeE:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbstring.cpp.o): duplicate section `.rdata$_ZTV8bbGCNode[__ZTV8bbGCNode]' has different sizeE:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o): duplicate section `.rdata$_ZTV7bbArrayI8bbStringLi1EE[__ZTV7bbArrayI8bbStringLi1EE]' has different sizeE:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o): duplicate section `.rdata$_ZTV8bbGCNode[__ZTV8bbGCNode]' has different sizeE:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbgc.cpp.o): duplicate section `.rdata$_ZTV8bbGCNode[__ZTV8bbGCNode]' has different sizeE:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o):timer.cpp:(.text+0x176): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o):timer.cpp:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o):timer.cpp:(.eh_frame$_ZN10bbFunctionIFvvEED1Ev+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/mojo/mojo.buildv1.0.3/desktop_debug_windows/mojo.a(_1_1_1timer_2native_2timer.cpp.o):timer.cpp:(.eh_frame$_ZN10bbFunctionIFvvEE3RepD1Ev+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.text+0x1e1): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.text+0x1f7): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.text+0x20d): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.text+0x306): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.eh_frame$_ZN8bbStringD1Ev+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.eh_frame$_ZN8bbStringplEPKc+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.eh_frame$_ZN7bbArrayI8bbStringLi1EE2atEi+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1misc_2native_2filesystem.cpp.o):filesystem.cpp:(.eh_frame$_ZN7bbArrayI8bbStringLi1EE6dbEmitEv+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1fiber_2native_2fiber.cpp.o):fiber.cpp:(.text+0x492): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1fiber_2native_2fiber.cpp.o):fiber.cpp:(.text+0x521): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1fiber_2native_2fiber.cpp.o):fiber.cpp:(.text+0x584): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/std/std.buildv1.0.3/desktop_debug_windows/std.a(_1_1_1fiber_2native_2fiber.cpp.o):fiber.cpp:(.eh_frame+0x13b): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/libc/libc.buildv1.0.3/desktop_debug_windows/libc.a(_1_1_1native_2libc.cpp.o):libc.cpp:(.text+0x11f): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/libc/libc.buildv1.0.3/desktop_debug_windows/libc.a(_1_1_1native_2libc.cpp.o):libc.cpp:(.text+0x135): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/libc/libc.buildv1.0.3/desktop_debug_windows/libc.a(_1_1_1native_2libc.cpp.o):libc.cpp:(.text+0x3b1): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/libc/libc.buildv1.0.3/desktop_debug_windows/libc.a(_1_1_1native_2libc.cpp.o):libc.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbmonkey.cpp.o):bbmonkey.cpp:(.text+0xdd): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbmonkey.cpp.o):bbmonkey.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbstring.cpp.o):bbstring.cpp:(.text+0x888): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbstring.cpp.o):bbstring.cpp:(.text+0x89e): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbstring.cpp.o):bbstring.cpp:(.text+0x8b4): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbstring.cpp.o):bbstring.cpp:(.eh_frame+0x157): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.text+0x112): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.text+0x21c): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.text+0x3e6): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.text+0x846): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.text+0xcde): undefined reference to `_Unwind_Resume'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.text+0xdc4): more undefined references to `_Unwind_Resume' followE:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.eh_frame+0xcb): undefined reference to `__gxx_personality_v0'E:/mx2-103/modules/monkey/monkey.buildv1.0.3/desktop_debug_windows/monkey.a(_1_1_1native_2bbdebug.cpp.o):bbdebug.cpp:(.eh_frame$_ZSteqNSt6thread2idES0_+0x13): undefined reference to `__gxx_personality_v0'collect2.exe: error: ld returned 1 exit status***** Fatal mx2cc error *****Internal mx2cc build errorWhat’s wrong???
Hi
In mojo, class App, method Terminate there is a call to libc.exit_(0)
Maybe it’s possible to change the value hacking the methods.
But to be honest I don’t know if the function writes something to the standard output, or what actually id does – I don’t really find myself in the MX2 source structure!
edit:
A possible solution (not tested) – intercepting the Event.WindowClose you could use Print “Something” before calling App.Terminate(). Of course in case of crash I suppose this can’t happen
Thanks
I’m starting from the ‘basis’… so porting old programs/algorithms I think is the best way to understand MX2 and the differences/features.
I’m thinking I need to create a ‘conversion-library’ to manage ‘old’ code (Sind is much better than Sin(Rad(n))…)
By the way, I think it should be available by default in the Math module some functions for translating from Radian to Degree and viceversa.
Nevermind
MX2 uses RADIAN, while BMAX degree.
Solved & closed!!!
Ps: I should have read BEFORE the manual!!!
Already said/written many times before (in any of the BRL’s forum :D!)
Sure, there are ‘technical’ limits: each site has an own forum, this one (site) is based on WP, the others no. So a joining between different databases is really complicated.
The most logic solution should be an unique ‘entry point’… then the user could decide to follow ‘legacy’ products (BlitzMax/Blitz3D/BlitzPlus) – Mx1 or MX2.
Some advantages?
- Just ONE gallery (for example) with all the projects (just add a tag for clarify what products is used – Blitz3d/Bmax/MX…)
- One repository for every products: a ‘download’ section
- One site where post announces/news – for everyone, not only for Mark (no needs to make copy & paste!)
- One ‘support me’ page
- One site to manage!
To be honest remember this site is very hard, typing it harder (monkey2.monkey-x.com)…
A better (and logic) name ? … WHERE (if not already used internally for something… I’ve read about it in the blog maybe – something related to For..Next I believe)
In any case – maybe – I missed the point, in MX1 there’s a bunch of #preprocessor directives (#If, #ElseIf etc).
What should be the difference (except the compiler behaviour) ? Just use #IF
Thanks!
I’ll keep track of future changes on this.
I think String.Split() already returns a new array, so you don’t have to use “New” or specify the size before calling it!
Thanks – I know I’ve did something wrong in the syntax!
I think I’ll add these informations directly in the modules section/monkey-types/array http://monkey2.monkey-x.com/modules-reference/
-
AuthorPosts