Xojo Conferences
XDCMay2019MiamiUSA

Really stuck on favorites menu (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: Document previews
Next thread: saving a document


RB Database   -   tom.russell transport.alstom.com
  Really stuck on favorites menu   -   Brian Heibert

Really stuck on favorites menu
Date: 06.02.05 01:12 (Sat, 05 Feb 2005 19:12:31 -0500)
From: Brian Heibert
Hi,

I am really stuck on what to do to get my Favorites menu working again

I have a menu called Favorites
In it is Add Favorite...
Links Sub menu
-divider
1
2
3
4
5
6
7

In the open event of the browser window I have this:

f = PreferencesFolder.child("InternetPal Favorites #1")
If f.exists=true then
StreamðOpenAsTextFile
AddFavorites.LinkOneName.text = Stream.ReadLine
mhref1 = Stream.readline
FavOne.text = AddFavorites.LinkOneName.text

AddFavorites.close
end if
f = PreferencesFolder.child("InternetPal Favorites #2")
If f.exists=true then
StreamðOpenAsTextFile
AddFavorites.LinkTwoName.text = Stream.ReadLine
mhref2 = Stream.readline
FavTwo.text = AddFavorites.LinkTwoName.text

AddFavorites.close
end if

f = PreferencesFolder.child("InternetPal Favorites #3")
if f.exists=true then
StreamðOpenAsTextFile
AddFavorites.LinkThreeName.text = Stream.Readline
mhref3 = Stream.readline
FavThree.text = AddFavorites.LinkThreeName.text

AddFavorites.close
end if

f = PreferencesFolder.child("InternetPal Favorites #4")
if f.exists=true then
StreamðOpenAsTextFile
AddFavorites.LinkFourName.text = Stream.Readline
mhref4 = Stream.readline
FavFour.text = AddFavorites.LinkFourName.text

AddFavorites.close
end if

f = PreferencesFolder.child("InternetPal Favorites #5")
if f.exists=true then
StreamðOpenAsTextFile
AddFavorites.LinkFiveName.text = Stream.readline
mhref5 = Stream.readline
FavFive.text = AddFavorites.LinkFiveName.text

AddFavorites.close
end if

f = PreferencesFolder.child("InternetPal Favorites #6")
if f.exists=true then
StreamðOpenAsTextFile
AddFavorites.LinkSixName.text = Stream.readline
mhref6 = Stream.readline
FavSix.text = AddFavorites.LinkSixName.text

AddFavorites.close
end if

f = PreferencesFolder.child("InternetPal Favorites #7")
if f.exists=true then
StreamðOpenAsTextFile
AddFavorites.Link7Name.text = Stream.readline
mhref7 = Stream.readline
Fav7.text = AddFavorites.Link7Name.text

AddFavorites.close
end if

In FavOne Menuitem and all the way up to Fav7 I have code like this:
//FavoritesMenu.child(FavOne.text).tag = AddFavorites.FavLink.text
Dim stor1 as string
FavOne.tag = AddFavorites.favLink.text
stor1 = addfavorites.favlink.text
Browser.WebKit1.loadurl stor1
addfavorites.close

But when I click on the menuitem which has the name of the link in the menu
The program unexpectantly quits

Oh and if you are wandering where I get the text from

Favlink.text is a edit field where the user can type in the url to go to

In the AddFavorites window I have edit fields like:
Favorite Link #1: (where the user puts the url)
And Link Name: (where the user puts the name of the url)
And I have 7 of these

Brian

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

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