Feel free to use any of this you want. I'd ask that you send me a billion of whatever currency you prefer. If that's beyond your means or you just feel like that's just way too much, then, well, okay, I don't blame you. But don't get upset with me for asking. Who knows, some mind numbingly rich 4D developer may just think, 'A billion, is he nuts? I'd better send him something though, just in case he's crazy enough to be a stalker or something.'

Oh, yeah, if you feel like it, put my name in a comment in the code. However, you may want to tell your client or boss that you came up with the code. If it impresses them, they may pay you enough to become one of those insanely rich developers, desperate to keep me from stalking them.

I'm sure there are tons of other 4D developers who've done the same types of things, there's nothing new under the Sun, ya know. I just want to make any handy little bits of code I've developed available to anyone who might find them useful. Any feedback is appreciated!

Stock Stalker
Example DB
This is an example database using 4D Live Window, to track stock prices. You'll need the 4D Live Window plugin (full or demo version) to run this.

It's pretty basic, it shows stock values. But, the big cool part is that you can set a stock value to whatever you want and it will trade at that value! You control the market! Okay, well maybe that's a little far reaching. But, if you download the demo before midnight you also get a set of slightly used plastic butter knives from Burger Train!
Date Entry with Calendar
Example DB and Component
This date entery component allows you to use 4D's date fields to enter partial dates and have them interpreted properly. And that's not all, it also contains a little calendar that pops up allowing the user to point to the date if they don't want to type it. But that's now all, if you download before midnight the calendar will also include, at no extra charge, a little dancing leprechaun! Operators are standing by.
Parse To Arrays
Code Text
This takes a block of text and parses it to arrays of various types. Lets say you have a small tab delimited text file with a text name, a string 20 invoice number, invoice date and real invoice amount. Read the file then pass it along with pointers to the arrays to ParseToArrays (Text Block ; Record Delimiter ; Field Delimiter ; ->aName ; ->aInvoiceNumber ; ->aInvoiceDate ; ->aInvoiceAmount) and the arrays will be filled with the proper type of data, almost as if the Keebler Elves had done the work for you.
Parse To Array
Code Text
This takes a block of text and parses it to arrays of various types. Lets say you have a small tab delimited text file with a text name, a string 20 invoice number, invoice date and real invoice amount. Read the file then pass it along with pointers to the arrays to ParseToArrays (Text Block ; Record Delimiter ; Field Delimiter ; ->aName ; ->aInvoiceNumber ; ->aInvoiceDate ; ->aInvoiceAmount) and the arrays will be filled with the proper type of data, almost as if the Keebler Elves had done the work for you.
Array Resize
Code Text
Resizes a bunch of arrays to the same size, of any type, in a single call. This is handy when displaying arrays, like with AreaList Pro, since the arrays should all be kept the same size.
Get Table Field Pointer
Code Text
This is like 4D's GET POINTER except that it's specifically written to work with tables and fields instead of variables. You can pass a table name with or without brackets, but a field needs to be in the [Table]Field format.
Inc
Code Text
All this method does is return the next higher number each time it's called. It's handy when assigning a bunch of items to arrays, like in a dropdown menu.
Textize
Code Text
This method turns anything passed to it to text, except BLOBs, pictures and 2D arrays. So, you can pass a pointer to any field or variable, and it returns the text equivalent. Handy for exporting.
DeTextize
Code Text
This method turns text passed to it to the type of data passed as a pointer in the other parameter. If you call DeTextize("195";->[Brain]YourIQ), it would assign the proper value to YourIQ. (Use of this function will actually increase your IQ.)
Self Start
Code Text
Use SelfStart to cause a method to start in its own process. It's handier than it sounds.