bobdole369
09-20-2006, 09:38 PM
I went through the tutorial page and was building hello world in a form on the PPC. I was able to tap "Control" then "Events" in order to build the "onClick" event for the button. It worked fine. The program complied and ran as expected.
Well I put it down for a day or so, and I was messing about in VFB, and I suddenly noticed that the "Events" selection is greyed out! In fact now I cannot find a way to build any event at all! It works perfectly on the main computer, its just mysteriously greyed out for some reason. Tapping on it produces a mild beep sound as if it were an invalid selection.
If I had to recreate the same program that I did yesterday, I would now not be able to do so.
Thanks for any help you could provide :)
kornalius
09-21-2006, 02:32 AM
You need to activate the Simplified Event Handling system for the form. I told the VFB programmer to enable this feature by default for version 1.02. Look a menu item that says Simplified Event Handling or something like that I don't remember by hearth.
MagNet
09-21-2006, 02:47 PM
Hm, what's not using the simplified event handling for?
kornalius
09-21-2006, 03:00 PM
The regular Windows API way. The old way of coding for Windows. The new Simplified Event Handling allow for coding without having to deal with case statements to check for all possible events etc... The Simplified way is much more like VB or Delphi do it.
bobdole369
09-21-2006, 10:38 PM
A ha! So thats what thats all about. LOL I don't exactly remember but I do seem to recall something concerning simplified event handling. I'll poke around and find it later tonight. Thanks!
bobdole369
09-22-2006, 01:31 AM
maybe I jusr need to RTFM, but I'm still having issues. I checked simple events in vfb, and wanted to make a button that did siome math. So I opened vfb and made a button, with an onclick property that did a$=1+1;
I got a total of 63 errors, most went away when I manually edited the generated .ppl ad commented the "Snip" lines. the .ppl follows.
.
.
.
// BUTTON.PPL generated by PPC VFB v1.0 beta
[Snip-GameIntro]
[Snip-Intro]
// Form
#define Form100_ID 100
// Button
#define Button101_ID 101
#code {button.FRM#Form100}
proc Menu5001_OnClick(hWnd$, Msg$, wParam$, lParam$)
HandleEventParms
PostMessage(hWnd$, WM_CLOSE, 0, 0);
end;
#code {button.FRM#Button101}
proc Button101_OnClick(hWnd$, Msg$, wParam$, lParam$)
HandleEventParms
a$=1+1;
end;
#code {button.FRM}
[Snip-GameFormHandler]
[Snip-FormHandler]
[Snip-FormHandler]
[Snip-ControlHandler]
#code {button.FRM}
func WinMain
Global(MsgList$, Form100$, Button101$);
Global(m5000$);
Local(fnt$, keys$);
Local(p$);
List(MsgList$);
Form100$ = NewFormEx("Form100", "PPLFORM", 0, WS_VISIBLE|WS_BORDER, 0, 26, 240, 269, &FormHandler);
Button101$ = NewControl(101, "BUTTON", &ControlHandler, "Button101", WS_VISIBLE|WS_TABSTOP, Form100$, 8, 8, 72, 20);
CreateEvent("Button101", Button101$);
AddEvent(Button101$, BN_CLICKED, 101, &Button101_OnClick);
CreateEvent("Form100", Form100$);
local(keys$);
list(keys$);
if (Count(keys$) > 0)
CreateAccelTable(Form100$, keys$);
end;
m5000$ = NewMenu(Form100$, "File", 5000);
NewMenuItem(m5000$, -1, "Exit", 5001);
AddEvent(NULL, WM_COMMAND, 5001, &Menu5001_OnClick);
ShowWindow (Form100$, SW_SHOW);
SetForegroundWindow (Form100$);
#code {button.FRM#%creation}
return (true);
end;
.
.
.
and the errors... any ideas?
.
.
.
PPL compiler v.1.01 Lite
Filename : \my documents\button.ppl
Parsing...
\my documents\button.ppl
** error ** (\my documents\button.ppl) Syntax error at '[' (3,1)
** error ** (\my documents\button.ppl) Syntax error at 'SNIP' (3,2)
** error ** (\my documents\button.ppl) Syntax error at 'GAMEINTRO' (3,7)
** error ** (\my documents\button.ppl) : or , expected at ']' (3,16)
** error ** (\my documents\button.ppl) Syntax error at ']' (3,16)
** error ** (\my documents\button.ppl) Syntax error at '[' (4,1)
** error ** (\my documents\button.ppl) Syntax error at 'SNIP' (4,2)
** error ** (\my documents\button.ppl) Syntax error at 'INTRO' (4,7)
** error ** (\my documents\button.ppl) : or , expected at ']' (4,12)
** error ** (\my documents\button.ppl) Syntax error at ']' (4,12)
** error ** (\my documents\button.FRM#Form100) Syntax error at 'HANDLEEVENTPARMS' (2,5)
** error ** (\my documents\button.FRM#Button101) Syntax error at 'HANDLEEVENTPARMS' (2,5)
** error ** (\my documents\button.FRM) Syntax error at '[' (1,1)
** error ** (\my documents\button.FRM) Syntax error at 'SNIP' (1,2)
** error ** (\my documents\button.FRM) Syntax error at 'GAMEFORMHANDLER' (1,7)
** error ** (\my documents\button.FRM) : or , expected at ']' (1,22)
** error ** (\my documents\button.FRM) Syntax error at ']' (1,22)
** error ** (\my documents\button.FRM) Syntax error at '[' (2,1)
** error ** (\my documents\button.FRM) Syntax error at 'SNIP' (2,2)
** error ** (\my documents\button.FRM) Syntax error at 'FORMHANDLER' (2,7)
** error ** (\my documents\button.FRM) : or , expected at ']' (2,18)
** error ** (\my documents\button.FRM) Syntax error at ']' (2,18)
** error ** (\my documents\button.FRM) Syntax error at '[' (4,1)
** error ** (\my documents\button.FRM) Syntax error at 'SNIP' (4,2)
** error ** (\my documents\button.FRM) Syntax error at 'FORMHANDLER' (4,7)
** error ** (\my documents\button.FRM) : or , expected at ']' (4,18)
** error ** (\my documents\button.FRM) Syntax error at ']' (4,18)
** error ** (\my documents\button.FRM) Syntax error at '[' (5,1)
** error ** (\my documents\button.FRM) Syntax error at 'SNIP' (5,2)
** error ** (\my documents\button.FRM) Syntax error at 'CONTROLHANDLER' (5,7)
** error ** (\my documents\button.FRM) : or , expected at ']' (5,21)
** error ** (\my documents\button.FRM) Syntax error at ']' (5,21)
** error ** (\my documents\button.FRM) Proc or Func "&FORMHANDLER" not defined at '&FORMHANDLER' (8,88)
** error ** (\my documents\button.FRM) Proc or Func "&CONTROLHANDLER" not defined at '&CONTROLHANDLER' (10,42)
** error ** (\my documents\button.FRM) Syntax error at 'CREATEEVENT' (11,3)
** error ** (\my documents\button.FRM) : or , expected at ';' (11,39)
** error ** (\my documents\button.FRM) Syntax error at 'CREATEEVENT' (14,3)
** error ** (\my documents\button.FRM) : or , expected at ';' (14,35)
Total parsing time (253 ms)
Compiling... (1 ms)
Completion time (299 ms)
** 38 error(s), 0 warning(s)
kornalius
09-22-2006, 01:36 AM
The form generation code in the VFB on the PocketPC is not finished according to the main developer. He is working on trying to fix it up. That is one reason why we cannot release 1.02 just yet. His schedule is very loaded these days, I hope he will find time on the weekend.
bobdole369
09-22-2006, 01:53 AM
understood. Thanks for the quick reply :)
bmanske
09-22-2006, 10:10 PM
Actually, thanks for posting this. I spotted something that I hadn't accounted for in the VFB code.
I like seeing other peoples work so if you have more questions, comments or code please send them in.
kornalius
09-23-2006, 01:25 AM
Thanks Brad for passing by! Good to see you here!
bmanske
09-23-2006, 02:15 AM
Once I get the PPC VFB code sorted out, I will be here a lot more often. I've been spending almost all of my free time getting caught up with you.
Tonight I need a break, so I'm catching up on what I've been missing.
bobdole369
09-23-2006, 05:29 PM
Actually, thanks for posting this. I spotted something that I hadn't accounted for in the VFB code.
Nice, I feel useful :)
I'm no programmer, but I do know enough to be dangerous.
My goal with PPL is to write a program that monitors a data stream sent over UDP from a hardware device and display the data visually.
I'm really enjoying PPL so far, you've done away with most of the nonsense that has kept me away from programming in the past.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.