Computer Science Canada Getter with filters! |
Author: | ericfourfour [ Sat Dec 16, 2006 11:46 pm ] | ||||||
Post subject: | Getter with filters! | ||||||
Edit: A new version is available down the page. I think its about time someone posted something like this. This class allows you to get input from the keyboard anywhere on the screen. You can set the font and colour as well. Another bit of functionality it adds is the ability to filter certain characters. This means you can filter white space, numbers, etc. if you feel like it. This can also be expanded upon. It still needs a cursor, the ability to highlight, undo, copy, paste, a way to manage multiple getter's, and the list goes on.
Here is a sample program:
Here is another sample using pretty much everything:
|
Author: | CodeMonkey2000 [ Sun Dec 17, 2006 7:04 pm ] |
Post subject: | |
wow, this is pretty useful. i wish i was more skilled with classes, and string manipulation stuff. oh yea, shouldnt text filter be in side the class? |
Author: | ericfourfour [ Sun Dec 17, 2006 10:59 pm ] |
Post subject: | |
Unfortunately, functions and procedures cannot be variables or parameters if they are inside the class. I have actually done a lot of work on this and it does have a cursor but I've still got a bit of tweaking to do. |
Author: | Clayton [ Sun Dec 17, 2006 11:31 pm ] |
Post subject: | |
You can kind of screw around with the passing of functions and still having some portability. Simply stick the functions you wish to pass in a module, and import the module into your class and pass the functions from there. It's not pretty, but it gets the job done. |
Author: | ericfourfour [ Sun Dec 17, 2006 11:36 pm ] |
Post subject: | |
Good idea Freakman! At its current state it is around 3 or 4 classes so being able to separate it should make it easier to work with. |
Author: | ericfourfour [ Wed Dec 20, 2006 4:24 pm ] | ||
Post subject: | |||
I updated it and it is looking great! It has been separated into units so now you can use it by simply typing:
This version has a flashing cursor. I think it alternates every 500 milliseconds. I added a module called Filters, which contains various filters. Take a look at it. It is quite simple to use. As usual there is a sample program called "test.t". |