xUnitConverter (with simple calculator) www

Xlobby plugin development

xUnitConverter (with simple calculator) www

Postby art on Sat May 13, 2006 1:37 am

#
http://home.roadrunner.com/~artcrazy/pi ... verter.jpg
##
Unit Converter (with simple calculator)
###

Plug-in can convert temps, volumes, weights, etc.; metric, US and some UK... Not sure if anybody else will find use for it (my wife did :) ), but here it is (link)

Here is a screenshot:
Image
Last edited by art on Mon Mar 19, 2007 2:50 am, edited 2 times in total.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby dalanik on Sat May 13, 2006 8:58 am

cool! Hope my wife likes it and finds usefull :-)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby P3rv3rt B3ar on Sat May 13, 2006 4:37 pm

If u include cupsize convertor... mayby it will have some uses 8)
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby art on Sat May 13, 2006 5:17 pm

P3rv3rt B3ar wrote:If u include cupsize convertor... mayby it will have some uses 8)


Depends on the user you can convert them into Table spoons or tea spoons :D
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby dalanik on Wed Jun 07, 2006 9:04 am

I have a strange bug with Unit convertor.

What I tried to do: since the original screen looked to crowded for me, and anyway, one can't really read such small button-text on a TV, I decided to reduce the number of buttons by moving all of the "m->" and "->m" buttons to a category database. So far so good. It all seems to work; I have only 2 buttons now, in 1st I set ->m and in second m->.

But! When I click (or press) NUMBERS on calc, one of my categories just DISSAPEARS. If I delete that category, the same thing is happening with the other one (so it seems it's not related to category name or database)

I can return the category by going into editor and changing database to something else, and then changing it back to original one.

I don't think this is XLobby issue, as I've never seen this with other screens...

Could it be that this is happening because you use category>input instead of button>input or something related?

Thanx,

Dalibor

P.S. Oh yes - and when I press the C (clear) button, the category re-appears! How's that for a strange behaviour? :-)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby art on Wed Jun 07, 2006 1:19 pm

You're right, the original screen is too crowded; I was thinking about putting different types (volumes, weights, etc) on individual overlays, but categories seems like a great idea too….
Anyway I had to use “category>input” because of the bug in XL (I think you had a similar problem too), but I think Steven fixed that problem, so I’ll try to look at it hopefully this evening and change it back to button>input.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby dalanik on Wed Jun 07, 2006 1:58 pm

Cool, thanx. But how does that explain category box dissapearing??
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby art on Wed Jun 07, 2006 2:38 pm

If I remember correctly when you use category>input it works like a filter for categories on that screen, so when you press any number category goes blank since there are no items starting with number and that's why when you press 'clear' category re-appears = filter is set to nothing. I’m at work now, so I can’t test it, but that’s what I think is happening.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby dalanik on Wed Jun 07, 2006 7:06 pm

Yes, that must be it... I didn't even know that this existed... Hmmm, makes me wonder, what could be the practical use of this feature (I mean it wasn't just added w/o reason:-)

So it'll just go away once you switch it back to button>input. Cool.

regards,

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby art on Thu Jun 08, 2006 12:36 am

As far as practical use, in some skins I've seen it used in search fields. Personally I don't use 'search' as my music or movies are not that large...

Anyway try this dll
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby dalanik on Thu Jun 08, 2006 8:22 am

It's OK now, thanks!

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby PhilB on Fri Jun 09, 2006 6:44 pm

Hey Art,

I am adding the converter to my system and have started to build a bare bones skin using my theme to keep it simple.

It's going fine and I will share the results so that others can leverage the work if they want. Your example skin convertor was just too busy for it to be used by my kids ect...

Can you tell me how to "zero" the results of the conversion or calulator results? I dont see a way using your plugin events to do that. It would just make it look cleaner if it behaved like the calculator "CE" button. I would like CE to zero any input and clear any results.

It would also be very helpful to break:
plugin>xUnitConverter>units

into two types of units....input_unit and output_unit.

That way you could show text that looked like:

Converting "inches" to "feet" like we do for audio tracks.

Thanks,
PB
PhilB
 
Posts: 283
Joined: Sat Feb 18, 2006 6:38 pm

Postby art on Sat Jun 10, 2006 12:06 am

Hey Phil,
I've added 2 variables: input_unit & output_unit
and new command "Clear" that works like "C" button (CE only clears last input :wink: )
I only tested it for few moments (World Cup started :D ), so if you'll see any bugs let me know.
new file
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby PhilB on Sat Jun 10, 2006 8:14 pm

I built out the calculator and length screens in this skin.

http://pballai.homeip.net/Phil/Conversion%20Calculator.htm

I implemented the split unit fields in the Length screen but as you can see, the text could be more clear (ie: "in" could actually say "inches"

It would also be helpful to be able to clear the two unit fields but I did not see how to do this. It should clear on screen entry and also when you hit the clear button.

Once I get this working well, I will implement the other conversion functions.

Since each function is its own screen with its own event group, others could easily integrate only the functions they want in thier skins. The format of the screen is just a background (part of my LCARS skin) and easily replaced or removed.

Thanks,
PB
Last edited by PhilB on Sun May 25, 2008 11:59 pm, edited 1 time in total.
PhilB
 
Posts: 283
Joined: Sat Feb 18, 2006 6:38 pm

Postby art on Sun Jun 11, 2006 1:12 am

PhilB wrote:I implemented the split unit fields in the Length screen but as you can see, the text could be more clear (ie: "in" could actually say "inches"


Units have to be hard coded and each unit needs to be unique. I can change them to whatever, but different people may have different needs, so what I can do for you is to create a way where you be able to have a 'dictionary' in which you can rename units to whatever you want, like:
Code: Select all
km=kilometer
in=inch
ft=foot
yd=yard
mi=mile


If given unit is present in the dictionary, plug-in would use description on the right, if not hard coded name would be used.

PhilB wrote:It would also be helpful to be able to clear the two unit fields but I did not see how to do this. It should clear on screen entry and also when you hit the clear button.


I can add new command that will clear units - not everybody may want to clear units, input and results all at the same time, but you can always use multiple commands in one events.


Let me know if this is what you're looking for.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Next