log in | register | forums


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

Advanced search
Recent discussions
- I want to digitise some A3010 software - ONLY COPY (Gen:5)
- RISC OS ports website (News:5)
- For Swaps/Trade Acorn User/Archi World Magazine Collection (Gen:5)
- More Acorn Magazine nostalgia (News:)
- RISC OS London Show 2018 (News:)
- NetSurf or Iconbar? (Site:3)
- September News round-up (News:)
- DDE tools updated to DDE28c (News:)
- Orpheus hits crowdfunding target (News:2)
- Orpheus launch crowdfunding campaign (News:5)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
Site Search
Article archives
The Icon Bar: 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 ]

The Icon Bar: Programming: Title bar validation strings