Problem with tbox window_set_pointer()
04/12/2017 10:19
Hi everyone, Eventually traced Iyonix-specific crashes in my circuit editor (earlier thread 'C compilation query') not to 32bit compile issues but the Toolbox itself, although I've changed the StubsG back to Castle libraries and now get no non-32bit errors from Armalyser.

I've found, by sending a patient tester (with an Iyonix 5.13) various experimental patches, that his Iyonix doesn't like use of the Toolbox pointer sprite (as defined in 'Other Properties' of window template).

It's a data abort crash when the pointer enters and it doesn't even get as far as my Pointer_EnteringWindow event handler, where the pointer shape is meant to be further adjusted using window_set_pointer() (which you can't use anyway unless something has been specified in the Res file, you get a 'Buffer too short' error).

This all works fine under RO4.02.

I even sent him a 'minimal' test case with a single toolbox window to move the pointer over and it still crashed.

I changed to using Wimp_SpriteOp36 instead, leaving the Toolbox pointer unspecified in the Res file and my particular problem seems to be fixed - has anyone else come across this breakage in the toolbox? I am using ResEd 0.50 (24 Jun 03) BTW, not sure if that is latest version.

TIA Howard.

-- ------------- Howard Dawson hsdawson@ormail.co.uk http://hd-audio.orpheusweb.co.uk/ ---------------------------------

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/12/2017 10:19 - In article <na.e884ba4fb0.a80520hsdawson@ormail.co.uk>, Howard Dawson <hsdawson@ormail.co.uk> wrote: The latest versions of ResEd, ResTest and ResCreate are available from: https://www.riscosopen.org/content/downloads/desktop-zipfiles Ta, Steve -- Steve Revill @ Home Note: All opinions expressed herein are my own.


Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/12/2017 10:19 - In article <na.266e774faf.a80520hsdawson@ormail.co.uk>, Howard Dawson <hsdawson@ormail.co.uk> wrote: With most text entry fields in the Res file you can leave them blank but specify a length, rather than leaving the length as a 'star'. You obviously need to set the length to the maximum ever likely, and you should ideally check for buffer overruns when changing the name.

Depending on how the contents of the field are to be used, the name needs setting before (in this case) the pointer is used.

Offhand, I am not sure whether you have to select 'use user sprite area' as well.

Chris...

-- Chris Johnson

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/12/2017 10:19 - In article <na.f0e7094faf.a80520hsdawson@ormail.co.uk>, Howard Dawson <hsdawson@ormail.co.uk> wrote: Is this setting a sprite name in the Res file itself, or setting it during program execution (obviously prior to the pointer entering the window for the first time)? I have certainly used the user sprite area with no problems, as I am sure many others have, however, I have never used it for a custom pointer.

-- Chris Johnson

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/12/2017 10:19 - In article <4faf790d81chrisjohnson+news@spamcop.net>, Chris Johnson <chrisjohnson+news@spamcop.net> wrote: It's a bit odd and inconsistent, because when the option to use the toolbox sprite is unticked, although all the other fields fade and are non-editable, the name length field does not, not on my version of ResEd anyway.

If you set a finite name length other than '*', but nothing for the sprite name, then you get a 'Sprite doesn't exist' error (as presumably it looks for a sprite with a NULL name) when the pointer enters.

However you have to set an adequate finite length if you subsequently want to use window_set_pointer() in the program, as you pointed out. Herein lies the problem with the Iyonix 5.13 as setting anything for the sprite name causes the fatal crash to occur.

It's all OK with RO4 and I've never had to use a user sprite srea before.

Howard -- ------------- Howard Dawson hsdawson@ormail.co.uk http://hd-audio.orpheusweb.co.uk/ ---------------------------------

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/12/2017 10:19 - In article <4fb00fd556chrisjohnson+news@spamcop.net>, Chris Johnson <chrisjohnson+news@spamcop.net> wrote: Just setting it in the Res file is enough to cause the guy's Iyonix to crash, as proven by the minimal example I sent him as a test. I had previously verified that it wasn't even getting as far as my Pointer_EnteringWindow event handler.

Waiting to hear from him about his Tbox module versions.

Perhaps my copy of ResEd is somehow lacking or broken but I can't really see how it could be. ResEd version 0.50 (24-Jun-03), and the version of !Window in the !ResEd.CSE directory is 0.35 . All the programming is done on an RPC 4.02 .

In the simplest case, I can start by creating a new Res file by clicking on ResEd iconbar icon, drag in the window object from prototypes, and double-click to edit the window object.

If I then select 'Other properties' from the menu, the situation is that the custom sprite is deselected and the sprite name and hotspot x/y values are faded and uneditable as you would expect, but the length field is not disabled - it even has the input focus and caret! This is inconsistent with normal ResEd operation where all related sub-fields of an option are usually uneditable.

This is how I am able to create the 'Sprite doesn't exist' error - by setting a name length without a sprite name. It seems that the length field is not ignored even though the option is unset or there is a NULL or invalid sprite name.

Howard.

-- ------------- Howard Dawson hsdawson@ormail.co.uk http://hd-audio.orpheusweb.co.uk/ ---------------------------------

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below