![]() |
![]() |
#1 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 182
|
[ARexx] Error while counting icons (bug?)
Hi,
When the drawer is empty or nothing is visible (because lack of icons) I got error when using: Code:
GETATTR WINDOW.ICONS.SELECTED.COUNT NAME file_path VAR selected_icons_count; or GETATTR WINDOW.ICONS.ALL.COUNT NAME file_path VAR all_icons_count; The whole script looks like this: Code:
/* $VER: myTextEdit with selected icon (v1.0) */ ADDRESS workbench; GETATTR WINDOWS.ACTIVE VAR file_path; /* errors here */ GETATTR WINDOW.ICONS.SELECTED.COUNT NAME file_path VAR selected_icons_count; file_path_length$ = LENGTH(file_path); is_slash$ = '/'; IF (SUBSTR(file_path, file_path_length$) = ':') THEN is_slash$ = ''; IF (selected_icons_count = 0) THEN ADDRESS COMMAND 'sys:Tools/TextEdit ' file_path || is_slash$ || 'new_text_file.txt'; ELSE DO GETATTR WINDOW.ICONS.SELECTED.0.NAME NAME file_path VAR file_name; ADDRESS COMMAND 'sys:tools/TextEdit ' file_path || is_slash$ || file_name; END; EXIT; |
![]() |
![]() |
#2 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,325
|
What error do you get and did you use trace to find errors?
|
![]() |
![]() |
#3 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 182
|
|
![]() |
![]() |
#4 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,325
|
Check this: https://wiki.amigaos.net/wiki/AmigaO...Rexx_Debugging and ARexxGuide2 on Aminet.
I usually put a "trace i" somewhere in the script, start TCO (trace console) and then launch the script. Trace output should be visible in the trace console. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help Installed NEw Icons V4 and then removed error | jmwtac | support.Apps | 0 | 27 April 2020 23:56 |
Icons bug/problem | Jonpt | project.ClassicWB | 1 | 10 September 2017 20:36 |
OS 3.5 icons on 3.1 & WHDLoad hangs when displaying icons | PoulpSquad | support.WinUAE | 22 | 14 September 2012 00:57 |
WHDLoad Bug Reports: Sorry, an error has occured: SPAM Keywords detected | killergorilla | project.WHDLoad | 9 | 10 August 2007 13:01 |
|
|