>> I was wondering if there was some sort of code generator out there, that
takes in an RC file and spits out some rexx code with basic onClick handlers
for the dialog controls found.
Back in the 1990s, IBM (or rather a small spin-off from IBM) developed a
product that included the the sort of thing you're thinking of. Certainly
the programmer didn't have to do anything to get access to controls on a
dialog.
First, the dialog was not based on .rc files - they turned out to be
inadequate for the purpose. Rather a format using a pre-cursor of XML was
used to define the dialogs - a bit like Microsoft's XAML (see
http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language). There
was also a visual layout tool that produced the "XML".
Essentially, a dialog was invoked by the middleware and responsed to
invocations about user actions on the dialog. Here's a code fragnmebt from a
"dfialog" to illustrate (Rexx was a supported language):
when NwiMethod( "Notify" ) then do
/* This message is sent to me whenever the user does something */
/* to the window for which I am the View Object. */
name = SdsGet(hData, "Name", 1) /* Name of Control */
code = SdsGet(hData, "Code", 1) /* Action on Control */
select
when name = "Apply" then do
/* Update requested, so invoke Model-View Update framework: */
mrc = NwiSelf("UpdateModel")
if mrc = 0 then
crc = NwiCtl("Message", "Set", "Text", "Order Placed OK")
else
crc = NwiCtl("Message", "Set", "Text", "Error - Try Again")
return
end
when name = "Refreshview" then do
/* Refresh View requested, so invoke the Model-View */
/* Refresh framework: */
a = NwiSuper("Refresh")
return
end
when name = "Clear" then do
/* Clear message area requested, so clear it (set to blank): */
crc = NwiCtl("Message", "Set", "Text", " ")
return
end
otherwise nop
end
Mind you, providing the infrastructure code for this required several
man-years of C programming.
--
Oliver Sims
_____
From: Mark Miesfeld [mailto:miesf...@gmail.com]
Sent: 24 January 2013 19:02
To: Open Object Rexx Users
Subject: Re: [Oorexx-users] Oodialog code generator
On Thu, Jan 24, 2013 at 10:49 AM, Mukenx <muk...@gmail.com> wrote:
I am getting more and more into the habit of using the ResEdit dialog editor
and the RcDialog class for quickly getting a dialog up and running, the
oorexx part consisting over and over again in copying and pasting code bits
from here and there and adapting them.
I was wondering if there was some sort of code generator out there, that
takes in an RC file and spits out some rexx code with basic onClick handlers
for the dialog controls found.
None that I know of.
--
Mark Miesfeld
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users