Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on April 18, 2004, 02:50:25 AM

Title: Problem attaching an Icon to a program!....
Post by: Jose on April 18, 2004, 02:50:25 AM
Assembled some source in Asm-Pro and created an object code. It's just some more console text printing to check if I understood some stuff. Tried it in the Shell and it worked fine.
Then created an Icon copying a tool .info file of another programs (tried with various actually) and renaming it to my prog's name. I took caution to delete the active tooltypes. The thing causes a recoverable alert, and after the third or fourht try (not that it makes difference but...) it crashes...

What am I missing?  :-?
Title: Re: Problem attaching an Icon to a program!....
Post by: Jose on April 18, 2004, 11:01:40 PM
...I don't even get the same guru when retrying.. :-o  :-?
Title: Re: Problem attaching an Icon to a program!....
Post by: Piru on April 18, 2004, 11:13:14 PM
Quote
What am I missing?

You're missing WBStartUp message.

You need to WaitPort your process' pr_MsgPort, and GetMsg the wbstartup message from it. Then you can continue with normal business...

When exiting you must Forbid() and ReplyMsg() the startup message you got. *NO* matching Permit() just rts.

You can see small example in my hwstartup.asm (http://www.iki.fi/sintonen/src/hwstartup/hwstartup.asm)
Title: Re: Problem attaching an Icon to a program!....
Post by: Jose on April 18, 2004, 11:41:23 PM
:oops: