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
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
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
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
Member
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
Member
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
Member
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