>> If it raised a question in your mind, I'm sure there are other people
starting out that would have the same question.
My conscious thought processes were trivial. I think I just assumed that
event-handling methods could be private, even though I knew that it's code
in ooDialog that actually invokes the method. For what it's worth, and after
a little introspection, I found that my "no-think" approach was along these
(1) I've got an event handler such as "::method doThis".
(2) This is a public method since private isn't specified.
(3) I don't want an event-handling method to be public.
(4) So make it PRIVATE.
Why did I think this could work? Well, applying some introspection, my
unconscious thought process was as follows. Being used to writing code that
runs on some "platform" or "layer", and looking on ooDialog as just such an
"underlying layer", then specifying PRIVATE should work because my code is
"above" that layer.
Of course, having surfaced that explanation, I can see how silly it is. But
I think I'll add a sentence to the Guide just in case there's a reader whose
"no-think" mode is similar to mine.
From: Mark Miesfeld [mailto:miesfeld@...]
Sent: 08 May 2012 21:41
To: Open Object Rexx Developer Mailing List
Subject: Re: [Oorexx-devel] ooDialog - Event Handlers - PRIVATE method?
On Sat, May 5, 2012 at 10:39 AM, Oliver Sims
> I just discovered that an event handler method cannot be defined as
> If it is, you get an ooDialog message saying the method name is not a
> method of the dialog.
> I guess it makes sense that the underlying event-handling code cannot
> invoke a private method. But am I correct? Or is this a bug in ooDialog?
No, it is not a bug, it is the way ooRexx works. As you have probably
figured out in your mind. You have an object, the ooRexx object that is
your dialog subclass. You can only invoke public methods on that ooRexx
object. This of course is no different than in any ooRexx
m = .Miesfeld~new
say 'Mark Miesfeld'
::method secretName private
say 'Mr President, sir'
The underlying ooDialog implementation code has a reference to your dialog
subclass. It invokes the event handler by sending a message to that dialog
subclass object. It knows the *name* of the message because you have to
specify the name, (or use the default name,) in your connectXXXEvent()
method. If you supply a private method name, then it won't work.
3 *-* m~secretName
Error 97 running
3: Object method not fou
Error 97.1: Object "a Miesfeld" does not understand message "SECRETNAME"
> If it's correct, then it would be useful (imho) to mention it in
> section 4.7.1."Coding Event Handlers".
> And if it's correct I'll certainly put a mention in the Guide.
Sure, it's worth mentioning. If it raised a question in your mind, I'm sure
there are other people starting out that would have the same question.
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware
Oorexx-devel mailing list