Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - flyingfisch

Pages: 1 ... 58 59 [60] 61 62 ... 119
886
Casio Calculators / Re: Pack all Addins for fx9860 and Prizm
« on: January 05, 2012, 01:53:35 pm »
Cool! (I cant wait for Monday :D )

887
Casio Calculators / Re: Pack all Addins for fx9860 and Prizm
« on: January 05, 2012, 01:47:58 pm »
Oh cool!

So we can start uploading?

EDIT: Why is registration disabled? is the download center not ready yet?

888
Casio PRIZM / Re: CalGUI -- A GUI library by flyingfisch
« on: January 05, 2012, 01:46:17 pm »
you guys have a circle command  O.O
i mentioned arcs because thats how we have to draw circles
@ flyingfisch: did you download it off of ticalc, because the new version is wayyyyy better, i mean its like comparing Windows 3.1 to Windows7
anyway im probably going to upload a prerelease version for poeple to test out and comment on very soon here, like maybe tonight.
anyway have fun this is a fun type of project :)

New version???

Youll have to tell me where it is :P

889
Casio PRIZM / Re: CalGUI -- A GUI library by flyingfisch
« on: January 05, 2012, 01:03:02 pm »
I know that! I'm the guy who forc'd Veb to make that! :p
and with table = {"a" = 5}, we can make table.a = 5, I saw that with trying to make a tilemapper engine...

I was responding to nick... sorry for the miscommunication :P

What does mean "EZ menus"?
Easy menus. Kind of like CASIO-BASIC menus.

is there a big difference between luaFX and Nspire lua? otherwise this gui from jwalker could be really useful

I dont think there is a very big difference, and I am looking at jwalkers code right now :)

890
Casio PRIZM / Re: CalGUI -- A GUI library by flyingfisch
« on: January 05, 2012, 11:36:41 am »
key(0) returns true if one or more keys are pressed.

891
Casio Calculators / Re: Pack all Addins for fx9860 and Prizm
« on: January 05, 2012, 11:30:43 am »
Yay, CK works here!
Do you want just the addins, or whole files?

I'm guessing he's gonna want anything we can salvage ;)

892
Casio PRIZM / Re: CalGUI -- A GUI library by flyingfisch
« on: January 05, 2012, 11:29:22 am »
ooh, i just took a look at it, and can't you remake that
Code: [Select]
if key(1) then parse = parse .. "0" end
if key(2) then parse = parse .. "." end
if key(4) then parse = parse .. "-" end
etc etc
to a table like this:
Code: [Select]
parsetable = {
["1"]="0",
["2"]=".",
etc..
}

or isn't that possible in luaFX? it would be a lot smaller than now, so you don't need all those statements, just
Code: [Select]
parse..parsetable[tostring(key)]

Ok, so this is using classes?

does it work with the classes now? sounds great, now you're sort of the inventor of classes for casio lol

Just for LuaFX! :p

OW, 208 posts already?
What do you mean by "Just for LuaFX"?

893
Humour and Jokes / Re: Juju in danger?
« on: January 05, 2012, 11:16:20 am »
Yes, please explain... Is that your mom or brother?

894
Casio PRIZM / Re: CalGUI -- A GUI library by flyingfisch
« on: January 05, 2012, 11:14:29 am »
does it work with the classes now? sounds great, now you're sort of the inventor of classes for casio lol

looks good, and it might be alpha-of-alpha, but you have to start somewhere.. i wish you good luck with it (not sarcastic or ironically meant xp )

I understand how its meant :)

Yep, It does work with classes.

I added a repo on GitHub for this project: https://github.com/flyingfisch/CalGUI

895
Lua / Re: Lua Classes
« on: January 05, 2012, 10:19:12 am »
The principle of classes / objects is simple : you can make copies of it, you can duplicate much much time and reach a certain amount of variables that you can't manage without (or with arrays but ... well you get it).
An object represents a bunch of preperties and a bunch of methods ALL related to this "kind" of object.
That way you won't have troubles to find other function names for this, this or that. Here is an example : "vector1_toString", "vector2_toString" etc... this is bad and painful, just define it once and call the object "vector" and the method name "toString", then, make bunch of that object.

This is a general approach. Now, I'm giving you a _real_ example : Imagine a bunch of aliens sprites and a spaceship (space invaders thus). How are you going to store each aliens positions ?
You can make two arrays, one for x, one for y. Ok. But then you have to manage somthing else : the spaceship position. Another varname x and another y. You reached 2 arrays and 2 vars.
Now let's see with classes : An array of "SpaceShipSprite" objects (aliens), and another "SpaceShipSprite" object for the space ship.
Each position is object.x and object.y (for example) and you only have to manage 1 array and 1 object.

You see now ?

Secondly, classes makes your code looking clever, sperated in multiple files, each file is related for one object and co..


Oh, wow, I've been wondering how to do this for a while! Now I understand what classes are for! THX!!!! :D

896
Casio PRIZM / CalGUI -- A GUI library by flyingfisch
« on: January 05, 2012, 10:16:28 am »
NOTE: I am posting this in PRIZM projects, but since there is no LuaFX for PRIZM yet, it would be nice to have a LuaFX/AFX projects section ;)

