New topic: Can't get Save menu item to work
<http://forums.realsoftware.com/viewtopic.php?t=31444> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message Realgeekaye Post subject: Can't get Save menu item to workPosted: Mon Dec 07, 2009 1:17 am Joined: Mon Dec 07, 2009 12:49 am Posts: 1 I am writing my first application using RealBasic for my Macintosh and want to be able to save data contained in list boxes. I created the menu item 'Save' and put 'filesave.enable' into the 'enableMenuItems' section of the project event Handler. In the window containing the list I created a menuhandler 'Save' and added the code below but when I test run it and select 'Save' from my 'File' menu I don't even get the dialog box asking for the name of the file. It does absolutely nothing. Any idea why? What have I not done that needed to be done? Dim file As FolderItem, totRows, row, k as integer Dim fileStream As TextOutputStream file=GetSaveFolderItem("text","MatchUpData") If file<> Nil Then fileStream=file.CreateTextFile totRows=ListGirls.ListCount for row = 0 to totRows-1 for k=0 to 59 fileStream.WriteLine ListGirls.cell(row,k) next k next row totRows=ListBoys.ListCount for row = 0 to totRows-1 for k=0 to 59 fileStream.WriteLine ListBoys.cell(row,k) next k next row fileStream.Close end if Return True Top jefftullin Post subject: Re: Can't get Save menu item to workPosted: Mon Dec 07, 2009 2:26 am Joined: Wed Nov 15, 2006 3:50 pm Posts: 1050 Have you set the menu as the menu in the document window's properties? You may be executing a different filesave method belonging to the App Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
