log in | register | forums


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

Advanced search
Recent discussions
- Rougol June 2024 meeting on monday (News:1)
- WROCC June 2024 meeting - Mark Moxon dissects Lander (News:1)
- WROCC June 2024 meeting on wednesday - Mark Moxon on Lander (News:1)
- June developer 'fireside' chat is on saturday night (News:)
- May 2024 News Summary (News:5)
- Archive Edition 27:2 reviewed (News:)
- RISC OS 5.30 arrives (News:12)
- Rougol Talk May 2024 - Andy Vawer (News:)
- Rougol May 2024 meeting on monday with Andy Vawer (News:1)
- WROCC May 2024 meeting - Gerph talks games (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
View on Mastodon
Site Search
Article archives
Acorn Arcade forums: Programming: Title bar validation strings
  Title bar validation strings
  Chris (16:29 30/12/2012)
  apdl (09:51 31/12/2012)
    Chris (17:59 2/1/2013)
Chris Message #121720, posted by Chris at 16:29, 30/12/2012
Posts: 283
Recently noticed that an app I'm working on would cause some nasty errors when run alongside certain others (Edit and Draw would both crash and exit with Internal Error messages). I narrowed the problem down to my app loading a template with a validation string ('///C445566') in the title bar. Remove this, and everything seems to work fine.

I'm not sure what I'm doing wrong here. My code is, I think, fairly straightforward: use Wimp_LoadTemplate to find the window and indirected data size, and then reserve enough space for both. Checking against the stats in WinEd, I seem to be reserving the right amounts for the templates I'm loading. If the window title is indirected it doesn't cause a problem, only if it also has a validation string. There are plenty of other icons in my app's various windows with validation strings, and they cause no problems.

Do I need to do anything specific to cope with validation strings in indirected title bars when using Wimp_LoadTemplate? I've had a look at the PRMs and StrongHelp manuals, and can't see anything. Using RO5.19 on RPCEmu.
  ^[ Log in to reply ]
David Holden Message #121722, posted by apdl at 09:51, 31/12/2012, in reply to message #121720
Posts: 138
The title bar is not an icon; it's part of the window definition. It can have the usual icon flags (although some of these are ignored, eg. border, colour, drag type, etc.) and it can be indirected and can have a validation string (in theory) but why on earth would you want one?

The main purpose of a validation string is to set what characters are valid and the action of the Return and Tab key in a writable icon, and the title bar can't be writable. I would suggest that you're trying to do something that can't be done with a title bar in your validation string.
  ^[ Log in to reply ]
Chris Message #121724, posted by Chris at 17:59, 2/1/2013, in reply to message #121722
Posts: 283
I was playing around with giving the window work area a 24-bit colour value. As far as I know, the only way to do this is to use the 'C' validation string in the title bar's icon definition. Seems to work fine, in terms of how the window looks, but it did lead to the errors I mentioned.
  ^[ Log in to reply ]

Acorn Arcade forums: Programming: Title bar validation strings