Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
150 user(s) are online (122 user(s) are browsing Forums)

Members: 2
Guests: 148

amigait, Georg, more...

Headlines

Forum Index


Board index » All Posts (thomas)




Re: Is it possible to detect when a user workbench changes screen resolution?
Not too shy to talk
Not too shy to talk



See intuition.library/StartScreenNotifyTagList. Read the autodocs for more information.

For OS 3.x check screennotify.library: http://aminet.net/package/util/libs/ScreenNotify10

Go to top


Re: Alternative to UtilityBase (for coders of all Amiga-like OSes)
Not too shy to talk
Not too shy to talk



This sounds like being a coder is a disease and coders need to be put under quarantine.

Why do you think that coders need to hide from or be protected against other users?

A public sub-forum would be completely suitable IMHO.

Go to top


Re: How remove a Timer's IO request inside a soft interrupt?
Not too shy to talk
Not too shy to talk



When a device replies to an IORequest, the ln_Type field is set to NT_REPLYMSG. When WaitIO finds ln_Type to be NT_REPLYMSG, it does not wait but simply removes the message from the port. So it is safe to call WaitIO if the message has already been replied. Of course you must make sure that your interrupt only fires for the IORequest you want to receive.


Go to top


Re: multiple YAM's
Not too shy to talk
Not too shy to talk


Do not run YAM directly but put a script like this in either drawer and run it instead:

assign YAM""
run >NILYAM:YAM



Go to top


Re: Audio Datatypes playing question.
Not too shy to talk
Not too shy to talk



Go to top


Re: Audio Datatypes playing question.
Not too shy to talk
Not too shy to talk



STM_ are methods. You need to look for attributes which are called STA_.


Go to top


Re: ChangeScreenBuffer() - can't reliably close program without OS locking-up
Not too shy to talk
Not too shy to talk



Go to top


Re: HD-rec zlib.library ?
Not too shy to talk
Not too shy to talk



Go to top


Re: Assign question
Not too shy to talk
Not too shy to talk



@MickJT

We only see that he runs Ed several times, we don't know what he does with the editor window once it is open. If the editor remains open, Ed will use the copy in memory and send a new file to it. And even if the editor window is closed, ced remains in memory if you don't end it with "Quit & die" from the menu. Appdir is another possibility.


@JosDuchIt

Seems like something has screwed up your path. Without being able to examine your system it's difficult to tell how. One possbile reason I could imagine is that the path change is not done in the startup CLI.

You need to know that the path is a local thing. Each CLI process has its own path. Using the Path command only changes the path of the CLI process it was executed in.

A child process inherits the path from its parent. So if you change the path in one Shell window and then enter NewShell into this window, the new window will have the same path as its parent.

Knowing this, the only way to have a "global" path is to set it in the initial CLI process because all other processes are created from this one.

Now, for example if for some reason you changed the section in startup-sequence from execute s:user-startup to run execute s:user-startup, all path settings done in s:user-startup only affect the child process created by run and are thrown away when user-startup ends.

Similarly if you run scripts from WBStartup which try to change the path, then these changes only affect the commands which follow in the script and are thrown away when the script ends.


Go to top


Re: Assign question
Not too shy to talk
Not too shy to talk



Is there any reason why you always do this in the S directory?

Do you have a file called CED somewhere else in your DOS path, perhaps a script file?

Enter which CED to find out.

Go to top


Re: Assign question
Not too shy to talk
Not too shy to talk


You made an assign CED: which points to Datas:Teksten/CygnusEd. Now you run CED:Ed which is equivalent to Datas:Teksten/CygnusEd/Ed. This Ed program tries to run a program called ced. The ced program is stored in Datas:Teksten/CygnusEd, too, but because Datas:Teksten/CygnusEd is neither the current directory nor belongs to the DOS path, it cannot be found.

After you change the current directory to Datas:Teksten/CygnusEd, Ed can find ced successfully.

The "ced: unknown command" message does not refer to your CED: assign. The ':' is part of the message. It says "command: unkown command" where command is ced.

You need to add Datas:Teksten/CygnusEd to the DOS path if you want Ed to always find ced.


Go to top


Re: Hosting A Website With AOS4.x
Not too shy to talk
Not too shy to talk



Go to top


Re: AmigaDOs env variable help
Not too shy to talk
Not too shy to talk


Try

delete ${test}/file.txt

Edit: better ${test}file.txt

Your code resolves to ram:/file.txt which is not correct. The right path should be ram:file.txt.

Edit2: os4 contains some new shell commands which allow to connect and split file name components. I don't remember the names, but as they refer to the similar dos.library functions, they supposedly are addpart, filepart and pathpart.

Knowing that, your delete would probably be best like this:

set testfile `addpart $test file.txt`
delete $testfile

or

delete `addpart $test file.txt`


Go to top


Re: Gadtools example with resizable listview.
Not too shy to talk
Not too shy to talk



