https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    08/12/2022, 3:33 PM
    it might be worth thinking about a virtual cursor and a way to slow down tests... i know from working with functional tests for a project i work on, that often seeing what is going on in essential
  • l

    loud-salesclerk-7438

    08/12/2022, 3:41 PM
    yeah tests running to fast for human eyes might be an issue, especially when writing tests. there is a lot of trial and error involved to figure out how to "find" a component and then look up what properties it has. and if things happen to fast to see, then you'll end up putting
    Sys.sleep
    in your testcase to slow it down.
  • b

    bright-gpu-74537

    08/12/2022, 3:42 PM
    actually, btw, i forgot to mention, Sys.sleep isnt a great idea in general
  • b

    bright-gpu-74537

    08/12/2022, 3:42 PM
    i dunno if you just put it in the test project you send me
  • l

    loud-salesclerk-7438

    08/12/2022, 3:43 PM
    I'll have to see how to implement it in a way that you can turn it on or off. same goes for virtual cursor, you might want to have it, especially during development (and maybe on screenshots).
  • b

    bright-gpu-74537

    08/12/2022, 3:43 PM
    but it pauses the thread, so you dont really get the "up/down" events (in the sense that they arent really being processed as you think)
  • l

    loud-salesclerk-7438

    08/12/2022, 3:43 PM
    you're right, the sleep in that last test case doesn't make sense. in my lib it works because everything runs in a separate thread
  • b

    bright-gpu-74537

    08/12/2022, 3:44 PM
    ah, thats fair... makes sense
  • b

    bright-gpu-74537

    08/12/2022, 3:44 PM
    arent you then pausing the socket thread though?
  • b

    bright-gpu-74537

    08/12/2022, 3:44 PM
    timers and promises / futures certainly seem like probably a better way to go, but thats just from my (single threaded) tests - as you can see from the .hx above
  • l

    loud-salesclerk-7438

    08/12/2022, 3:46 PM
    yes, but since executing a command from a test is a "synchronous" operation (the test side waits for a response before sending the next command) pausing the socket thread has had no noticeable side effects.
  • b

    bright-gpu-74537

    08/12/2022, 3:47 PM
    hmmm, you are using my hxWebSockets right?
  • b

    bright-gpu-74537

    08/12/2022, 3:47 PM
    do you have "async handlers" set?
  • b

    bright-gpu-74537

    08/12/2022, 3:47 PM
    (i cant remember the property)
  • b

    bright-gpu-74537

    08/12/2022, 3:48 PM
    but yeah, i guess, thinking about it, even if you didnt, it wouldnt make a difference, its not like you are expecting multiple clients?
  • l

    loud-salesclerk-7438

    08/12/2022, 3:48 PM
    -D threaded_server
    and
    -D threaded_handlers
  • b

    bright-gpu-74537

    08/12/2022, 3:49 PM
    but yeah, realistically, this is just a server and (presumably) a single client... so threaded_handlers doesnt matter so much (though still cant hurt)
  • l

    loud-salesclerk-7438

    08/12/2022, 3:52 PM
    no, it's meant to be 1:1 even though my test app opens the socket server and the app connects to it (because that also works for HTML5 projects), so technically there could be multiple clients connecting to the same testing app. but as far as I know utest doesn't support running parallel tests (and no other Haxe testing framework does either), so it would still be sequential test runs.
  • b

    bright-gpu-74537

    08/12/2022, 3:53 PM
    gotcha, makes sense
  • b

    bright-gpu-74537

    08/12/2022, 3:53 PM
    so the threading doesnt really matter that much as long as the server is in a different thread to the client (which threaded_server will do)
  • b

    bright-gpu-74537

    08/12/2022, 3:54 PM
    and yeah, the sleeps wont affect the server, since you have threaded_handlers set, though, just an fyi, if you didnt you would be locking up the servers ability to accept new incoming connections everytime you did a sleep
  • l

    loud-salesclerk-7438

    08/12/2022, 3:59 PM
    new connections only come into play in between test cases, when the app is relaunched / on page reload. maybe sleeps are not an ideal solution, but so far it works for what it's supposed to do and there is always the option to implement a better version in the future when requirements change or issues arise.
  • b

    bright-gpu-74537

    08/12/2022, 4:00 PM
    cool - yeah, just highlighting as its one of the first things i noticed when i was playing around that the "down" and "up" were processed, basically and the same time because of the sleep (rather than a timer that would let events process in between)
  • b

    bright-gpu-74537

    08/12/2022, 4:01 PM
    but it sounds like its less of an issue with something more real (like haxeium) since its a multithreaded env anyway
  • l

    loud-salesclerk-7438

    08/12/2022, 4:02 PM
    I think I copied that part over from my lib code and didn't even think about it making no sense in that sample
  • b

    bright-gpu-74537

    08/12/2022, 4:02 PM
    yeah, fair enough, i kinda figured that tbh, but then i though "ah, i bet hes using sleep in haxeium" without actually thinking that it was threaded anyway 🙂
  • h

    happy-agent-4114

    08/12/2022, 10:49 PM
    I'm getting internal errors when trying to use haxeui-hxwidgets
  • h

    happy-agent-4114

    08/12/2022, 10:49 PM
    Copy code
    C:\HaxeToolkit\haxe\lib\haxeui-hxwidgets/1,4,0/haxe/ui/backend/ScreenImpl.hx:36: characters 30-45 : Field removeComponent overrides parent class with different or incomplete type
    
    C:\HaxeToolkit\haxe\lib\haxeui-core/1,3,0/haxe/ui/backend/ScreenBase.hx:73: characters 21-36 : ... Base field is defined here
    
    C:\HaxeToolkit\haxe\lib\haxeui-hxwidgets/1,4,0/haxe/ui/backend/ScreenImpl.hx:36: characters 30-45 : ... Different number of function arguments
    
    C:\HaxeToolkit\haxe\lib\haxeui-core/1,3,0/haxe/ui/core/Screen.hx:55: characters 30-45 : Field removeComponent overrides parent class with different or incomplete type
    
    C:\HaxeToolkit\haxe\lib\haxeui-hxwidgets/1,4,0/haxe/ui/backend/ScreenImpl.hx:36: characters 30-45 : ... Base field is defined here
    
    C:\HaxeToolkit\haxe\lib\haxeui-core/1,3,0/haxe/ui/core/Screen.hx:55: characters 30-45 : ... Different number of function arguments
  • h

    happy-agent-4114

    08/12/2022, 10:50 PM
    I'm not sure what's causing it, since this is an unaltered template
  • h

    happy-agent-4114

    08/12/2022, 10:52 PM
    uninstalled and reinstalled haxeui-core and it works now so whatever it was is my end
1...120912101211...1687Latest