Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

C PROBLEM in codewarrior

Status
Not open for further replies.

Dr_Doggy

Well-Known Member
hi, im only half way through my c for dummies book, but i am still having a problem with my code; basically in my c file @the "code case point" i copied the first one(which works) but the copies dont, how would I properly call the other forms with the other buttons. ?

this is the original string:

case ctlSelectEvent:
if (e.data.ctlSelect.controlID == OK1)
FrmGotoForm(Form1);
goto _default;
break;

I have been able to change the value of OK1 and the button associated, but when I use the following there is no reaction.


if (e.data.ctlSelect.controlID == OK2)
FrmGotoForm(Form2);
goto _default;
break;

to associate the buttons the sdk adds the .h file and the rsc. (to add objects easy) the attachment holds my full code. I was hoping that the structure would read the value, (but i need to call the object(?) idk which parameter it is though,
ie. controlID, ctlSelect?)

I took the problem to metrowerks forum but all they say is that they wont support me:(

this is the code i ripped:
Palm Tutorial Hello World
 

Attachments

  • new1.zip
    52.5 KB · Views: 68
Have you created form 2 ?
 
yes, thnx, but I wasn't labeling it property!! but now I am having a new problem!.

I am trying to activate the IR beam, but I am having problems with the syntax,

in the tutorial it says to use:
In a nutshell, here's how beaming works. On the sender's side:

1. user initiates beaming by tapping a button, menu item, shortcut...
2. sender initializes an ExgSocketType structure with the right values (creator ID, packet size, description, file name...)
3. sender calls ExgPut() passing the socket as an argument
4. sender calls ExgSend() passing the socket and data packet as arguments
5. sender checks return code and lets user know about beaming status
6. sender calls ExgDisconnect() passing the socket as an argument

how would a proper sequence work(look) with just the basics and no variables or feedback loops(>?
(i think i understand that there are 2 sends that happen, one with the filename+size, then after acceptance, the file bytes)
but I tried:
#define socket ('DrDo', 56, "description", "filename.txt")
ExgSocketType socket;
ExgPut(&socket)
ExgSend(&socket, &record, sizeof(record), &err) // <---err gives me an error so I set it to 0!
ExgDisconnect(&socket, err) // <---+

and it crashes palm(or locks up)

maybe my problem is that socket sets up variables / socket.ID / socket.data / socket.size , , , ect,.. but in send commands there is only socket (no dots) is that a way to call all the functions?(do they stay in order?)


Palm Tutorial Beaming
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top