I am still having trouble getting my buttons to do something Here is some screen shots http://www.insanemonkeysoftware.com/fb/controlid.png http://www.insanemonkeysoftware.com/fb/newproject.png http://www.insanemonkeysoftware.com/fb/open.png http://www.insanemonkeysoftware.com/fb/quit.png Can someone send me another example of a doDialog I have a push button called Quit ID #1 I have a push button called Open ID #2 I have a push button called New Project ID #3 I have defiined constants as _quitBtn = 1 _openBtn = 2 _newBtn = 3 For example so far in the program I have this... case _quitBtn gFBQuit = _zTrue But the program doesn't quit #if def _FBtoC include resources "StoryTeller.xib" // file to be copied to <app>/Contents/Resources/en.lproj #endif APPLE MENU "About StoryTeller..." resources "StoryTeller.rsrc" include "Tlbx IBCarbonRuntime.incl" include "NibToFB.incl" // these must match the Control IDs set in the nib _quitBtn = 1 _openBtn = 2 _newBtn = 3 local mode local fn BuildUIFromNib '~'1 dim as IBNibRef @ nib dim as WindowRef @ w dim as OSStatus err err = fn CreateNibReference( fn CFSTR( "StoryTeller" ), @nib ) if err then stop "CreateNibReference error" /*err = fn SetMenuBarFromNib( nib, fn CFSTR( "MenuBar" ) ) if err then stop "SetMenuBarFromNib error"*/ err = fn CreateWindowFromNib( nib, fn CFSTR( "ST_Splash" ), @w ) DisposeNibReference( nib ) if err then stop "CreateWindowFromNib error" ShowWindow( w ) // the FB wndNum is determined by MakeIntoFBWindow's second parameter; there is nothing relevant in the nib fn MakeIntoFBWindow( w, 1 ) // use an FB runtime utility to put text into the nib-derived control //def SetButtonTextString( _eutcBtn, "programmed text" ) end fn local fn DoDialog '~'1 dim as long evnt, ref evnt = dialog(0) ref = dialog(evnt) select evnt case _btnClick select ref /*case _beepBtn : beep case _helpBtn : beep : button _helpBtn, _grayBtn*/ case _quitBtn gFBQuit = _zTrue end select end select end fn // main on dialog fn DoDialog fn BuildUIFromNib do HandleEvents until gFBQuit Brian