Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #583 > unrolled thread
| Started by | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| First post | 2011-08-11 10:57 +0100 |
| Last post | 2011-08-13 15:33 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.sys.acorn.programmer
Toolbox textarea and associated window handle Chris Johnson <chrisjohnson+news@spamcop.net> - 2011-08-11 10:57 +0100
Re: Toolbox textarea and associated window handle druck <news@druck.org.uk> - 2011-08-13 15:01 +0100
Re: Toolbox textarea and associated window handle Chris Johnson <chrisjohnson+news@spamcop.net> - 2011-08-13 15:33 +0100
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2011-08-11 10:57 +0100 |
| Subject | Toolbox textarea and associated window handle |
| Message-ID | <520106dbdechrisjohnson+news@spamcop.net> |
Is there any general way of getting at the window handle of the window that textgadgets/textarea creates to implement a text area? The problem is compounded by the different versions of textgadgets out there. Scenario: In a window there is a large textarea gadget which is used to display user editable text, and which is intended to also accept text files dragged to it. When the file is dropped, the data transfer wimp message received contains a window handle which is that of the textarea gadget and not the containing window. I have found no way of confirming that this handle belongs to the app. The SWI 'Window_WimpToToolbox' returns 0 as it is not known to the toolbox. The toolbox IDblock at the time contains 0 and -1 for the 'this_obj' and 'this_cmp' since it is a wimp event and not a toolbox event. I know (a) later versions of Select implement a 'Textarea_GetWindowID' method, and (b) some versions of textgadgets have their own load capability. However others do not. I suppose the fudge would be to ignore the window handle and load any text file offered into the textarea (if the window is actually showing), perhaps with the additional check of comparing the pointer position with the textarea bounding box. Are there any suggestions for a better way? -- Chris Johnson
[toc] | [next] | [standalone]
| From | druck <news@druck.org.uk> |
|---|---|
| Date | 2011-08-13 15:01 +0100 |
| Message-ID | <j2604d$no$2@dont-email.me> |
| In reply to | #583 |
On 11/08/2011 10:57, Chris Johnson wrote: > I know (a) later versions of Select implement a > 'Textarea_GetWindowID' method, and (b) some versions of textgadgets > have their own load capability. However others do not. As the toolbox modules are available for all machines, you need to insist on a version which provides the features you need, rather than trying to work with every possible old version out there. ---druck
[toc] | [prev] | [next] | [standalone]
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Date | 2011-08-13 15:33 +0100 |
| Message-ID | <520227c6bachrisjohnson+news@spamcop.net> |
| In reply to | #602 |
In article <j2604d$no$2@dont-email.me>, druck <news@druck.org.uk> wrote: > On 11/08/2011 10:57, Chris Johnson wrote: > > I know (a) later versions of Select implement a > > 'Textarea_GetWindowID' method, and (b) some versions of > > textgadgets have their own load capability. However others do not. > As the toolbox modules are available for all machines, you need to > insist on a version which provides the features you need, rather > than trying to work with every possible old version out there. It appears to be the later Select versions that have additional features - these are not available to all, including myself. I have now used code that should work on RISC OS 4, 5, and 6, without assuming any particular features other than the common denominator of publically available versions. -- Chris Johnson
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web