Blog
Page: 0 ... 5 ... 10 ... 15 ... 20 ... 25 ... 30 ... 35 40 41 42 43 44 45 46 47 48 ... 50 ... 55 ... 60 ... 65
The Franken-Scriptor Lives!
Date: 20/12/2006
Well after a fair bit of hacking and QA I've got the script engine in Scribe running some non-trivial scripts. In test11 you'll be able to create scripts and have them hang off the tools menu of the main window. Just put a ".script" file in "./Scripts" under Scribe.exe and it'll get inserted in the Tools menu. Inside the script you need to define a "Main" function in LGI script (see i.Mage's help for documentation) which will get run when you select the menu item that corrasponds to the script.

I'm initially converting the existing bottom 3 "utility" style commands on Tools menu to script to test the system. So far the first one looks like this:
//
// Deletes all the attachments in the current folder after asking the user.
//
// MenuText = Delete all attachments in current folder
// MenuStrRef = 1266
//
function Main(App)
{
    Folder = App.CurrentFolder;

    Print("Folder='" + Folder.Path + "'\n");

    if (Folder)
    {
        if (Folder.Type == 0xAAFF0001)
        {
            Load(Folder);

            Bytes = 0;
            Count = 0;
            Len = Folder.Length;
            
            for (i=0; i<Len; i++)
            {
                t = Folder.Item[i];
                if (t)
                {
                    Attachments = t.Attachments;
                    for (n=0; n<Attachments; n++)
                    {
                        a = t.Attachment[n];
                        if (a)
                        {
                            Bytes += a.Length;
                            Count++;
                        }
                    }
                }
            }

            if (MsgBox( App,
                        "Do you want to delete " + Bytes + " bytes in " + Count + " attachments?",
                        Name,
                        4) == 6)
            {
                for (i=0; i<Len; i++)
                {
                    t = Folder.Item[i];
                    if (t)
                    {
                        Attachments = t.Attachments;
                        for (n=0; n<Attachments; n++)
                        {
                            a = t.Attachment[n];
                            Delete(a);
                        }
                    }
                }
            }
        }
        else
        {
            MsgBox(App, "Folder doesn't contain mail.", "Delete Attachments");
        }
    }
    else
    {
        MsgBox(App, "No current folder?", "Delete Attachments");
    }
}


And that works fine. It's a little rough around the edges but it works as advertised. I had to fix a few things in the script engine and also add some more functions and fields in to the objects.

I hope to convert the other 2 tools into script before I release test11. Sometime after the release I'll document the language and commands here. As the old scripting plugin is deprecated, I may as well use that page from something useful.
(2) Comments | Add Comment

Calendar Recurring Rules UI
Date: 19/12/2006
I had a read of the iCalendar RFC and decided that my previous recurring UI attempt was not flexible enough, and so I redesigned the UI somewhat. This is a shot from my UI builder, obviously it'll be nicely laid out at runtime:

This time around I've added more control, although I think it's harder to understand what everything does. Basically I'm trying to expose these fields:

Rule:
	freq = [daily, weekly, monthly, yearly]
	repeat = [int]
	by day = [mon,tues,wed,thur,fri,sat,sun]
	by month = [1,12]
	by year = [year,...]
	by pos = [int]

End:
	none
	date = [dd/mm/yyyy]
	count = [int]


Basically the first 2 fields, "freq" and "repeat" generate a list of days, which then gets limited by the "By Day", "By Month", "By Year" and "By Pos" fields.

So if you wanted all the fridays in Feb, you would set Freq=Day, Repeat=1, ByDay=Fri, ByMonth=Feb.

If you wanted the 3rd Saturday in every month, StartDate=a saturday, Freq=Week, ByPos=3

Can you think of some important cases that aren't covered by this UI?
(6) Comments | Add Comment

Memecode Apps On Intel Macs
Date: 18/12/2006
Seriously, so porting to the Intel Mac has been as easy as pie, I've changed about 5 lines of code and i.Ftp starts, runs and shuts down as well as it does on the PPC machine I have. There are some issues with displaying of pixels from the toolbar.gif file that I havn't gotten to the bottom of yet but all I needed was a few byte ordering #ifdef's in the graphics library and everything just works. Universal binaries here we come! Plus I said that I would get an alpha working sometime in Jan. And I'll be taking time off over Christmas / New Year so I'll get a chance to work on it again.

Oh, yeah, btw I bought a C2D white Macbook 2.0ghz for our Christmas prez. It kicketh thine butte.
(0) Comments | Add Comment

Scribe Stable Candidate
Date: 17/12/2006
Ok, well it's almost the end of 2006, and that means a new stable release of Scribe. I've been working hard on squashing bugs the last few weeks and I think I'm getting close. The next release "Test11" will incorperate the last of the bug fixes I think are important for a stable release. We'll see how it fairs in the wild and if it's good then it'll be the first stable release. I do generally release maintainence releases throughout the year when I back port fixes from the developement branch (HEAD). For instance the current v1.88 stable build is actual "m5", or 5 releases after the original stable release.

The only thing I havn't actually fixed for Test11 is the main window behaviour between sessions. When it starts minimized to the tray the window still appears in the program bar.

If you have any other issues that are important and aren't already mentioned in the version history for Test11 then let me know.
(0) Comments | Add Comment

Scribe Test10
Date: 14/12/2006
Hi All, I was about to do a release and the cable is down. It seems that in hot weather the internet is up and down like a yoyo. But in cool weather it's rock solid for weeks. Very annoying. I would like to try ADSL, but who knows, it might suck more?

Anyway. The only thing that won't make it into this release that I really wanted to get done is the recuring calendar events. Lots of people are waiting on fixes for various things and so I will release test10 to get them on their way and then get down to work on features again.
(0) Comments | Add Comment

Danger Will Robinson: EnumDisplayDevices
Date: 1/12/2006
In the documentation for EnumDisplayDevices it tells you that you need to initialize the cb parameter of DISPLAY_DEVICE to sizeof(DISPLAY_DEVICE), fair enough. That part is obvious. In XP you can do that and then call EnumDisplayDevices multiple times with the same DISPLAY_DEVICE structure and it works as you'd expect. But in Win2k it overwrites the cb parameter with a new larger value with every call to EnumDisplayDevices, so the 2nd call overwrites the stack and your app goes kaboom!

So now you know.
(0) Comments | Add Comment