Re: [Hecl-devel] Any objections to a new release?
Brought to you by:
davidw
From: David W. <dav...@gm...> - 2009-08-12 10:32:00
|
[ Lots of interesting stuff here - I'd encourage everyone to read this mail fully ] On Wed, Aug 12, 2009 at 2:52 AM, Zakaria<z4...@gm...> wrote: > On Wed, Aug 12, 2009 at 5:22 AM, David Welton<da...@de...> wrote: >>> 1. You haven't build the packageJarHack > >> In what sense? It gets built as part of everything else. > > The one in jars/JarHack.jar is the old version without the icon fix patch Maybe I just haven't committed it in a while? Let me update it and see if it's still old. >>> 2. How about my key-remap.patch? >>> I'll send newer one with mapping for Nokia XpressMusic and >>> Samsung SGH i550 >> Let's talk about this idea some more. Would your idea be to remap all >> keys for all phones into something standard? >> Maybe you could write a little Hecl script for everyone to try, to see >> what sorts of names various keys have on our phones... >> Ideally, we'd be able to do this without a hash table lookup for each >> value, based on the keycode, but I realize that there is a lot that's >> not ideal about x-platform j2me... > Are the keycode standardized? No: http://www.j2meforums.com/wiki/index.php/Canvas_Keycodes > I mean is the left key's keycode on one phone to another is the same? > > I'm new to this J2ME phone thing, but I got some experience coding in > J2ME for Siemens Industrial GSM modem. > > >From the point of hecl programmer comparing by standarized keyname > is easier to understand rather than comparing with some number that > represent keycode. Agreed. What I meant is that instead of looking up the name and mapping that, it would make sense to get a numeric keycode and return a name based on that? It's a complex/ugly side of Java ME though: http://www.javaeye.com/topic/179073 I think Hecl should definitely include code to make this stuff easy for people - I don't want to just push the phone mapping stuff down into people's individual Hecl scripts. I think it will take some effort, and more research, though. Wolfgang is more of an expert than I am in terms of running Hecl on a wide variety of phones, hopefully he will have a moment to comment. > Okay everyone please test your phone with the attached script. > That script also exists as an example on my Hecl-IDE.hcl attached on > previous mail. > >>> 3. How about replacing midp20\script.hcl with my Hecl-IDE.hcl? > >> It's been 'script.hcl' for a while - any particular reason to change the name? > > I mean the content, not the name. I attach it in the previous mail. Oh, oops, sorry, I didn't see that! Nice work! I like your code, and think we can use that as the code that Hecl ships with. Like the one I did for Android, I like the fact that you can view the source code and edit it. I also like the creativity. I have gone ahead and committed it, but do think it needs some modification or at least consideration of various elements. Hecl, not being widely used, doesn't have a defined style that people need to use, so that means we're also free to define things as we see fit. That said, your code is a bit different than most Hecl code I've seen (or written) so far. That's not necessarily a bad thing, but since this is going to be *the* example script, it's important that we talk about it a little bit. In particular: * The : in front of global variables. Distinguishing them like that is not a bad idea, but I'm undecided whether I'd use it myself. * proc's with :LeadingColons - I don't really see the benefit. You know from the structure of Hecl what's a proc: it's always the first word in a group. With the :globalvars, it also leads to a few too many :'s around for my tastes:-) * Hecl indentation is definitely 4 :-) There are also some things that, while I think they are good Hecl, or sensible, need some thinking about just because script.hcl has to be held to a high standard, and is something many people will likely look at. * 'Short' names. that's very handy if you're editing the script on the phone, but less so if someone is looking to grab a bit of example code and use it in their own script. * Redefining proc makes things confusing. I think it might make more sense to create your own command along the lines of AliasProc, and add a comment that it adds a bunch of aliases. Lastly, your code suggests a few things that might be interesting to add to Hecl itself: * Command aliases. Having short commands to type is nice, but the mechanism you end up using is a bit circuitous, and would be a lot easier if you could jsut write: alias /alert lcdui.alert * Anonymous commands, which you use ':' for (are you a Forth fan?:-). That requires some more experimentation, but it's an interesting idea... > OK, Alert.FOREVER works, last time I try to change to 120000 but still > not works. Maybe a bug in Alert timeout on my phone? Ok, I will test that out a bit more and then commit it. > Sure, send it out to me. But I think it's better to do some test release > so more people could test it on various phone. We can try a few; hopefully not too many people here in Europe are on vacation and can give things a test. Also, thanks! The more people get involved like this, the more it pushes me to do more to improve Hecl. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |