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 23:12:29 -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: <E2C2AE47-CD73-4B7B-AD1B-EA4E85F4B848@verizon.net>
References: <E98A8196-448A-4BCB-A001-D3FB1149709C@verizon.net> <D1C60056-4AE1-4131-9444-F1E1A4DF0569@great-white-software.com> <E2C2AE47-CD73-4B7B-AD1B-EA4E85F4B848@verizon.net>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 29-Jul-09, at 10:19 PM, Karen wrote:


On Jul 29, 2009, at 11:58 PM, Norman Palardy wrote:

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


Yes that works but:

 dim RectCtrl as RectControl
 dim checkedFont as string

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

Does not.

That would definitely be a bug

But you can work around it by either putting in a case ahead of that with nothing between the select and first case or, in the case of the example you case, move the cases that occur in all versions before those with the #if surrounding them


_______________________________________________
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>