greptilian logo

IRC log for #friendlyjava, 2017-11-25

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
04:12 scl84 joined ##friendlyjava
04:12 scl84 left ##friendlyjava
08:18 xBADDA555 joined ##friendlyjava
10:16 xBADDA555 joined ##friendlyjava
11:04 xBADDA555 joined ##friendlyjava
20:06 CatButts joined ##friendlyjava
20:40 CatButts are negative keycodes used in Java?
20:40 CatButts I wanna us the sign bit as a flag
20:40 CatButts *use
20:44 CatButts that is, I make my own class that for configuring keys
20:44 CatButts and use one or two bits as flags
20:46 aditsu I don't think there are negative keycodes, but your idea sounds suspicious
20:46 CatButts purrhaps
20:48 CatButts I am farting with ideas in head
20:49 CatButts I am more of a C guy
22:05 CatButts public static void lazyNokiaN900LayoutOnlyForMe()
22:05 CatButts quality code
22:18 kirua joined ##friendlyjava
22:20 aditsu you wanna run it on an N900?
22:21 CatButts yes
22:21 CatButts Java Embedded is very similar to J2SE
22:21 CatButts the phone itself is Linux
22:22 CatButts with ARM cpu
22:23 CatButts errrr
22:23 CatButts does keycode 0 exist?
22:24 CatButts oh right, that's silly
22:24 aditsu you're talking about AWT right? VK_UNDEFINED
22:24 CatButts yes
22:31 CatButts so basically, I am doing quick hackjob to make it decently usable on a phone with limited keyboard and display
22:38 CatButts I wonder
22:38 CatButts would I be able to prevent OS from receiving certain keys and trap them inside Java?
22:39 CatButts like the volume keys
22:39 CatButts that is, if they reach Java in the first place
22:39 CatButts that I need to test
22:43 CatButts it works, but it's flaky
22:52 CatButts right, so switch cases require constant fields
22:53 CatButts but my customization involves changing those fields, before use
22:54 CatButts I might just get pissed and change switch statement to chain of if else if :P
22:54 CatButts any other suggestion?
22:58 aditsu you could probably use a Map
23:05 CatButts does Java have a precompiler?
23:05 * CatButts hides
23:05 CatButts preproccessor, rather
23:10 CatButts I guess I will have to do it manually with block comments
23:12 aditsu CatButts: it has annotation processing, don't know if it counts
23:13 CatButts https://stackoverflow.com/a/2146165 sounds promissing
23:50 CatButts speaking of quality code, a jewel from my earlier days
23:50 CatButts public boolean isTouchDevice(Canvas iCan) { return iCan.hasPointerEvents() && iCan.hasPointerMotionEvents(); }

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode