realbasic-nug
[Top] [All Lists]

Re: Should I be able to do this?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Should I be able to do this?
From: Norman Palardy <npalardy@great-white-software.com>
Date: Wed, 29 Jul 2009 21:58:31 -0600
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <E98A8196-448A-4BCB-A001-D3FB1149709C@verizon.net>
References: <E98A8196-448A-4BCB-A001-D3FB1149709C@verizon.net>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 29-Jul-09, at 7:21 PM, Karen wrote:

I thought the #if ... #EndIf block makes things that are not true in that block invisible to the complier.

If that is true one would expect to be able to use them anywhere ... But apparently that not true. The following code gives me an illegal syntax error:


   Select Case RectCtrl
   #if RBVersion <= 2009.3
    Case IsA EditField
      CheckedFont = EditField(RectCtrl).TextFont
   #endif

   #if RBVersion >= 2009.3
    Case isA TextField
      CheckedFont = TextField(RectCtrl).TextFont
    Case isA TextArea
     CheckedFont = TextArea(RectCtrl).TextFont
   #endif

   Case IsA StaticText
     CheckedFont = StaticText(RectCtrl).TextFont
   Case IsA Listbox
     CheckedFont = Listbox(RectCtrl).TextFont
   <snip>
  End Select

Is this this a bug, a design flaw, or am I crazy to even think doing this should work?


Hmmmmmm this works here in 2009r2 and 2009r3

  dim RectCtrl as RectControl
  dim checkedFont as string

  Select Case RectCtrl

  Case IsA StaticText
    CheckedFont = StaticText(RectCtrl).TextFont
  Case IsA Listbox
    //CheckedFont = Listbox(RectCtrl).TextFont

    #if RBVersion <= 2009.3
  Case IsA EditField
    CheckedFont = EditField(RectCtrl).TextFont
    #endif

    #if RBVersion >= 2009.3
  Case isA TextField
    CheckedFont = TextField(RectCtrl).TextFont
  Case isA TextArea
    CheckedFont = TextArea(RectCtrl).TextFont
    #endif


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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


From  Thu 30 Jul 2009 03:59:36 +0000 (UTC)
Delivered-To: listarchive@realsoftware.com
Received: by 10.220.95.147 with SMTP id d19cs148653vcn;
       Wed, 29 Jul 2009 21:00:03 -0700 (PDT)
Received: by 10.115.55.20 with SMTP id h20mr917864wak.52.1248926400643;
       Wed, 29 Jul 2009 21:00:00 -0700 (PDT)
Return-Path: <realbasic-nug-bounces@lists.realsoftware.com>
Received: from advanced107.inmotionhosting.com (advanced107.inmotionhosting.com 
[74.124.194.228])
       by mx.google.com with ESMTP id 34si3634150pzk.7.2009.07.29.21.00.00;
       Wed, 29 Jul 2009 21:00:00 -0700 (PDT)
Received-SPF: neutral (google.com: 74.124.194.228 is neither permitted nor 
denied by best guess record for domain of 
realbasic-nug-bounces@lists.realsoftware.com) client-ip=74.124.194.228;
Authentication-Results: mx.google.com; spf=neutral (google.com: 74.124.194.228 
is neither permitted nor denied by best guess record for domain of 
realbasic-nug-bounces@lists.realsoftware.com) 
smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Received: from localhost ([127.0.0.1] helo=advanced107.inmotionhosting.com)
        by advanced107.inmotionhosting.com with esmtp (Exim 4.69)
        (envelope-from <realbasic-nug-bounces@lists.realsoftware.com>)
        id 1MWMnp-0003LP-Kc; Wed, 29 Jul 2009 20:59:37 -0700
Received: from qmta07.emeryville.ca.mail.comcast.net ([76.96.30.64])
        by advanced107.inmotionhosting.com with esmtp (Exim 4.69)
        (envelope-from <ormyrr@comcast.net>) id 1MWMno-0003L2-1M
        for realbasic-nug@lists.realsoftware.com;
        Wed, 29 Jul 2009 20:59:36 -0700
Received: from OMTA04.emeryville.ca.mail.comcast.net ([76.96.30.35])
        by QMTA07.emeryville.ca.mail.comcast.net with comcast
        id N3mp1c0050lTkoCA73zdjJ; Thu, 30 Jul 2009 03:59:37 +0000
Received: from sz0114.ev.mail.comcast.net ([76.96.26.176])
        by OMTA04.emeryville.ca.mail.comcast.net with comcast
        id N3zc1c00B3nyKck8Q3zcwh; Thu, 30 Jul 2009 03:59:37 +0000
Date: Thu, 30 Jul 2009 03:59:36 +0000 (UTC)
From: ormyrr@comcast.net
To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Message-ID: 
<1259421057.4042831248926376840.JavaMail.root@sz0114a.emeryville.ca.mail.comcast.net>
In-Reply-To: <4A710F1B.8070502@inspiringapps.com>
Subject: Re: Should I be able to do this?
MIME-Version: 1.0
X-Originating-IP: [76.96.26.176]
X-Mailer: Zimbra 5.0.16_GA_2927.RHEL5_64 (zclient/5.0.16_GA_2927.RHEL5_64)
X-Content-Filtered-By: Mailman/MimeDel 2.1.10
X-BeenThere: realbasic-nug@lists.realsoftware.com
X-Mailman-Version: 2.1.10
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: realbasic-nug-bounces@lists.realsoftware.com
Errors-To: realbasic-nug-bounces@lists.realsoftware.com
X-AntiAbuse: This header was added to track abuse, please include it with any 
abuse report
X-AntiAbuse: Primary Hostname - advanced107.inmotionhosting.com
X-AntiAbuse: Original Domain - realsoftware.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lists.realsoftware.com

Well, I do remember in some prior version of RB that putting comments between 
the Select Case and the first Case statement did cause the compiler to throw 
out an error. Apparently they've fixed that, but you still can't put anything 
else there (and normally why would you?). I would agree that Karen's code 
should be allowed to work, and a feature request would be in order.

----- Original Message -----

From: Joe Strout
In a word...  nonsense.

What Karen's doing ought to work, but I guess it's just a limitation of the 
compiler.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>