This example does not have a sizing gadget. Actually I never put a sizing gadget into a window when working with GadTools. I layout the gadgets and calculate the needed space and then open the window with fixed size.

The problem with GadTools is that existing gadgets cannot be changed after they were created. So in order to change the window size you have do destroy and recreate the entire GUI.

To reduce flickering when resizing the window one could remove all gadgets from it on a IDCMP_SIZEVERIFY message.

Why don't you convert your programs from GadTools to ReAction? ReAction does all layouting automatically. That's much easier to program.

Go to top


Re: Using Flood()
Not too shy to talk
Not too shy to talk


Quote:

@Thomas
shouldn't fcos == cosf ?


This example was developed with Dice C long ago and it has cos with double floats and fcos with single floats.


Quote:
I had it in my head that the area functions wouldn't work.


They won't work if you don't initialise the AreaInfo in addition to the TmpRas.


Go to top


Re: Using Flood()
Not too shy to talk
Not too shy to talk



You can use AreaMove / AreaDraw / AreaEnd to fill a random area.

Here is an example: http://thomas-rapp.homepage.t-online.de/examples/piechart.c

Go to top


Re: Using Flood()
Not too shy to talk
Not too shy to talk


Quote:
I didn't realise it was the screen's rastport. I thought it was the window, so that is a definite issue.


It's the window's rastport. But all rastports share the screen's bitmap.

And as you might have seen in my source code, you should use AllocRaster instead of AllocVec(...,MEMF_CHIP). This is because RTG systems might allow to allocate raster data in FAST mem and CHIP mem is rare.

Go to top


Re: Using Flood()
Not too shy to talk
Not too shy to talk



Well, I tested it on OS 4 and you are right, it does not work, not matter what I do.

I changed your code like so:

/* Attempt to test flood fill */

#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/graphics.h>
#include <proto/intuition.h>

#include <stdlib.h>

int main (int argc,char **argv)

{
struct Window *win;

win OpenWindowTags(NULL,
        
WA_InnerWidth,    200,
        
WA_InnerHeight,   200,
        
WA_IDCMP,         IDCMP_CLOSEWINDOW IDCMP_VANILLAKEY,
        
WA_Title,         "test flood",
        
WA_FlagsWFLG_DRAGBAR WFLG_CLOSEGADGET WFLG_NOCAREREFRESH WFLG_ACTIVATE,
        
TAG_DONE);
if(
win)
    {
    
WORD centreXcentreY;
    
struct TmpRas tr;
    
UBYTE *buf;
    
short w,h;
    
struct Message *msg;
    
short mode argc atoi(argv[1]) : 1;

    
Printf ("mode = %ld\n",mode);

    
centreX = (win->Width win->BorderLeft win->BorderRight) / 2;
    
centreY = (win->Height win->BorderTop win->BorderBottom) / 2;

    
SetAPen(win->RPort1);
    
DrawEllipse(win->RPortcentreXcentreY25 ,25);

    
GetBitMapAttr (win->RPort->BitMap,BMA_WIDTH);
    
GetBitMapAttr (win->RPort->BitMap,BMA_HEIGHT);

    
buf AllocRaster(w,h);
    if(
buf)
        {
        
InitTmpRas(&trbufRASSIZE(w,h));
        
win->RPort->TmpRas = &tr;

        
SetAPen (win->RPort,2);
        
SetOutlinePen (win->RPort,1);
        
Flood(win->RPortmodecentreXcentreY);

        
win->RPort->TmpRas NULL;
        
FreeRaster(buf,w,h);
        }

    
Wait ((<< win->UserPort->mp_SigBit) | SIGBREAKF_CTRL_C);

    while ((
msg GetMsg (win->UserPort)))
        
ReplyMsg (msg);

    
CloseWindow(win);
    }

return 
0;
}


It works well on WinUAE in 3.1 and 3.9 with or without Picasso96. But on OS4 I get corrupted graphics. It does *something* but no flood fill.

Go to top


Re: Using Flood()
Not too shy to talk
Not too shy to talk


Your TmpRas buffer is too small.

From the autodocs:

Quote:

NOTES
In order to use Flood, the destination RastPort must
have a valid TmpRas raster whose size is as large as
that of the RastPort
.



The bitmap used in the RastPort is that of the screen, no matter how small the window is.

Use

GetBitMapAttr(win->RPort->BitMap,BMA_WIDTH);
GetBitMapAttr(win->RPort->BitMap,BMA_HEIGHT);
size = (((15) & ~15) / 8) * h;

Go to top


Re: Deleting files or directories, object in use
Not too shy to talk
Not too shy to talk



If a directory is still locked after a reboot, there is a simple trick: rename it to "delete_me" or similar and then reboot again. After that you should be able to delete it.

Go to top



TopTop
« 1 2 3 4 (5) 6 7 8 ... 14 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project