Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
21 crawler(s) on-line.
 143 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 OlafS25:  18 mins ago
 amigang:  44 mins ago
 Tpod:  1 hr 24 mins ago
 pixie:  1 hr 29 mins ago
 Birbo:  1 hr 44 mins ago
 Hammer:  1 hr 51 mins ago
 zipper:  2 hrs 19 mins ago
 amigakit:  3 hrs 15 mins ago
 MarcioD:  3 hrs 38 mins ago
 kolla:  3 hrs 46 mins ago

/  Forum Index
   /  Amiga OS4 Software
      /  Requesting help with ProAction --- using ARexx and text editor gadget
Register To Post

PosterThread
redfox 
Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 28-Aug-2019 23:06:17
#1 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2066
From: Canada

I am working on an ARexx program that uses ProAction to create a window with some buttons and a text editor gadget. I want to display a text file in read-only mode. So far, I have been able to create the main window, the buttons and the text editor gadget, but I can't figure out how to actually display the contents of my text file in the text editor gadget.

The text file is called RAM:tempfile

The ProAction documentation points me over to texteditor_gc.doc in the SDK documents. While I read through this document, I can feel the wind whistling through my hair (i.e. it's way beyond my entry level of understanding), and I can't find any examples that actually address what I am trying to accomplish.


Any assistance would be greatly appreciated.

When I was experimenting with RxMUI and (MUI) TextEditor class, I found this was fairly straightforward. The TextEditor class has a method to open a file .... open < filename >

call DoMethod("te","open","ram:tempfile")

In this example, "te" is the object name of my texteditor object, "open" is the command and "ram:tempfile" is the filename.

---
redfox


Edit reason ... Sorry, I can't figure out how to add less-than and greater-than symbols around filename.

Edit ... Thanks bison

Last edited by redfox on 29-Aug-2019 at 05:55 AM.
Last edited by redfox on 29-Aug-2019 at 05:54 AM.
Last edited by redfox on 28-Aug-2019 at 11:20 PM.
Last edited by redfox on 28-Aug-2019 at 11:17 PM.
Last edited by redfox on 28-Aug-2019 at 11:15 PM.
Last edited by redfox on 28-Aug-2019 at 11:13 PM.
Last edited by redfox on 28-Aug-2019 at 11:11 PM.

 Status: Offline
Profile     Report this post  
bison 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 29-Aug-2019 3:47:55
#2 ]
Elite Member
Joined: 18-Dec-2007
Posts: 2112
From: N-Space

@redfox

Quote:
I can't figure out how to add less-than and greater-than symbols around filename.

Try &amp;lt; and &amp;gt;

You have to go straight to Submit. If you preview, the editor will expand the symbols, and they will be interpreted as HTML tags when you submit the post.

Update: I did it to myself.

Last edited by bison on 29-Aug-2019 at 03:49 AM.

_________________
"Unix is supposed to fix that." -- Jay Miner

 Status: Offline
Profile     Report this post  
broadblues 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 29-Aug-2019 6:02:15
#3 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@redfox

Use the GA_TEXTEDITOR_Contents TAG

For example when adding the texteditor gadget to the text tool in SketchBlock I use



text.string = "Text"

...

textEditor.0 = 2
textEditor.1.TAGNAME = "GA_TEXTEDITOR_Contents"
textEditor.1.TAGVALUE = text.string
textEditor.2.TAGNAME = "GA_TEXTEDITOR_Flow"
textEditor.2.TAGVALUE = "GV_TEXTEDITOR_Flow_" || align

...

'ADDGADGET GUIID ' GUIKEY ' GADGETCLASS "texteditor.gadget" TAGSTEM textEditor'
text.GID = RESULT


You need to load in the text you want to edit from a file using standard ARexx file handling (eg open() etc)

Later I extract the text with


'TEXTEDITOREXPORTTEXT GUIID ' || GUIKEY || ' TEDID ' || Text.GID
if RC = 0 then text.string = RESULT


TEXTEDITOREXPORTTEXT is a wrapper for the GM_TextEditor_ExportText method.

Search for "TextEditor Gadget Related Functions"

at

http://www.broad.ology.org.uk/amiga/proaction/index.html

for more info.


Last edited by broadblues on 29-Aug-2019 at 06:03 AM.

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
Severin 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 30-Aug-2019 0:46:13
#4 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2740
From: Gloucestershire UK

@redfox

If your project is fairly simple you might want to look at using AWNPipe: to creae your GUI, there are plenty of arexx examples in the docs and examples you can modify to your needs.

ProAction is very good but a lot more complicated.

_________________
OS4 Rocks
X1000 beta tester, Sam440 Flex (733)

Visit the Official OS4 Support Site for more help.

It may be that your sole purpose is to serve as a warning to others.

 Status: Offline
Profile     Report this post  
redfox 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 4-Sep-2019 20:34:59
#5 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2066
From: Canada

@broadblues

Thanks for your help.

It took me awhile to get this working because I made the mistake of opening the window before reading the text file into the text.string. This resulted in displaying some dummy information instead of the file I wanted to view. Now I open the text file, read it into text.string, then open the window containing the texteditor to display the text string.

This works best if I use two windows, the first window contains my control buttons, the second window contains the texteditor gadget and displays the text file. I can use the size gadget on the second window to make the window bigger to display more lines of text. Alternatively, I can define a bigger window to display more text.

However, if I use a single window with a row of buttons above the texteditor gadget, the size gadget makes the buttons bigger. I get really tall buttons and a very small increase in size of the actual texteditor gadget.

Ultimately, if possible, I am attemting to port one of my existing applications to ProAction to give it the look of Reaction GUI. I already have other working versions of this application. One uses MicroRexx. Another uses RexxBGUI. Another uses RxMUI to give it the look of MUI GUI. In each case, there is a single window with menus, a row of buttons and an area to display a text file.

---
redfox

 Status: Offline
Profile     Report this post  
redfox 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 4-Sep-2019 21:34:04
#6 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2066
From: Canada

@Severin
@broadblues

Please note that I am attemting to provide a GUI for an simple email application that I created several years ago. The basic functions are Listmail (list the mail in the mailbox) and Mailreader (display the selected email). The user sees two windows, the Listmail window listing the emails and the Mailreader window that displays the selected email.

Back in the day, it was fairly simple. I used KCON console windows. Then I tried to use MicroRexx and AWNpipe to provide custom menus. In each case it simply opened a Title bar at the top of the screen and provided a menu of my desired functions. I was still using KCON windows to display the text.

My first goal was to create a nice looking functional Mailreader window to display the selected email. It had to have menus and a row (toolbar) of buttons. My second goal was to create a nice looking functional Listmail window and use the mouse to click on an entry to select the email I wanted to display.

Since then, I found that MicroRexx was actually quite easy to use, so I created a Mailreader window using MicroRexx to create the window, menu, buttons and display the text.

I will give AWNpipe another try in the near future.

Then, I tried some other GUI tools. I made several other versions of my Mailreader to try out RexxBGUI and RxMUI. I also downloaded TritonRexx but the documentation was in German.

RxMUI gave me access to MUI and I have created many variations of my Mailreader program using texteditor, listview, nlistview, toolbar, speedbar, thebar (toolbar).

All of these versions create a single Mailreader window, containing menus, a row of buttons and a text area to display the selected email.

Using RxMUI, I was able to create a Listmail window with clickable selections and a very nice looking Mailreader window with menus, a row of buttons (using AISS images), and a text area below the buttons.

I am currently attemting to port my application to ProAction (Reaction).

So far, I'm working on the Mailreader. I'm currently using three windows. The program opens a small window containing the buttons. The Listmail button opens the Listmail window listing the emails in the mailbox and the third window opens to display the selected email. The Listmail window does not use ProAction at this time (still learning how to use listbrowser and lists). It is different from RxMUI and equivalent MUI classes.

---
redfox

Last edited by redfox on 04-Sep-2019 at 10:02 PM.
Last edited by redfox on 04-Sep-2019 at 10:00 PM.
Last edited by redfox on 04-Sep-2019 at 09:42 PM.
Last edited by redfox on 04-Sep-2019 at 09:35 PM.

 Status: Offline
Profile     Report this post  
broadblues 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 5-Sep-2019 11:02:28
#7 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@redfox

Quote:

However, if I use a single window with a row of buttons above the texteditor gadget, the size gadget makes the buttons bigger. I get really tall buttons and a very small increase in size of the actual texteditor gadget.


You probably need to a a CHILD_WeightedHeight,0, just after the horizontal layout that containes the buttons.

This adds a confirm save buttons to a window and ensures they stay fixed height...


'ADDLAYOUT GUIID ' GUIKEY ' TAGSTEM confirmlayouttag'
CONFIRMLAYOUT = RESULT
'ADDGADGET GUIID ' GUIKEY ' GADGETCLASS "button.gadget" TAGSTRING "GA_Text,Make Text,GA_RelVerify,1,TAG_DONE"'
MAKEGID = RESULT
'ADDGADGET GUIID ' GUIKEY ' GADGETCLASS "button.gadget" TAGSTRING "GA_Text,Cancel,GA_RelVerify,1,TAG_DONE"'
CANCELGID = RESULT

'SETATTRS GUIID ' GUIKEY ' OBJECTID ' CURRENTLAYOUT ' TAGSTRING "LAYOUT_ModifyChild,' || CONFIRMLAYOUT || ',CHILD_WeightedHeight,0,TAG_DONE"'




[

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
redfox 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 13-Sep-2019 0:28:11
#8 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2066
From: Canada

@broadblues

Thanks so much Andy. It took quite awhile for me to get this working. I now have a window with a row of buttons above a text editor gadget. If I increase the vertical size of the window, the buttons do not grow taller.

It took awhile because I did not have the variable CURRENTLAYOUT defined.

Works now with the following inserted between the end of my buttons and the 'SETATTRS command:

'ENDLAYOUT GUIID ' || GUIKEY
CURRENTLAYOUT = RESULT

Thanks again.

redfox

Last edited by redfox on 13-Sep-2019 at 12:53 AM.

 Status: Offline
Profile     Report this post  
redfox 
Re: Requesting help with ProAction --- using ARexx and text editor gadget
Posted on 13-Sep-2019 0:34:54
#9 ]
Elite Member
Joined: 7-Mar-2003
Posts: 2066
From: Canada

@broadblues

Another question ... is there an easy way to udate the window title?

Such as maybe a 'SETATTRS GUIID ' command?

At the moment, I doing this in the list of GUI tags for the window
using "WA_Title" and closing the window and reopening with new window title.

---
redfox

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle