realbasic-nug
[Top] [All Lists]

Put some votes on the Color Picker Crash

To: REALbasic NUG List <realbasic-nug at lists dot realsoftware dot com>
Subject: Put some votes on the Color Picker Crash
From: Sven E Olsson <lists at seedit dot info>
Date: Wed, 28 Mar 2007 18:36:00 +0200
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
The Color Picker Crash:
This affect both the RB-IDE and our own apps.
http://realsoftware.com/feedback/viewreport.php?reportid=diyfzcxn

Needs to be fixed or is Cocoa coming soon? Cocoa should be supported  
2006?
Sven E




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

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


From  Wed 28 Mar 2007 10:47:04 -0600
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
        id D4F7E1D4A18B; Wed, 28 Mar 2007 09:47:15 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on 
        www.realsoftware.com
X-Spam-Level: 
X-Spam-Status: No, score=-2.8 required=4.5 tests=ALL_TRUSTED,AWL,BAYES_00,
        MIME_HEADER_CTYPE_ONLY,NO_REAL_NAME autolearn=ham version=3.1.1
Received: from lists.realsoftware.com (m.realsoftware.com [66.116.103.65])
        by xmail.realsoftware.com (Postfix) with ESMTP id 8CBB71D4A17D;
        Wed, 28 Mar 2007 09:47:13 -0700 (PDT)
Received: from real-software-mini.local (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP id 689BE19621E;
        Wed, 28 Mar 2007 11:47:08 -0500 (CDT)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from mail.verex.com (mail.verex.com [66.116.103.197])
        by lists.realsoftware.com (Postfix) with ESMTP id 25E7D196213
        for <realbasic-nug at lists dot realsoftware dot com>;
        Wed, 28 Mar 2007 11:47:04 -0500 (CDT)
Received: from [66.116.103.197] (localhost [127.0.0.1])
        by mail.verex.com (Postfix) with SMTP id 3FB85721A76
        for <realbasic-nug at lists dot realsoftware dot com>;
        Wed, 28 Mar 2007 10:47:04 -0600 (MDT)
Date: Wed, 28 Mar 2007 10:47:04 -0600
Subject: A way to get half-decent tabs in an RB EditField
From: joe at strout dot net
To: realbasic-nug at lists dot realsoftware dot com
X-Mailer: VerEx Email Gateway
Message-Id: <20070328164704 dot 3FB85721A76 at mail dot verex dot com>
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Content-Type: multipart/mixed; boundary="===============1203793956=="
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com

--===============1203793956==
Content-type: text/plain;
Content-transfer-encoding: 7bit

I've been thinking of a project where it'd be nice to have a very
simple code editor.  By "simple" I mean that I want to use the built-in
EditField rather than start from scratch (been there, done that, don't
have anywhere near enough time to do it again).  I also don't need
anything fancy like syntax coloring or parenthesis matching.

You can already turn on a horizontal scrollbar, so we're 95% of the way
there.  The one thing the EditField *doesn't* do is support tabs.  This
is a real show-stopper for editing code, since tabs are (in most
languages) the standard way of indenting code blocks.  You can set an
RB EditField to accept tabs, but the character it uses to draw them is
the same size as a regular space.

So, necessity being a mother and all that, I got inspired to put this
in the KeyDown event of an EditField:

  static fakeTab As String = Encodings.UTF8.Chr( &h2003 )
  if Key = Chr(9) then
    me.selText = fakeTab
    return true
  end if
  return false

Unicode &h2003 is the "Em Space" character.  It's a whitespace
character that's significantly longer than your typical space
character.  The code above intercepts any press of the Tab key and
inserts an Em Space instead.

The result is pretty encouraging â?? at the beginning of a line, at
least, this does a very convincing impression of a tab that's about 3-4
characters wide (depending on the font).  It properly highlights when
you select it, gets deleted or cursored-over as a single character, etc.

To complete the illusion you'd want to intercept Copy and Paste and
convert regular tabs to/from em spaces, and likewise for
reading/writing files.

I haven't tried this on Windows or Linux yet.  Anybody want to give it
a quick whirl and report back?

Finally, does anybody else think that simple tab stops of about 4 "m"'s
width would be a great addition to the EditField?  We don't need the
EditField to turn into a word processor, but this one addition would
really open up a whole new set of applications for it (like editing
code!).  Or, failing that, should the EditField at least draw the tab
character wider, as this hack makes it do?

Best,
- Joe




--
Joe Strout -- joe at strout dot net
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/


--===============1203793956==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

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


<Prev in Thread] Current Thread [Next in Thread>
  • Put some votes on the Color Picker Crash, Sven E Olsson <=