gettingstarted
[Top] [All Lists]

Re: Preferences on PC - AND

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Preferences on PC - AND
From: Arnaud Nicolet <arnaud at tribu dot ch>
Date: Sat, 30 Sep 2006 22:41:39 +0200
Delivered-to: listarchive at realsoftware dot com
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <56CA58EB-E783-4FA5-A09C-EC6F8BF27905 at usa dot net> <5D829664-9A6E-48EB-9C6E-8655892ED401 at shaw dot ca> <232A9704-B87D-4CC4-AC5F-A6B98849C18B at usa dot net>
Le 30 sept. 06 à 18:59 Soir, Robert Poland a écrit:

On Sep 30, 2006, at 10:31 AM, Terry Ford wrote:

On Sep 30, 2006, at 9:05 AM, Robert Poland wrote:

Hi,

This works on a Mac but not on a PC;

    Dim tOS As TextOutputStream

    tOS= fWinPrefs.CreateTextFile
    tOS.WriteLine Window2.EditField2.Text
    tOS.WriteLine Window2.EditField3.Text
    tOS.WriteLine Window2.EditField4.Text
    tOS.WriteLine Window2.EditField5.Text
    tOS.WriteLine Window2.EditField6.Text
    tOS.Close

Any clues on where to find an example?

I can't see why it would work in any platform without declaring what ( I assume is a FolderItem) fWinPrefs refers to.

Something like:

Dim fWinPrefs As Folderitem (or make it a property)

fWinPrefs= Preferences.Child("MyPrefs")

would work.

Example in the mail

Terry

fWinPrefs is declared as a "Property As FolderItem?

AND in App/Open

    fPrefs=PreferencesFolder.Child("Time Sheet Prefs")


If PreferencesFolder.Child("Time Sheet Prefs") does not exist, the next line generates a nilObjectException:

    If fPrefs.Child("WinPrefs").Exists=False Then
      // "Time Sheet Prefs" does not exist.
      Window2.Visible=True
      TextWindow.FirstRun // Run as first time [no objects].
    Else
      // Setup folderitems for files existing.
      fWinPrefs=fPrefs.Child("WinPrefs")

      // Read the data and window settings
      ReadWinPrefs
    End If

Could it be your problem?
_______________________________________________
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>


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