realbasic-nug
[Top] [All Lists]

Adding Menu Items From Text File

To: RB NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Adding Menu Items From Text File
From: Maury McCown <maury at mccowns dot us>
Date: Wed, 30 Jun 2004 20:54:52 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
Hey all

Time for another embarrassing question about something I should already know
how to do: generate a menu containing a list from a data file.

I have a text file with a list of city names, and when the app starts, I
want to load the list of names into my Locations menu item. However, all I
can get it to do is load the last item in the list ? and I¹ve tried all
kinds of stuff to try and get this to work, but I can¹t. =(

Here¹s my code (c is dimmed as new MenuItem):

  File = blablabla....
  input = file.OpenAsTextFile
  
  do until input.EOF
    c.Text = input.ReadLine
    MenuBar1.Child("LocationsMenu").Insert(0,c)
  Loop
  
  input.Close

All this does is list the last item in the file for each instance of an
item.

Any help would be appreciated!
Maury
===========================================
RAILhead Design: ³Giving the planet a makeover²
news | icons | desktops | fonts | software | more
< http://www.railheaddesign.com/ >
===========================================



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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

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