Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
154 user(s) are online (90 user(s) are browsing Forums)

Members: 1
Guests: 153

Georg, more...

Headlines

Forum Index


Board index » All Posts (thomas)




Re: How to retrieve the owner of a Lock ?
Not too shy to talk
Not too shy to talk


Quote:
By Locking each Volumes in the DosList, I retrieve each Lock


If you lock the volume, then you are the owner of the lock.

Each call to Lock() creates a new lock and each call to Open() or OpenFromLock() creates a new file handle. The respecive caller is the owner of each.

You have to retrieve the pointer of an existing file handle or lock in order to examine it and perhaps find out its owner (if this is possible at all).


Go to top


Re: IFACE for devices in a library
Not too shy to talk
Not too shy to talk



Let the compiler help you:

#define __NOGLOBALIFACE__
#define __NOLIBBASE__

before

#include <proto/xxx.h>

Then the compiler will give you a "unknown symbol xxxBase" and "unknown symbol Ixxx" error for every required library base and interface.

Go to top


Re: Changing system language Possible ?
Not too shy to talk
Not too shy to talk


Quote:

Cass wrote:
Is there anyway to flush the already loaded .catalogs?
I was trying to track a problem with a catalog the other day and I found the following:
1. Avail flush won`t flush an already loaded catalog.
2. Scout Catalogs has just an update option, no remove. Flush all (A+.) won`t remove it either.
3. Changing Locale settings to another language after clearing the language list, just adds the new language catalog, won`t remove the old one!

Suggestions?



I'd like to know this, too. In OS 3.x you could do Avail flush, but since 4.0 this no longer works.


Go to top


Re: MUI : How to update image filename of a DTPic when running ?
Not too shy to talk
Not too shy to talk



What you say is that

strcpy (path_skin_preview,"PROGDIR:Skins/Empty.png");
set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);
strcpy (path_skin_preview,"PROGDIR:Skins/Full.png");
set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);

does not work, but

strcpy (path_init_preview,"PROGDIR:Skins/Empty.png");
set(Im_Data_png,MUIA_Dtpic_Name, path_init_preview);
strcpy (path_skin_preview,"PROGDIR:Skins/Full.png");
set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);

works?

If this is true, then DTPic might internally keep the pointer to the file name and if you set the same pointer a second time, it thinks the image didn't change and thus doesn't update the display.

Perhaps something like this works:

strcpy (path_skin_preview,"PROGDIR:Skins/Empty.png");
set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);

set(Im_Data_png,MUIA_Dtpic_Name, NULL);
strcpy (path_skin_preview,"PROGDIR:Skins/Full.png");
set(Im_Data_png,MUIA_Dtpic_Name, path_skin_preview);


Go to top


Re: Multitexturing in minigl/SDL?
Not too shy to talk
Not too shy to talk


Quote:

Spirantho wrote:
What I did to make it work was to shift each int32 in the texture up by 8 bits.



This would convert ARGB into RGBA.

Are you sure that your input data is correct? It sounds much like an endianness problem because ARGB is BGRA backwards.

If you load a file which contains raw BGRA data into memory and then read 32bit words from the memory, on a little-endian machine you get BGRA words, but on a big-endian machine you get ARGB words.


Go to top


Re: CreateMsgPort is deprecated?
Not too shy to talk
Not too shy to talk


Quote:
IExec->AllocSysObject(ASOT_PORT, ASOPORT_Name, "MyNamedPort", TAG_DONE);


This should read IExec->AllocSysObjectTags(ASOT_PORT, ASOPORT_Name, "MyNamedPort", TAG_DONE);

Otherwise it won't compile.

AllocSysObject takes a pointer to an array of struct TagItem, AllocSysObjectTags takes the tag items as varargs.




Go to top


Re: Anyway to get *un*parsed shell arguments for a portable C program?
Not too shy to talk
Not too shy to talk



I made a simple ReadArgs replacement for OS 1.3 which uses argc/argv as input and it works rather good IMO. Yes, you can surround keywords by quotation marks and they are still recognised as keywords. But I can live with that.


Go to top


Re: Anyway to get *un*parsed shell arguments for a portable C program?
Not too shy to talk
Not too shy to talk



What don't you want argc/argv? This is C standard and exists in every OS.

Go to top


Re: Diskimage.device/SFS problem...
Not too shy to talk
Not too shy to talk



Looks like you edited IDF1 (and probably others, too) to use SFS instead of OFS/FFS. ADF files are not formatted with SFS. That's the reason why they show as uninitialized for you.


Go to top


Re: minor AREXX programming question
Not too shy to talk
Not too shy to talk


Quote:

When i tryed to use your version, i have:

EXPORT: Unknown command


An ADDRESS SKETCHBLOCK is missing in front of it. I changed the global address to COMMAND because there are many commands sent to COMMAND but only two commands sent to SKETCHBLOCK. Forgot to change the second one.

Quote:

Also after reading a script briefly, i see that if .info was here initially, then " " symbols are strips, and so, output will be not "RAM DISK:aaa.info", but without " ", and conversion will not works because of space. So i add some stuff here:


That's right. I forgot this because usually I don't put quotation marks into the variable which holds the file name but into the command line. This script is different.

Quote:

Also seems that part:

Works only when no file name was given, but it didn't triggers when i press "chancel" in asl requester.


What does outfile contain if cancel is pressed?


Quote:

It is need it (to save mask separately from file, and to have in end normal png with transparency, which in end can be normally converted to icon)


I know how the process works. My criticism was about using fixed global file names in one place but trying to use process-dependent unique file names in another place. If you use hard-coded ram:xyz in one place you can skip the effort to create unique names in the other places, too.


Go to top


Re: minor AREXX programming question
Not too shy to talk
Not too shy to talk


Here is a revised version (not tested, though):

/* save as AmigaOS4 icon */

/* requires:
NetPBM  http://os4depot.net/share/graphics/convert/netpbm.lha
pngicon2amiga http://os4depot.net/share/graphics/convert/pngicon2amiga.lha
*/

ADDRESS COMMAND
options results

time 
date('s') || space(translate(time(),' ',':',0))
tempexportfile "T:" || pragma('ID') || '_' || time || '_exp'
tempfnamefile "T:" || pragma('ID') || '_' || time || '_fn'

signal on error

/* get size of image to save (for os4icon 256x256 is max) */
ADDRESS SKETCHBLOCK GETPROJECTINFO STEM prj

WIDTH 
prj.width
HEIGHT 
prj.height

if WIDTH 256 HEIGHT 256 then do
    
say "AmigaOS4 icons can't be more than 256x256 pixels, plz scale"
    
exit
end

/* ok, size of image fine, continue */

'EXPORT FILE=' || tempexportfile


"REQUESTFILE SAVEMODE PATTERN #?.info TO " tempfnamefile

outfile 
""
if open('FILENAME',tempfnamefile,'R'then do
    
outfile strip(readln('FILENAME'),'B','"')
    
call close('FILENAME')
end

if outfile "" right(outfile,1) = ':' right(outfile,1) = '/' then do
    
say "requester cancelled or no file name given"
    
exit
end

/* check , if filename have .info at end (necessary for png2icon). and if not, add it automatically*/

if upper(right(outfile,5)) ~= '.INFO' then do
    
say ".info is NOT here!, so add"
    
outfile '"' || outfile || ".info" || '"'
end


conversion1 
"work:NetPBM/bin/ilbmtoppm -maskfile ram:mask " || tempexportfile ||  " >ram:tmpfile"
conversion2 "work:NetPBM/bin/pnmtopng -force -alpha ram:mask ram:tmpfile >" || outfile
conversion3 
"work:PNGIcon2Amiga/PNGIcon2Amiga " || outfile

/* 'address command' has been set above */

say conversion1
conversion1

say conversion2
conversion2

say conversion3
conversion3

error
:

"delete >NIL: *>NIL: quiet " || tempexportfile
"delete >NIL: *>NIL: quiet " || tempfnamefile
"delete >NIL: *>NIL: quiet ram:tmpfile"
"delete >NIL: *>NIL: quiet ram:mask"

exit



One thing left, though: in the beginning you make big effort to create unique file names and in the end you just use ram:tmpfile and ram:mask.

Go to top


Re: minor AREXX programming question
Not too shy to talk
Not too shy to talk


Quote:
if lastpos('.info', outfile) < length(outfile) - 4 then do


This will not work, either. It also applies to "something.information" and similar.

This one will work correctly:

if right(outfile,5) = ".info" then do
...


or if you want it to accept both upper and lower case file names:

if upper(right(outfile,5)) = ".INFO" then do
...



Go to top


Re: minor AREXX programming question
Not too shy to talk
Not too shy to talk



You aren't programmer, are you?

Not only that it seems like you never heard of the logical or operator | nor of the keyword else, you obviously don't even consider reading (or understanding?) the docs about the functions you use.

I only read your script up to the part with .info, then I could not stop laughing.

verify(a,b) checks if the string a contains only letters also contained in the string b. If not, it returns the position of the character in a which is not contained in b.

So what your verify(".info",filename) does is, it verifies that ".info" only consists of characters also contained in filename. For example verify(".info","mainpart.four") will return 0 because all letters of .info are also contained in mainpart.four, but verify(".info","mainpart.six") will return 4 because f is the first letter in .info which is not contained in mainpart.six. In neither case your program will add ".info" to the file name because the result of verify is not 1.


Go to top


Re: Finding window postition
Not too shy to talk
Not too shy to talk



@Antique:

You could close the picture window when the user moves the mouse out of the window boundaries. Then he does not need to click on the picture to close it.



Go to top


Re: SMBFS(?) - Umlauts not supported?
Not too shy to talk
Not too shy to talk



Perhaps you need to configure a different character set on the NAS? IS08859-1 would be perfect, but Windows-1252 should do, too.


Go to top


Re: SMBFS(?) - Umlauts not supported?
Not too shy to talk
Not too shy to talk



For me DANSK.crossdos worked when connecting to WindowsXP.

Do these files actually exist in the path you specified? IIRC I had to copy them from a WB 3.1 disk.


Go to top


Re: SVG datatype/library linked pthreads problems
Not too shy to talk
Not too shy to talk



http://aminet.net/package/dev/misc/MakeDT-1.3

Always worked perfectly for me. It's great to be included in makefiles. I don't understand why one would need a GUI.

Go to top


Re: CompositeTags
Not too shy to talk
Not too shy to talk


Quote:

Chris wrote:
Actually I didn't know there was a ClipBlit function, and it looks identical to BltBitMapRastPort to me.


ClipBlit is the only function which accepts a RastPort as *source*. If you want to blit *from* a window to somewhere else, you need to use it.


Go to top


Re: CompositeTags
Not too shy to talk
Not too shy to talk


If you want clipping you need to blit into a RastPort and not into a bitmap. I don't have the autodocs for CompositeTags here in front of me. If it does not allow to specify a RastPort as destination, then it is not meant to be used to blit into a window.

You could fake it by using

COMPTAG_DestX,win->LeftEdge + win->BorderLeft,
COMPTAG_DestY,win->TopEdge + win->BorderTop,

but this only works if your window is the frontmost one, i.e. not covered by parts of other windows.


Edit: now I read the autodocs and as it seems there is no way to specify a RastPort as destination for CompositeTags.

So if you don't need alpha blending, you should use BltBitMapRastPort instead.

If you need alpha blending, you have to
- allocate a new bitmap with BMF_DISPLAYABLE set and the window's bitmap as friend
- copy the area of the window you want to manipulate into the new bitmap using ClipBlit()
- use CompositeTags() with the new bitmap as destination
- copy the new bitmap back into the window using BltBitMapRastPort() or ClipBlit().

Perhaps using a window with WA_SuperBitMap would make things a bit easier.


Edited by thomas on 2012/10/26 7:52:22
Go to top


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



intuition.library is part of the OS. Why do you call it hacky?

screennotify.library is the standard for this purpose on OS 3.x. Everything else is a hack.


Go to top



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




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project