PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Installation broken?

Hi! Being a complete newbie to PPL, I ran immediately into some problems. :oops:

I am using the newest version of PPL on a XP laptop and a Pocket PC(WM2003SE).

Starting PIDE produces a couple of error messages:
Tag "Web" is unknown (line 16)
and something about an index out of bounds. 8O

Testing a simple Windows API program with a few controls, I noticed that there were no styles available in the control properties window, should there be?

Compiling went through without problems but, when I run the program, no controls were visible! Same happens on the PPC. :(

Does it matter what the installation directory is? I noticed that C:\PPL\... seems to work better that, say, C:\Program Files\...

Where should the projects be stored? Does it matter? :?

Anyway, PPL seems very nice. I hope I can get it running... :lol:
karhyv,

I have tried a couple of installation locations in the past and haven't had a problem. Right now PPL is installed to
Code:
c:\program files\pocket programming language\


It also doesn't seem to matter where you choose to save the project files to. On the PC I store each project in a separate directory on
Code:
c:\PPL Projects\
On the pocket PC I put them on a storage card
Code:
\SD Card\My Documents\PPL\
and then put the directory for each project there. I use the storage card to help keep memory free on the PPC.

That error when starting PIDE isn't something I've heard of before. Can you post the complete error message here? Maybe we can figure it out then.

Assuming that you have no forms in your project, can you post the code that you are trying to compile and run? I can probably tell you why the controls aren't showing up.

If you are using forms, be aware that the Visual Form Builder for the PPC is not yet fully operational. If you have used the .FRM file to generate a .PPL file on the PPC it may or may not work. Use PIDE to generate forms until Kornalius and I nurse the PPC version of the VFB along a little more.

At matteo's request I posted a fix to the problem of the control styles showing up as funny chars. Look here for more information and to download it.

bmanske
Here are a couple of examples. This program is built almost completely with Visual Form Builder on PIDE and runs fine:

Code:

#define FORM100_ID 100
#define LABEL101_ID 101
#define BUTTON102_ID 102

#code {Basic1.frm}


#code {Basic1.frm#FORM100}
func FORM100Proc (hWnd$, Msg$, wParam$, lParam$)
ok$ = true;
case(Msg$)
WM_COMMAND:
wmId$ = LOWORD(wParam$);
wmEvent$ = HIWORD(wParam$);
case(wmId$)
1001: // Exit
PostMessage(hWnd$, WM_CLOSE, 0, 0);
return(false);
102: // Button
SetText(LABEL101$,"OK");
end;
end;
return (ok$);
end;

#code {Basic1.frm}
func WinMain
Global(FORM100$, LABEL101$, BUTTON102$, m1000$);


FORM100$ = NewForm("FORM100", "PPLForm", &FORM100Proc;);

LABEL101$ = NewControl(101, "STATIC", NULL, "LABEL101", WS_VISIBLE, FORM100$, 88, 112, 80, 16);

BUTTON102$ = NewControl(102, "BUTTON", NULL, "BUTTON102", WS_VISIBLE|WS_TABSTOP, FORM100$, 88, 56, 64, 24);

list(keys$);
if (Count(keys$) > 0)
CreateAccelTable(FORM100$, keys$);
end;

m1000$ = NewMenu(FORM100$, "File", 1000);
NewMenuItem(m1000$, -1, "Exit", 1001);

ShowWindow(FORM100$, SW_SHOW);
SetForegroundWindow(FORM100$);

#code {Basic1.frm#}

return (true);
end;


This is a modifcation of a program in "Visual PPL for Dummies" and doesn't run fine:
Code:

#define FORM1_ID 100
#define BUTTON1_ID 101
#define EDIT1_ID 102

#code {HelloWrld.frm}


#code {HelloWrld.frm#FORM1}
func FORM1Proc (hWnd$, Msg$, wParam$, lParam$)
ok$ = true;
case(Msg$)
WM_COMMAND:
wmId$ = LOWORD(wParam$);
wmEvent$ = HIWORD(wParam$);
case(wmId$)
1001: // Exit
PostMessage(hWnd$, WM_CLOSE, 0, 0);
return(false);
101: // Button
s$=GetText(EDIT1$);
s$=s$+" OK";
SetText(EDIT1$,s$);
end;
end;
return (ok$);
end;

#code {HelloWrld.frm#BUTTON1}
func BUTTON1Proc (hWnd$, Msg$, wParam$, lParam$)
ok$ = true;
case (Msg$)
WM_COMMAND:
wmId$ = LOWORD(wParam$);
wmEvent$ = HIWORD(wParam$);
case (wmEvent$)
// Put your code here
end;
// Put your code here
end;
return (ok$);
end;

#code {HelloWrld.frm#EDIT1}
func EDIT1Proc (hWnd$, Msg$, wParam$, lParam$)
ok$ = true;
case (Msg$)
WM_COMMAND:
wmId$ = LOWORD(wParam$);
wmEvent$ = HIWORD(wParam$);
case (wmEvent$)
// Put your code here
end;
// Put your code here
end;
return (ok$);
end;

#code {HelloWrld.frm}
func WinMain
Global(FORM1$, BUTTON1$, EDIT1$, m1000$);


FORM1$ = NewFormEx("FORM1", "PPLForm", 0, 0, 0, 0, 240, 269, &FORM1Proc;);

BUTTON1$ = NewControl(101, "BUTTON", &BUTTON1Proc;, "Click here", 0, FORM1$, 88, 208, 64, 24);

EDIT1$ = NewControl(102, "EDIT", &EDIT1Proc;, "=>", 0, FORM1$, 24, 64, 184, 16);

list(keys$);
if (Count(keys$) > 0)
CreateAccelTable(FORM1$, keys$);
end;

m1000$ = NewMenu(FORM1$, "File", 1000);
NewMenuItem(m1000$, -1, "Exit", 1001);

ShowWindow(FORM1$, SW_SHOW);
SetForegroundWindow(FORM1$);

#code {HelloWrld.frm#}

return (true);
end;


Maybe you can spot the problem? 8O

I tested PIDE also on my desktop machine. I got this same initial error message, it pops up before IDE appears:

Tag "Web" is unknown (line 16)


This error message shows up after the message above, also on both machines:

List index out of bounds (0)


Interestingly, I noticed that this latter error doesn't appear if the Default PPL installation Path is incorrect. :roll:

The directory problem I mentioned seems to have disappeared, it may have been a fluke, caused by the other problems.

I will test further, this is kinda interesting... :lol:
karhyv,

Are you using a .PRJ file for this project?

The 2 message handlers for the button and the edit control don't really do anything and can be deleted. Everything else looks OK to me.

In the past, I have noticed that projects built entirely within forms seem to have a problem. I haven't isolated exactly what causes it, but what happens is that the name of the main project file (the starting point for the compile) gets deleted from the first line of the .PRJ project file.

Then what happens is that when compiling, the parser for the .PRJ file sees the blank first line and goes to the second line which are the paths to the project on the PPC and on the PC. Whatever it find there it tries to compile. Is the first thing in that path, "Web"?

Open the .PRJ for the file with a standard text editor and on the blank first line put the name of the frm.PPL.

If I'm totally wrong, please zip up all of the files in the project directory and attach them to the next message and I'll try again.

bmanske
bmanske,

"Web" is nowhere on he path. Anyway, the error message comes up before any project is selected.

.PRJ file looks ok to me. The directory is zipped in the attachment.
Attachments:
HelloWrld.zip (2 KB)
karhyv,

Doesn't look like I'm going to be able to help as much as I thought. Some of the more strange problems may need to wait until Kornalius gets back. I hope that this doesn't put you off of PPL.

Here is what I did find.
First the project file is very strange. I don't think it is valid. Shortly after I opened it, my most recently used list of project in the PIDE menu dissappeared. 8O

I was able to open your form and from there I opened the property dialog for the button. I checked the WS_VISIBLE style and I did the same for the edit box. The project then ran fine for me.

I have spent some time trying but I can't duplicate the other problems.

You might try starting over and avoiding placing everything on the form. Go to the project menu and select "new" and then select "PPL Windows Project". This should create a main PPL file and a .FRM. This might avoid problems with the .PRJ file. I'll do some investigation and let Kornalius know about it.

I hope that this helps.

bmanske
Hmm, the other example program above runs fine and its project file is similar to the problematic one. :?

Even if I can get some programs to function, the PIDE is somehow badly "dysfunctional". I still can't see the styles, for instance.

Just to satisfy my curiosity, I tried an older version of PPL (03-04-2005). The same error messages came up, but - and this may be significant - the IDE malfunctioned badly. I had used that version briefly before and it worked fine, as far as I can remember. Something is definitely broken, and is doesn't get fixed even if I uninstall the program, delete all files, and purge all traces of it in the registry (and then reinstall it). :!:

Maybe this is a regional issue? Both my machines have Finnish Windows versions (W2k and XP). Or perhaps some obscure registry problem.

Thanks for your help, bmanske. I will certainly continue using PPL. :)
Karhyv,

One more thought...

In the \Windows directory look for a PIDE.INI file. Try saving that to another name and then let PIDE recreate it. Maybe the problem is in there.

bmanske
hello to all, I download the hello program too and try it. on the ide, running and tageting intel, the form dont show anything even I changed the propreties of the button as suggested by bmanske. I have window xp with italian localization... I dont know if this can help or not...