Switching Views via a Toolbar: Any tutorials?

Hi everyone,

I apologize if this looks like I didn’t look up anything before, but I wasn’t able to find much via google. And the stuff I I found was outdated, especially since the introduction of ASOC. Looking up what I need in the Cocoa Documentation doesn’t seem to make much point to me for this purpose either, because then I could skip the whole ASOC period and start learning Cocoa instead to start with (which I will do at some point but for now I would like to keep it a little bit simpler :stuck_out_tongue: ).

So, here goes my question:

Could someone please point me to a good tutorial/resource? I would like to get info on the following topics:

  • How to create a GUI with multiple views in one window
  • How to set up a Toolbar
  • How to use the Toolbar to control/switch between views
  • Integrating Preferences via “Appname → Preferences” Menu

Is there even already a book available which maybe focuses on the actual GUI part of ASOC?

aka. “Making your application pretty”, like a post I found earlier in the forum here, but focusing more on the “whole” of creating an app with subviews or more than one window and how all elements need to work together instead of a tutorial for every single element. Sounds probably complicated… Sorry. :stuck_out_tongue:

Your inputs are greatly appreciated! :slight_smile:

Best regards from Switzerland,
Oliver

I have the same question, my way is truly wrong, it seems to visually fail if the window is not textured and does not account for icon or text only setting on the toolbar. There must be a more natural way.

on subchangetothisview_(sender)
		tell me to activate
		valwintlbr's setSelectedItemIdentifier_("Choose File")
		winmain's setContentView_(missing value)
		subresize(219 + 22)
		winmain's setContentView_(valwinfileview)
	end subchangetothisview_
	
	on subresize(valnewh)
		if valwintlbr's isVisible() is true then
			set valnewtoth to valnewh + 55
		else
			set valnewtoth to valnewh + 0
		end if
		set valwframe to winmain's frame()
		set {{x:valwx, y:valwy}, {width:valww, height:valwh}} to valwframe as list
		winmain's setFrame_display_animate_({{valwx, valwy + valwh - valnewtoth}, {valww, valnewtoth}}, true, true)
		winmain's setMinSize_({413, valnewh})
	end subresize