Xojo Conferences
XDCMay2019MiamiUSA

hidden classes (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Operator Convert To
Next thread: Operator Convert


macosx and unix paths   -   GOLD
  hidden classes   -   Will Leshner
   Re: hidden classes   -   Björn Eiríksson <b
    Re: hidden classes   -   Christian Schmitz
     Re: hidden classes   -   Joseph J. Strout
      Re: hidden classes   -   Christian Schmitz
     Re: hidden classes   -   Björn Eiríksson <b
     Re: hidden classes   -   Norman Palardy
     Re: hidden classes   -   Norman Palardy
     Re: hidden classes   -   Will Leshner
     Re: hidden classes   -   Joseph J. Strout
     Re: hidden classes   -   Norman Palardy
     Re: hidden classes   -   Alfred Van Hoek
     Re: hidden classes   -   Norman Palardy
   Re: hidden classes   -   Alfred Van Hoek
   Re: hidden classes   -   Will Leshner
   Re: hidden classes   -   Will Leshner
    Re: hidden classes   -   Thomas Tempelmann

hidden classes
Date: 28.06.05 23:06 (Tue, 28 Jun 2005 15:06:59 -0700)
From: Will Leshner
Is it possible to register a class that doesn't get exposed to the
outside world? I'd like to create a subclass of an existing class to
use in my plugin, but I don't want users of my plugin to see that class.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 00:48 (Tue, 28 Jun 2005 23:48:26 +0000)
From: Björn Eiríksson <b

On 28.6.2005, at 22:06, Will Leshner wrote:

> Is it possible to register a class that doesn't get exposed to the
> outside world? I'd like to create a subclass of an existing class
> to use in my plugin, but I don't want users of my plugin to see
> that class.

Put a _ in front of the class name.

(Note though Plugin scanning tools such as RB Plugin Plunger will
still find it, be REALbasic code completion will not)

Re: hidden classes
Date: 29.06.05 22:03 (Wed, 29 Jun 2005 23:03:09 +0200)
From: Christian Schmitz
Björn Eiríksson <<email address removed>> wrote:

> On 28.6.2005, at 22:06, Will Leshner wrote:
>
> > Is it possible to register a class that doesn't get exposed to the
> > outside world? I'd like to create a subclass of an existing class
> > to use in my plugin, but I don't want users of my plugin to see
> > that class.
>
> Put a _ in front of the class name.

Cool. Thank you. I'll use that.
(it should be documented)

> (Note though Plugin scanning tools such as RB Plugin Plunger will
> still find it, be REALbasic code completion will not)

Do you have a copy of Plugin Plunger which reads the new plugin format?
And if yes, is the plugin behind updated?

I use it for my documentation utility to check whether all functions in
the documentation are in the plugin and all plugin functions are
documented.

Mfg
Christian

--

Re: hidden classes
Date: 29.06.05 22:18 (Wed, 29 Jun 2005 16:18:55 -0500)
From: Joseph J. Strout
At 11:03 PM +0200 6/29/05, Christian Schmitz wrote:

> > Put a _ in front of the class name.
>
>Cool. Thank you. I'll use that.
>(it should be documented)

No, it should NOT. This is not a feature we want our plugin authors
to use. All identifier names starting with an underscore are
reserved for use by us, for several reasons. If we wanted you using
it, we'd have documented it -- and just because somebody has
discovered it, is not a good reason to use it. Future versions of
REALbasic may well make identifiers starting with an underscore a
syntax error, which would cause plugins using it to break.

Thanks,
- Joe

Re: hidden classes
Date: 29.06.05 22:57 (Wed, 29 Jun 2005 23:57:39 +0200)
From: Christian Schmitz
Joseph J. Strout <<email address removed>> wrote:

> No, it should NOT.

Why?

A class named "_MBSRegistration2005Class" should not be tagged enough to
be not used by RS.

And it's better than just "MBSRegistration2005Class" as users will not
see it and so never ask about it.

Mfg
Christian

Re: hidden classes
Date: 29.06.05 22:32 (Wed, 29 Jun 2005 21:32:44 +0000)
From: Björn Eiríksson <b
A Rule of thumb, if you need it then others need it, so if RS needs
internal classes, then there are bound to be cases where Plugin
authors need internal classes too. (Something to think about when
designing a SDK)

(Not that I have ever used them my self)

Björn

On 29.6.2005, at 21:18, Joseph J. Strout wrote:

> At 11:03 PM +0200 6/29/05, Christian Schmitz wrote:
>
>> > Put a _ in front of the class name.
>>
>> Cool. Thank you. I'll use that.
>> (it should be documented)
>>
> No, it should NOT. This is not a feature we want our plugin
> authors to use. All identifier names starting with an underscore
> are reserved for use by us, for several reasons. If we wanted you
> using it, we'd have documented it -- and just because somebody has
> discovered it, is not a good reason to use it. Future versions of
> REALbasic may well make identifiers starting with an underscore a
> syntax error, which would cause plugins using it to break.
>
> Thanks,
> - Joe
>
> --
> Joe Strout REAL Software, Inc.
>
> Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
> http://linux.sys-con.com/general/readerschoice.htm
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 22:42 (Wed, 29 Jun 2005 15:42:16 -0600)
From: Norman Palardy

On Jun 29, 2005, at 3:32 PM, Björn Eiríksson wrote:

> A Rule of thumb, if you need it then others need it, so if RS needs
> internal classes, then there are bound to be cases where Plugin
> authors need internal classes too. (Something to think about when
> designing a SDK)
>
And if you need them in a plugin folks will likely have a need for the
m inside RB itself as well

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 23:00 (Wed, 29 Jun 2005 16:00:46 -0600)
From: Norman Palardy

On Jun 29, 2005, at 3:18 PM, Joseph J. Strout wrote:

> At 11:03 PM +0200 6/29/05, Christian Schmitz wrote:
>
>> > Put a _ in front of the class name.
>>
>> Cool. Thank you. I'll use that.
>> (it should be documented)
>
> No, it should NOT. This is not a feature we want our plugin authors
> to use. All identifier names starting with an underscore are reserved
> for use by us, for several reasons.

I'd just put that 2 sentences in the documentation and that way IF
anyone does use it they have been forwarned that this is a Bad Thing™
to do and should suffer accordingly IF REAL ever changes behaviors.

Documenting what IS and IS NOT allowed is good for everyone and avoids
cries of "But you never told us!" when something breaks that is
documented as NOT to be used.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 23:12 (Wed, 29 Jun 2005 15:12:35 -0700)
From: Will Leshner

On Jun 29, 2005, at 2:18 PM, Joseph J. Strout wrote:

> Future versions of REALbasic may well make identifiers starting
> with an underscore a syntax error, which would cause plugins using
> it to break.
>

Gotcha. I'll avoid it. My idea isn't going to work anyway, so I don't
need a hidden class after all :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 23:18 (Wed, 29 Jun 2005 17:18:33 -0500)
From: Joseph J. Strout
At 4:00 PM -0600 6/29/05, Norman Palardy wrote:

>>No, it should NOT. This is not a feature we
>>want our plugin authors to use. All identifier
>>names starting with an underscore are reserved
>>for use by us, for several reasons.
>
>I'd just put that 2 sentences in the
>documentation and that way IF anyone does use it
>they have been forwarned that this is a Bad
>Thing to do and should suffer accordingly IF
>REAL ever changes behaviors.

Yes, you're right about that. The IDE prevents
ordinary users from doing this, but we don't
currently have any such protection for plugin
authors.

Best,
- Joe

-

Re: hidden classes
Date: 29.06.05 23:23 (Wed, 29 Jun 2005 16:23:49 -0600)
From: Norman Palardy

On Jun 29, 2005, at 4:18 PM, Joseph J. Strout wrote:

> At 4:00 PM -0600 6/29/05, Norman Palardy wrote:
>
>>> No, it should NOT. This is not a feature we want our plugin authors
>>> to use. All identifier names starting with an underscore are
>>> reserved for use by us, for several reasons.
>>
>> I'd just put that 2 sentences in the documentation and that way IF
>> anyone does use it they have been forwarned that this is a Bad Thing™
>> to do and should suffer accordingly IF REAL ever changes behaviors.
>
> Yes, you're right about that. The IDE prevents ordinary users from
> doing this, but we don't currently have any such protection for plugin
> authors.
>
Right.
So document that plugin authors should NOT start identifiers with and
underscore because REAL has reserved this naming convention.
Then, if someone uses it, and suddenly their plugin breaks, you can say
"We told you not to" and be done with it.

Other wise you leave yourself open to the "But you never told us not to
do this therefore support it til hell freezes over" argument.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 30.06.05 02:28 (Wed, 29 Jun 2005 21:28:39 -0400)
From: Alfred Van Hoek

On Jun 29, 2005, at 6:23 PM, Norman Palardy wrote:

> Right.
> So document that plugin authors should NOT start identifiers with and
> underscore because REAL has reserved this naming convention.
> Then, if someone uses it, and suddenly their plugin breaks, you can
> say "We told you not to" and be done with it.
>
> Other wise you leave yourself open to the "But you never told us not
> to do this therefore support it til hell freezes over" argument.
>

But what if you need a singleton class? If one can hide this class then
ordinary users don't know about this class and the plugin developer can
use this class internally, to allow for proper setup of a plugin as
well as proper destruction of a plugin, since RB will take care of
calling the destructor in the latter case. This would be a good example
of utilizing an existing mechanism. Perhaps RS can provide an
alternative for the underscore?

Alfred

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 30.06.05 02:42 (Wed, 29 Jun 2005 19:42:46 -0600)
From: Norman Palardy

On Jun 29, 2005, at 7:28 PM, Alfred Van Hoek wrote:

>
> On Jun 29, 2005, at 6:23 PM, Norman Palardy wrote:
>
>> Right.
>> So document that plugin authors should NOT start identifiers with and
>> underscore because REAL has reserved this naming convention.
>> Then, if someone uses it, and suddenly their plugin breaks, you can
>> say "We told you not to" and be done with it.
>>
>> Other wise you leave yourself open to the "But you never told us not
>> to do this therefore support it til hell freezes over" argument.
>>
> But what if you need a singleton class? If one can hide this class
> then ordinary users don't know about this class and the plugin
> developer can use this class internally, to allow for proper setup of
> a plugin as well as proper destruction of a plugin, since RB will take
> care of calling the destructor in the latter case. This would be a
> good example of utilizing an existing mechanism. Perhaps RS can
> provide an alternative for the underscore?
>
OK ... I never said there would be no need for an equivalent that
plugin developers could use ... just that IF REAL wants to keep
underscore prefixed names for themselves they should say so and
document this so we all know about it.

Not saying so and then changing the behavior could lead to problems
down the road.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 04:56 (Tue, 28 Jun 2005 23:56:54 -0400)
From: Alfred Van Hoek

On Jun 28, 2005, at 6:06 PM, Will Leshner wrote:

> Is it possible to register a class that doesn't get exposed to the
> outside world? I'd like to create a subclass of an existing class to
> use in my plugin, but I don't want users of my plugin to see that
> class.

Which means you will implement and use this subclass within the plugin,
I guess. This boils down to that it would be pointless to define
REALmethodDefinitions or REALproperties of the subclass and pointless
to register the subclass as well. Don't know why and what you want to
accomplish but it sounds like you require to use the dynamic access
api's on the existing class and create a C/C++ wrapper class you then
can use within the plugin. I've done it.

Alfred

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 05:03 (Tue, 28 Jun 2005 21:03:30 -0700)
From: Will Leshner

On Jun 28, 2005, at 8:56 PM, Alfred Van Hoek wrote:

> Don't know why and what you want to accomplish but it sounds like
> you require to use the dynamic access api's on the existing class
> and create a C/C++ wrapper class you then can use within the
> plugin. I've done it.

In this case I want to use a TCPSocket subclass and I want to
implement the DataAvailable event. So I don't think I can just use
the dynamic API to accomplish it, although I do plan to use the
dynamic API for some of the work.

Thanks.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 17:57 (Wed, 29 Jun 2005 09:57:27 -0700)
From: Will Leshner

On Jun 28, 2005, at 4:48 PM, Björn Eiríksson wrote:

> Put a _ in front of the class name.
>

Aha. That's the trick, is it? Thanks._______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: hidden classes
Date: 29.06.05 22:49 (Wed, 29 Jun 2005 23:49:39 +0200)
From: Thomas Tempelmann
Joseph J. Strout wrote:

> All identifier names starting with an underscore are
>reserved for use by us

One more reason to document this. Remember the chaos early on when
RB reserved lower Resource IDs? Not only that we did not know,
but you even made us change ours instead of just doing the right
thing and using the Resource Chain properly.

>Future versions of
>REALbasic may well make identifiers starting with an underscore a
>syntax error, which would cause plugins using it to break.

Where can I find the documention about the legal characters for an
identifier? I can't find it in the Help nor in the Lang Ref PDF.

Thomas
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>