PocketMatrix forums

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

trouble with tutorial

is anyone else having trouble doing the tuturial's. I just got in and yet I have having trouble thie the hello world tutorial. I an get the button and text areas but I can not get the button to print the text for me.
Hi Deathmvp,

did you followed step by step the tutorial ?
I haven't tested the tutorial with the latest release but i'm sure 90% it's still ok.
Could you copy/paste the code of your helo world program.
You have to be carefull when creating the tutorial, if you don't respect the creation order, you probably have to adjust the signal ID.

To check the signal ID of a control in the visual form builder, double click on the file in the left project part and double-click on the control to display his ID.

The controls will receive ID following the order in which you create them.
So if you start by creating the MEMO control instead of the BUTTON, you will have to change the signal ID since your MEMO has the signal ID 101 and the button has now signal ID 102.

Also, to be sure that you start with ID 101, start the application and create a new helloworld project, and follow the tutorial step by step.

I hope you will get it working with these informations :-)

If not do not hesitate to attach your project as zipped file to the forum so we can check what's wrong in it.


Regards,
I think the issue is the settext command. I can not get it to put text even if I just put that in the main code seperated from the button. Also so that you know the automatic code from the Visual form builder tutorial does not match so I am thinking something changed. I am going to try some more then if I still can not I will post it.
I probably found your problem if your are using version 0.6
The naming convention has changed in the last version.
In the Tutorial, in the section where you have to insert the procedure, the code is no more up to date.
use this one:

proc HelloWorld
t$ = GetText(MEMO102$);
s$ = t$ + "\n"+ "Hello World !";
SetText(MEMO102$, s$);
end;

As you can see, only the name of the control has changed, so you can aslo only check in your code.
Compare the properties of you control by double-clicking in the control.
The name of the control in selected so you can copy/paste it directly to your code.
Don't forget the $ at the end of the control name.

I'm updating the tutorial, it will be updated asap. :D
still no go. :( This is my latest try. I think it is all working but the ability to put the text into the box. It is giving me no erroes and the memo box does apper over the button that I can press but it does not change anything on it when I press it. I do not know if it helps but I am trying to do this on a IPaq 3650. Any help is welcomed.
Attachments:
3 try.zip (1 KB)
I got it this time. For some reson you have to make the form. Save it then quit. You then reopen the project and the visual builder and the code has changed. To
Code:
unc 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);

Insted of :

Code:
func MEMO102Proc (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;


So it is working now. Thank you.
Ok, this seems to be out of my skills problem.
I downloaded and tested you project, it work nicely on my Qtek 2020, when i press the button it add a new line in the memo with Hello World.

Check by resetting your pocketpc and reinstalling ppl 0.6 on desktop and ppc.

I can't see any other solution, which version of windows are you using on the ppc ?

Give as much informations regarding your system to help solving your problem.

Regards,
like I said for some reson the code changes when you reopen it. When I first do it it says the following

func MEMO102Proc (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;

After saving it and reopening ( I shut the whole program down) it it changes to

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);
end;
end;
return (ok$);
end;


My ppc is on versuin 3.0.11171 (Build 11178)
Processor arm sa1110
31.15mb
with expansion slot (has 256mb card mostly for movies)

My pc is running windows xp on it and activesync is 3.7.1 I hope any of this helps.

Also so that you know the first text also does not come up as error.

Like I said after saving and reopening it it works.
Hi Deathmvp,

I will try to fix this tomorrow. I am planning on releasing version 0.6a next week by Wednesday.

Regards,
Kornalius
no problem. I just though I was going nuts as I was trying to do the turturals in order first before trying my own.
Found your problem DeathMVP. The Edit Code option is based on the component you have selected. The two codes you are showing are for two different components. The form has a code, the button has a code too. Make sure you select the right component before clicking the edit code button.

Regards,
Kornalius
You have to select the background of the form and click edit code once selected.

Check this screenshot:

http://etxredshift.cjb.net/testing/PPLf ... ge-014.jpg