[futurebasic] Back to Crashes

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2005 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Wed, 21 Dec 2005 23:14:48 -0500
In this thread, Russ asked:

>I also wondered about where the library with objc_msgSend in it actually is.
>The Crash report says:
>0x90860000 - 0x908cffff libobjc.A.dylib     /usr/lib/libobjc.A.dylib
>But I don't understand where to find /usr/lib/ at.


Russ,

Many standard Unix directories and files are hidden in OS X.

You can view the /usr/lib/ contents in the Terminal by entering at the prompt:

ls /usr/lib/

Hoewver, here is a little utility I wrote earlier 
to toggle the visibility of such files on and off 
in the Finder.

Since one of your apps continues to work, I'm 
wondering if there may be some difference in the 
plists of the old and new app. I would assume the 
FB code is identical. But I wonder about the 
plists.

Ken


'~'A
'                       Runtime : Rntm Appearance.Incl
'                           CPU : Carbon
'                    CALL Req'd : Off
'~'B
/*
FB code generated by TWM <http://homepage.ntlworld.com/bernie.w/twm.htm>


        Finder Finagler v.01c

        A small utility to toggle
        the Finder to show or hide
        invisible files and folders
        in OS X.

        Ken Shmidheiser
        Somerset, KY 42501
        Sept. 5, 2005

*/

output file "Finder Finagler .01c"

begin enum 1
_mainWnd
end enum

_fileMenu = 1
_toggleMenu = 1

begin enum 10
_toggleBtn
_instructionText
_statusText
_c1Sep
_cSep
end enum

#define FMFontFamily as SInt16
toolbox fn FMGetFontFamilyFromName(Str255 iName) = FMFontFamily

local fn BuildMenus
apple menu "(Finder Finagler .01c"
menu _fileMenu, 0, _enable, "File"
menu _fileMenu, _toggleMenu, _enable, "Toggle visibility.../M"
end fn

local fn BuildmainWnd
dim as Str255               s
dim as ControlFontStyleRec  tfs
dim as WindowAttributes     wa
dim as Rect                 r
dim as boolean            @ bool
wa = _kWindowCloseBoxAttribute¬
        _kWindowCollapseBoxAttribute¬
        _kWindowFullZoomAttribute

def NewWindowPositionMethod(_kWindowCenterOnMainScreen)
SetRect(r, 0, 0, 320, 185)
appearance window -_mainWnd, "Finder Finagler .01c",¬
@r, _kDocumentWindowClass, wa
def NewWindowPositionMethod(0)
def SetWindowBackground(_kThemeActiveDialogBackgroundBrush,_zTrue)

SetRect(r, 155, 144, 300, 164)
appearance button _toggleBtn, _activeBtn,,,,¬
"Toggle visibility", @r, _kControlPushButtonProc

SetRect(r, 20, 20, 300, 36)
appearance button _statusText, _activeBtn,,,,,¬
@r, _kControlEditTextProc
tfs.flags = _kControlUseFontMask¬
               _kControlUseSizeMask¬
               _kControlUseFaceMask¬
               _kControlUseJustMask
tfs.font = fn FMGetFontFamilyFromName("Lucida Grande")
tfs.size = 13
tfs.style = 0
tfs.just = _teJustCenter
def SetButtonFontStyle(_statusText, tfs)

// Lock Edit Text control to prevent editing
bool = _true

// Depending on your version of FB, this constant
// may already be defined and the following
// line may need to be remarked out
_kControlEditTextLockedTag = _"lock"

def SetButtonData( _statusText, _kControlEditTextPart,¬
            _kControlEditTextLockedTag, sizeof( Boolean ), bool )

SetRect(r, 20, 67, 300, 116)
appearance button _instructionText, _activeBtn,,,,,¬
@r, _kControlStaticTextProc
def SetButtonFontStyle(_instructionText, tfs)

s  = "Click ""Toggle visibility"" button"
s += " to change File and Folder visibility in the Finder."
s += " The Finder will be restarted in a few seconds."
def SetButtonTextString(_instructionText, s)

SetRect(r, 20, 124, 300, 134)
appearance button _c1Sep, _activeBtn,,,,,¬
@r, _kControlSeparatorLineProc

SetRect(r, 20, 47, 300, 57)
appearance button _cSep, _activeBtn,,,,,¬
@r, _kControlSeparatorLineProc

end fn

local fn UnixCommand$( unixCmd as str255 )
dim as str255 tempStr, outStr

outStr = ""
open "Unix", 2, unixCmd
do : line input #2, tempStr
outStr += tempStr
until eof (2) : close  2

end fn = outStr

local fn RestartFinder$
end fn = fn UnixCommand$( "killall Finder" )

local fn CheckVisibility$
dim as str255 cmd
cmd = "defaults read com.apple.finder AppleShowAllFiles"
end fn = fn UnixCommand$( cmd )

local fn TurnVisibilityOn$
dim as str255 cmd
cmd = "defaults write com.apple.finder AppleShowAllFiles ON"
end fn = fn UnixCommand$( cmd )

local fn TurnVisibilityOff$
dim as str255 cmd
cmd = "defaults write com.apple.finder AppleShowAllFiles OFF"
end fn = fn UnixCommand$( cmd )

local fn ShowVisibilityStatus
dim as str255 s

long if ( fn CheckVisibility$ = "OFF" )
s = "Finder set to hide invisibles"
xelse
s = "Finder set to show invisibles"
end if
def SetButtonTextString(_statusText, s)

end fn

local fn DoToggle

long if ( fn CheckVisibility$ = "OFF" )
fn TurnVisibilityOn$
xelse
fn TurnVisibilityOff$
end if

fn RestartFinder$
fn ShowVisibilityStatus

end fn

local fn Init
fn BuildMenus
fn BuildmainWnd
fn ShowVisibilityStatus
fn ShowVisibilityStatus
appearance window _mainWnd
end fn

local fn DoDialog
dim as Rect r
dim as long ev, id

ev = dialog(0)
id = dialog(ev)

select ev
case _wndClose : gFBQuit = _zTrue
case _btnClick
select window(_outputWnd)
case _mainWnd
select id
case _toggleBtn : fn DoToggle
end select
end select
end select

end fn

local fn DoMenu
dim as long menuID, itemID

menuID = menu(_menuID)
itemID = menu(_itemID)

select case( menuID )
case _fileMenu
select( itemID )
case _toggleMenu : fn DoToggle
end select
end select
menu

end fn

on dialog fn DoDialog
on menu   fn DoMenu

fn Init

do
HandleEvents
until gFBQuit