log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Upgrading your RISC OS system to 5.30 (News:2)
- WROCC May 2024 meeting on wednesday - Gerph talks games (News:)
- Wakefield Show 2024 in Pictures (News:4)
- RISC OS 5.30 arrives (News:1)
- April 2024 News Summary (News:1)
- uniprint upgraded to 4.50 (News:)
- PhotoDesk 3.23 released (News:)
- R-Comp reveals N.Ex.T Boxes - the successor to the i.MX6 (News:)
- RISCOSbits at Wakefield Show 2024 (News:)
- R-Comp releases Genealogy v2 (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: IconSprites
 
  IconSprites
  bmsh (00:21 1/10/2002)
  Matthew (14:55 1/10/2002)
 
Ben H Message #20268, posted by bmsh at 00:21, 1/10/2002
Member
Posts: 33
Hmmm, not many posts to this forum in a while. Anyway...

I'm trying to write a program which will allow the user to configure the sprites used for filetypes and then not allow them to be overwritten. For the 'watching' part of this system I've set an alias to redirect any IconSprites commands to my program thus

Set Alias$IconSprites <Obey$Dir>.NewIS %%*0

where NewIS is a BASIC program which scans the sprite file specified and only allows through sprites which are not on the protected list (or, as currently, just lets everything through) which seems to work okay.

The problem comes when an application is booted which doesn't have a !Boot file but does have a !Sprites file. I'm not sure what happens here as I get a message saying

Not enough application memory to start BASIC.

from the Filer. This is obviously an incorrect error as it happens when I allocate 28,640K to the Next slot. However, if I change the BASIC program for an Obey file just containing "Echo OK" as a test, there is no error but no message either for these situations. Help! What does the OS/Filer do in these situations? Does it issue an IconSprites command or not? Can anyone offer any advice?

I'm now guessing that this method won't work for applications like this and I'll have to try something else. I have a nasty idea that the answer may involve writing a module to watch for IconSprites events (if there is such a thing, I really don't know) and I have no idea where to begin with that but we'll see what people say.

Hmmm, there's probably another program already out there which does exactly what I'm trying to do here. Is there...?
  ^[ Log in to reply ]
 
Matthew Somerville Message #20288, posted by Matthew at 14:55, 1/10/2002, in reply to message #20268
Matthew

Posts: 520
Using an alias won't work if the person using the IconSprites command has bypassed any aliases (IIRC (and I probably haven't), you simply put a % before the command).

Re: your memory error, you need to allocate some memory to your NewIS program before running it. Something along the lines of Set Alias$IconSprites Wimpslot -min 32k -max 32k|M<Obey$Dir>.NewIS %%*0

Hmmm, there's probably another program already out there which does exactly what I'm trying to do here. Is there...?
For the watching part, yes: AddSprites available from <a href="http://www.doggysoft.co.uk/prog1.html">http://www.doggysoft.co.uk/prog1.html</a> :)

ATB,
Matthew
  ^[ Log in to reply ]
 

The Icon Bar: Programming: IconSprites