On 2007-04-24, at 16:28, Sven E Olsson wrote:

>
> On 2007-04-24, at 16:11, Dennis Birch wrote:
>
>> On 4/23/07, Sven E Olsson <[EMAIL PROTECTED]> wrote:
>>> I am testing to use two windows (because it is not possible to set
>>> the EditField.ScrollbarHorizontal in the fly).
>>>
>>>
>>> I just begin, so this is only the first problem..
>>>
>>> I can't create a global array using code, I wanted to do something
>>> like this, instead it looks like that i need properties and code for
>>> every window.
>>>
>>>    if prefs.WordWrap = true then
>>>      dim Global OpnW() as TextWNoscroll
>>>    else
>>>      dim Global OpnW() as TextWHscroll
>>>    end if
>>
>> Is that some new kind of syntax for RB 200x?
> I never said that, I write "wanted to do"
>
>> I've never declared a
>> global variable that way in RB.
>
> That do not work.
>> If I understand what you're looking
>> for, you should be able to get the same effect by declaring a  
>> property
>> that's an array of your window in a module, and making sure to set  
>> its
>> scope as Global.
>
>
> Yes I can declare a property in a module that is an array (of one
> window type) of an window
>
> But the problem is to declare an array, depending on some preferences
> settings.
>
> How do I declare the Array "OpenW" to be an array of TextWnoscroll or
> TextWHscroll, depending on a preference variable?
> As I can se it is impossible.
>
> The same is with windows, I cant declare a global variable "w" as
> TextWndNoscroll or TextWHscroll, depending on a prefs variable.
>
>
>
>

Just a note you can't even do this inside a function


if prefs.Wordwrap = true then
dim w as TextWndNoscroll
w = new TextWndNoScroll
else
dim w as TextWndHscroll
w = new TextWndHscroll
end if

w.title = "index.html"
w.document = f
w.EditFiled1.text = "hello"
------------------------

You have to write the code twice, because the dim statement is inside  
a block.


Sven E
-----------------------
REALbasic 2007R1 OS X 10.4.8 Intel and 10.4.6 PPC
SEEdit Maxi THE XHTML EDITOR FOR MACINTOSH
http://www.seedit.info



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

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

Reply via email to