Thursday, February 28, 2013

LockScreen Woes! - Beware!


Being a proponent of Clipper during my DOS xBase days, I massively use ScreenLock where it will lock the screen (do not show things as they happen) and where I can start creating boxes, labels, buttons (in the DOS style sense) and a whole lot of codes and suddenly when ScreenLock is released, pooop it suddenly appears as if it is like our form in VFP these days.  That is very useful because if you don't lock the screen, you will see each line created slowly in front of your eyes (we have slower machines back then).  That also speeds up drastically my exe back then.

So I was happy that when I jumped to VFP, they created a sort of the same thing, i.e., LockScreen property.  So what does that Lockscreen do?  VFP Help says these:

Saturday, February 16, 2013

Sandstorm's Quick Search Tool

Here is another tool to help you search for files in your unit.  You can search multiple types by using asterisk (*) and you can search on multiple locations by either typing the paths straight in the box for Target Folder and/or clicking on the dotted button on the right.

This uses filer.dll that is shipped along with VFP (Home(6)).  For you to be able to use said dll on other machines though, you need to register it first using an admin account.

regsvr32 filer.dll


And here are the codes:

Sunday, February 10, 2013

Grid Showing Fonts' Name and Appearance

Here is another one that again comes from reading a need of a member inside foxite forum which is to show the list of fonts on the current computer unit in any object possible with an added minor twist, i.e., that aside from the name Arial, the font name should be displayed as well on how the font looks.


Thursday, February 7, 2013

ssClasses Image Location Poll


MK has emailed me ssClasses with one change, i.e., GETENV("TMP") is replaced with CURDIR().  However, my CURDIR() is my folder for my tables named records.  So implementing this will result to something like this:

\\myserver\myappfolder\records\clocks
\\myserver\myappfolder\records\close
\\myserver\myappfolder\records\switches 
and so on...

I cannot deny that MK really needs it like that.  However, personally, one of the reasons why I throw those images in temp folder is because I do not want my app cluttered with any of those.  But that is my personal choice.  ssClasses library no longer affects me or MK alone so I wanted your opinions as well on this.

An alternative I am thinking is this, create a public empty class in your topmost prg like this:

PUBLIC ossClassLib
ossClassLib = CREATEOBJECT('EMPTY')
ADDPROPERTY(ossClassLib,'ImagePath',GETENV("APPDATA"))

So you can control where the images will go.

I prefer an empty class over a public variable as it is less prone to affect your other variable declarations in your project.  Plus maybe in the future we will need some more of the same so all I need to do then is simply add another property to it.

Inside the class for extracting images will be something like:
STRTOFILE(STRCONV(m.lcImage1,14),ADDBS(ossClassLib.ImagePath)+'Close\BlueBar1.skz',0)

Or is there something better than that?

Another is the issue of overwriting only the images when it is not there.  Would you rather I remove skipping of extraction when the image is there or would I retain it?  If we retain it, then images won't be extracted anymore when it is there and it will be a bit faster (nanosecond difference?).  That is the PRO.  The CON is if I make any changes to the images, then those that are on your client's side won't be updated as long as those old images exist.  That is the main reason why ss_support.app simply replaces images on every run.

Two questions:
1.  Do I go for fixed CURDIR() or do we use Empty Class for image location?
2.  Do I check for images and skips overwriting if it is there or I simply overwrite it on every form run?  You won't know overwriting is done as it is very fast (nanosecond).

If you are interested to participate, please post your opinions below.  Alpha 4 will be based on your opinions.  And the sooner you can respond to this, the sooner I can touch the library.


Wednesday, February 6, 2013

ssClasses issue on cCleaner


A subscriber has been repeatedly requesting me for a major update on how ssClasses works just because one (or some) of his clients have cCleaner on their machines and said cCleaner is beating the crap out of ssClasses because most users are likewise ticking the temp folder to be among those it will clean.  And temp folder is where I decided to send images needed by ssClasses for two reasons:
  1. It is "never" restricted to the current user
  2. It is a place to store 'craps'.  You can think of the images of ssClasses as crap if you wish
But due to that constant cleaning done by users of cCleaner, then in some cases with the current design of the library, needed images for some of the classes like buttons, switches, etc.; might not appear properly on first run of your app.  Succeeding runs will have no problem.

Monday, February 4, 2013

Setting Focus to an Object via its TabIndex Value


MK has been repeatedly requesting from me if I can make ssOptSwitch totally loose focus and moves to the next control when user presses TAB and I said that unless someone showed me a way to do that via tabindex, then it can't be done.  No one showed me so it stays that way.

That default attitude of the class is not surprising considering ssOptSwitch actually is just a container comprised of several ssSwitch so it is just natural that when one switch looses focus via Enter or Tab keys, then the next switch based on tab index will receive it.  And I really cannot imagine yet how to do something like:

Thisform.Object(.tabindex).Setfocus

I was sitting in front of  my laptop Sunday afternoon as I am in the mood going through the minor bugs on Alpha 3.0 as mentioned by MK fixing those one by one until I came to his ssOptSwitch Tab request.  Suddenly I realized I have been saying all along the solution to that and that the above command can actually be translated into something like this:

Friday, February 1, 2013

ssContainer is also back!!!

Since ssButton is now part of ssClasses library, I can also move over ssContainer as the image of the title bar I used on said container is dependent on the images I used for ssButton.  I won't explain further but ssContainer has a lot more features than ssContainer 2& 3.  Just see for yourselves.  Shown is the demo form for that:


ssButton is back!!!

If you observe, I have ssButton3 & 4 in the library but no ssButton (1 & 2).  That is because those are tied up with ss_support.app.   As I am very busy these days, I cannot move outright those other classes from the old sandstorm36 library to ssClasses.  But, I was able to move this one now.  And by moving, I don't mean simply dragging and dropping the class and subclasses from the old library to the new one.  No, I have to recreate codes because I really wanted ssClasses to run on its own without the need for that outside ss_support.app.  In addition, I performed some more cleanups with the original codes plus has separated the images into a custom class.  

To make the long story short, here now is ssButton class with 10 themes and 6 colors to choose from.  I also changed some old themes with new looks as well.  Further, I added in the sample demo portion of the codes shown in editboxes just so you can follow how to use the class easily.  I won't show much images anymore here, anyway when you download the library you can play with it and see those yourself.  

For comparison, shown below are ssSwitch with Theme 18 and native VFP checkbox.  Enjoy!