I have been meaning to make a GUI library for a while and have only now found the time, so here it is in alpha-of-an-alpha :D

Available functions:

* Lua Classes (thanks to adriweb for code)
* Input text (missing in the originl luaFX)

Planned functions to be included:

* Buttons
* Window Manager
* EZ Menus
* Dialog boxes
* Radio Buttons
* Check Boxes
* More :D

Since this project is free and open source, and you are free to fork it if you want, here is the code: ;)

EDIT: Added a GitHub repo

Code: [Select]
-- locals
local line = graydraw.line
local wait = misc.wait
local setcolor = graydraw.setcolor
local text = graydraw.text
local exitprog = misc.exit
local print = nbdraw.print
local find = string.find
local setCursor = nbdraw.setcursor
local strsub = string.sub
local strlen = string.len

--[[--
CalGUI (Pronounced Cal-gew-ey), a GUI library for LuaFX
By flyingfisch
Last Updated 1/05/2012
This project is free and open source.
--]]--

--[[--
Class definition system
Borrowed from LuaNspire
Thanks to adriweb for code
--]]--
class = function(prototype)
    local derived = {}
    local derivedMT = {
        __index = prototype,
        __call  = function(proto, ...)
            local instance = {}
            local instanceMT = {
                __index = derived,
                __call = function()
                    return nil, "ERROR: Attempt to invoke an instance of a class"
                end,
            }
            setmetatable(instance, instanceMT)
            if instance.init then
                instance:init(...)
            end
            return instance
        end,
    }
    setmetatable(derived, derivedMT)
    return derived
end

--[[--
Input text system
--]]--
function input()
setcolor(false) --set 5-color mode "false"
i = 1
parse = ""
print(parse .. "_")
--keystrokes
while not key(5) do
repeat
--non-alpha:
if alpha == 0 then
if key(1) then parse = parse .. "0" end
if key(2) then parse = parse .. "." end
if key(4) then parse = parse .. "-" end
if key(6) then parse = parse .. "1" end
if key(7) then parse = parse .. "2" end
if key(8) then parse = parse .. "3" end
if key(9) then parse = parse .. "+" end
if key(10) then parse = parse .. "-" end
if key(11) then parse = parse .. "4" end
if key(12) then parse = parse .. "5" end
if key(13) then parse = parse .. "6" end
if key(14) then parse = parse .. "*" end
if key(15) then parse = parse .. "/" end
if key(16) then parse = parse .. "7" end
if key(17) then parse = parse .. "8" end
if key(18) then parse = parse .. "9" end
if key(19) then parse = strsub(parse,1,#parse-1) end
if key(33) then alpha = 1 end
--alpha:
else
if key(1) then parse = parse .. "z" end
if key(2) then parse = parse .. " " end
if key(3) then parse = parse .. [["]] end
if key(6) then parse = parse .. "u" end
if key(7) then parse = parse .. "v" end
if key(8) then parse = parse .. "w" end
if key(9) then parse = parse .. "x" end
if key(10) then parse = parse .. "y" end
if key(11) then parse = parse .. "p" end
if key(12) then parse = parse .. "q" end
if key(13) then parse = parse .. "r" end
if key(14) then parse = parse .. "s" end
if key(15) then parse = parse .. "t" end
if key(16) then parse = parse .. "m" end
if key(17) then parse = parse .. "n" end
if key(18) then parse = parse .. "o" end
if key(19) then parse = strsub(parse,1,#parse-1) end
if key(21) then parse = parse .. "g" end
if key(22) then parse = parse .. "h" end
if key(23) then parse = parse .. "i" end
if key(24) then parse = parse .. "j" end
if key(25) then parse = parse .. "k" end
if key(26) then parse = parse .. "l" end
if key(27) then parse = parse .. "a" end
if key(28) then parse = parse .. "b" end
if key(29) then parse = parse .. "c" end
if key(30) then parse = parse .. "d" end
if key(31) then parse = parse .. "e" end
if key(32) then parse = parse .. "f" end
if key(34) then parse = parse .. "r" end
if key(33) then alpha = 0 end
end
wait(2) --interrupt
until key(0)

clear nil
setCursor(1,1)
print(parse .. "_")

refresh

if key(5) then break end --check for EXE
wait(3)
end
end

897
Lua / Re: Lua Classes
« on: January 05, 2012, 09:43:12 am »
OK, so now my question is, what is so special about classes and how can I take advantage of them?

And thanks for answering all my stupid questions jimbauwens :)

898
Miscellaneous / Re: Happy New Year!
« on: January 05, 2012, 09:30:32 am »
Code: [Select]
0 -> world

899
Computer Projects and Ideas / Re: My Beowulf Cluster
« on: January 05, 2012, 09:24:54 am »
How hard is it to set something like this up? I would like to try it.... maybe :P

900
Humour and Jokes / Re: Juju in danger?
« on: January 05, 2012, 09:19:13 am »
lol... little bro?

Pages: 1 ... 58 59 [60] 61 62 ... 119