Source Code Form Issues

Louis

Active Member
Licensed User
Hi,
Yesterday as I added a new MenuItem to my form from within Basic4ppc, the 46th item I believe it was it seems to have messed up internally my .sbp file. Not my source code, but the forms basic4ppc was pre-programmed to add after a save. When I access the IRC and Chat windows from the Designer menu, or try to, I get a NullReferenceException, and an ArgumentOutOfRangeException. Here's what the file has so far, and what the designer sub looks like:
version
5.00
3
sounds
IRC
chat
irc
4
3
0
0
0
0
0
0
0
0
0
6
65
0
1
1
3
0
0
0
238
268

1
Hardware.dll
4
BinaryFile.dll
HTTP.DLL
Network.dll
Hardware.dll
5
client:Client
request:WebRequest
stream:BinaryFile
response:WebResponse
hardware:Hardware
Sub designer


addform(sounds,"Sounds and Notifications ","",211,211,211)@
addopendialog(sounds,Opensound,95,95,Sound Files|*.wav)@
addbutton(sounds,SaveAndExit,95,95,75,23,"Save And Exit",212,208,200,0,0,0,True,True,9)@
addbutton(sounds,selectnewsound,95,95,75,23,"Select New Sound",212,208,200,0,0,0,True,True,9)@
addbutton(sounds,playsound,95,95,75,23,"Play",212,208,200,0,0,0,True,True,9)@
addlistbox(sounds,filestoplay,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addlistbox(sounds,soundoptions,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addform(IRC,"Internet Relay Chat","",245,245,245)@
addarraylist(irc,topics,95,95,80,25)@
addarraylist(irc,people,95,95,80,25)@
addlistbox(irc,rooms,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@

addmenuitem(irc,favorites,"Favorites",True,False)@r
addmenuitem(favorites,RemoveAServer,"Remove A Server",True,False)@r
addmenuitem(favorites,addaserver,"Add A Server",True,False)@r
addmenuitem(favorites,logonserver,"Log Onto Server",True,False)@r
addmenuitem(irc,SoundsSet,"Set Sounds/Notifications",True,False)@r
addmenuitem(irc,irchelpmenu,"Help/Registration",True,False)@r
addmenuitem(irchelpmenu,Helpmenu1,"Help",True,False)@r
addmenuitem(helpmenu1,whatsnew,"What's New",True,False)@r
addmenuitem(helpmenu1,intro,"Introduction",True,False)@r
addmenuitem(helpmenu1,gettingstarted,"Getting Started",True,False)@r
addmenuitem(helpmenu1,RoomsHelp,"The Chat Rooms",True,False)@r
addmenuitem(roomshelp,joiningChat,"Joining A Listed Room",True,False)@r
addmenuitem(roomshelp,JoinHidden,"Creating A Room",True,False)@r
addmenuitem(helpmenu1,TCWHelp,"The Chat Window",True,False)@r
addmenuitem(tcwhelp,ChattersHelp,"Chatting",True,False)@r
addmenuitem(tcwhelp,ProgoamOptionsHelp,"Program Options",True,False)@r
addmenuitem(helpmenu1,ExitHelp,"Exitting The Program",True,False)@r
addmenuitem(helpmenu1,AboutIRC,"About This Program",True,False)@r
addmenuitem(irchelpmenu,irchelp,"Register This Client",True,False)@ End Sub addform(chat,"Chat","",211,211,211)@
addsavedialog(chat,SaveLog,95,95,ASCII Text|*.txt)@
addlistbox(chat,participants,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addmenuitem(chat,ProgramOptions,"Program Options",True,False)@r
addmenuitem(programoptions,ignoremenu,"Ignore",True,False)@r
addmenuitem(ignoremenu,IgnoreUser,"Ignore User Incoming Messages",True,False)@r
addmenuitem(ignoremenu,ignoreexcept,"Ignore Everyone Except",True,False)@r
addmenuitem(programoptions,SavedLog,"Save Logs",True,True)@r
addmenuitem(programoptions,saveIgnore,"Save Ignored Lists",True,False)@r
addmenuitem(programoptions,nosounds,"Stop Sounds for Now",True,False)@r
addmenuitem(chat,ControlChar,"Hold Down Control",True,False)@r
addmenuitem(chat,AppExit,"Exit Program",True,False)@
addform(irc,"Internet Relay Chat","",211,211,211)@
End Sub
@EndOfDesignText@
Now I know the IRC window appears twice so I will remove the lowercased "irc" control, but even without it I still get those errors when trying to access the "IRC" and "chat" forms from the Designer menu. What should I do? To do a 43.7 KB of code over again would be a pain, but do you suggest something like copying just the code to another .sbp file and redoing the forms? Or can I insert and/or delete something in the pre-programmed text to make it all better? Thank you all for your help, I really do appreciate it!
 

Louis

Active Member
Licensed User
Hi Erel, I got all of the weird R'S out of the way, but I still get the same errors. Here's what the internals look like now:
version
5.00
2
sounds
IRC
chat
4
3
0
0
0
0
0
0
0
0
0
6
65
0
1
1
3
0
0
0
238
268

1
Hardware.dll
4
BinaryFile.dll
HTTP.DLL
Network.dll
Hardware.dll
5
client:Client
request:WebRequest
stream:BinaryFile
response:WebResponse
hardware:Hardware
Sub designer


addform(sounds,"Sounds and Notifications ","",211,211,211)@
addopendialog(sounds,Opensound,95,95,Sound Files|*.wav)@
addbutton(sounds,SaveAndExit,95,95,75,23,"Save And Exit",212,208,200,0,0,0,True,True,9)@
addbutton(sounds,selectnewsound,95,95,75,23,"Select New Sound",212,208,200,0,0,0,True,True,9)@
addbutton(sounds,playsound,95,95,75,23,"Play",212,208,200,0,0,0,True,True,9)@
addlistbox(sounds,filestoplay,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addlistbox(sounds,soundoptions,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addform(IRC,"Internet Relay Chat","",245,245,245)@
addarraylist(irc,topics,95,95,80,25)@
addarraylist(irc,people,95,95,80,25)@
addlistbox(irc,rooms,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addmenuitem(irc,favorites,"Favorites",True,False)@
addmenuitem(favorites,RemoveAServer,"Remove A Server",True,False)@
addmenuitem(favorites,addaserver,"Add A Server",True,False)@
addmenuitem(favorites,logonserver,"Log Onto Server",True,False)@
addmenuitem(irc,SoundsSet,"Set Sounds/Notifications",True,False)@
addmenuitem(irc,irchelpmenu,"Help/Registration",True,False)@
addmenuitem(irchelpmenu,Helpmenu1,"Help",True,False)@
addmenuitem(helpmenu1,whatsnew,"What's New",True,False)@
addmenuitem(helpmenu1,intro,"Introduction",True,False)@
addmenuitem(helpmenu1,gettingstarted,"Getting Started",True,False)@
addmenuitem(helpmenu1,RoomsHelp,"The Chat Rooms",True,False)@
addmenuitem(roomshelp,joiningChat,"Joining A Listed Room",True,False)@
addmenuitem(roomshelp,JoinHidden,"Creating A Room",True,False)@
addmenuitem(helpmenu1,TCWHelp,"The Chat Window",True,False)@
addmenuitem(tcwhelp,ChattersHelp,"Chatting",True,False)@
addmenuitem(tcwhelp,ProgoamOptionsHelp,"Program Options",True,False)@
addmenuitem(helpmenu1,ExitHelp,"Exitting The Program",True,False)@
addmenuitem(helpmenu1,AboutIRC,"About This Program",True,False)@
addmenuitem(irchelpmenu,irchelp,"Register This Client",True,False)@ End Sub addform(chat,"Chat","",211,211,211)@
addsavedialog(chat,SaveLog,95,95,ASCII Text|*.txt)@
addlistbox(chat,participants,95,95,80,50,"",255,255,255,0,0,0,True,True,0,9)@
addmenuitem(chat,ProgramOptions,"Program Options",True,False)@
addmenuitem(programoptions,ignoremenu,"Ignore",True,False)@
addmenuitem(ignoremenu,IgnoreUser,"Ignore User Incoming Messages",True,False)@
addmenuitem(ignoremenu,ignoreexcept,"Ignore Everyone Except",True,False)@
addmenuitem(programoptions,SavedLog,"Save Logs",True,True)@
addmenuitem(programoptions,saveIgnore,"Save Ignored Lists",True,False)@
addmenuitem(programoptions,nosounds,"Stop Sounds for Now",True,False)@
addmenuitem(chat,ControlChar,"Hold Down Control",True,False)@
addmenuitem(chat,AppExit,"Exit Program",True,False)@

End Sub
@EndOfDesignText@
Any thoughts? Thanks again for everything.
 
Top